diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index 3b5640521c..a9540fb77f 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -258,6 +258,7 @@ public: } void SetDynamicUniformData(const void *data, size_t size) { + _assert_(size <= uboSize_); memcpy(ubo_, data, size); } @@ -1281,7 +1282,6 @@ void VKContext::BindTextures(int start, int count, Texture **textures) { } ShaderModule *VKContext::CreateShaderModule(ShaderStage stage, ShaderLanguage language, const uint8_t *data, size_t size, const std::string &tag) { - _CrtCheckMemory(); VKShaderModule *shader = new VKShaderModule(vulkan_, stage, tag); if (shader->Compile(language, data, size)) { return shader; diff --git a/UI/GPUDriverTestScreen.cpp b/UI/GPUDriverTestScreen.cpp index 33268e0611..c85a5530ac 100644 --- a/UI/GPUDriverTestScreen.cpp +++ b/UI/GPUDriverTestScreen.cpp @@ -4,6 +4,7 @@ #include "Common/UI/View.h" #include "Common/GPU/Shader.h" #include "Common/GPU/ShaderWriter.h" +#include "Core/Config.h" const uint32_t textColorOK = 0xFF30FF30; const uint32_t textColorBAD = 0xFF3030FF; @@ -377,10 +378,11 @@ void GPUDriverTestScreen::CreateViews() { tabHolder_->AddTab("Discard", new LinearLayout(ORIENT_VERTICAL)); tabHolder_->AddTab("Shader", new LinearLayout(ORIENT_VERTICAL)); - // TODO: Check for Vulkan - tabHolder_->AddTab("Mali Discard", new LinearLayout(ORIENT_VERTICAL)); - - tabHolder_->SetCurrentTab(2, true); + if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN) { + // TODO: Check for Vulkan + tabHolder_->AddTab("Mali Discard", new LinearLayout(ORIENT_VERTICAL)); + tabHolder_->SetCurrentTab(2, true); + } Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(100, WRAP_CONTENT, 10, NONE, NONE, 10)); back->OnClick.Handle (this, &UIScreen::OnBack); @@ -437,7 +439,6 @@ void GPUDriverTestScreen::MaliDiscardTest() { circleTexture_ = draw->CreateTexture(desc); delete[] data; } - _CrtCheckMemory(); if (maliWriteStencilPipelines_.empty()) { InputLayout *inputLayout = ui_draw2d.CreateInputLayout(draw); @@ -490,6 +491,7 @@ void GPUDriverTestScreen::MaliDiscardTest() { writeStencilState, blendOn, rasterNoCull, + &vsColBufDesc, }); shaders.clear(); @@ -503,6 +505,7 @@ void GPUDriverTestScreen::MaliDiscardTest() { readStencilState, blendOn, rasterNoCull, + &vsColBufDesc, }); inputLayout->Release(); @@ -520,8 +523,6 @@ void GPUDriverTestScreen::MaliDiscardTest() { maliWriteStencilPipelines_.push_back(maliWritePipeline); } - _CrtCheckMemory(); - for (int i = 0; i < maliReadStencilPipelines_.size(); i++) { Bounds bounds = { 40.0f, 40.0f + (float)i * 100.0f, 96.0f, 96.0f }; dc.BeginPipeline(maliReadStencilPipelines_[i], samplerNearest_); @@ -540,7 +541,6 @@ void GPUDriverTestScreen::MaliDiscardTest() { dc.Flush(); */ } - _CrtCheckMemory(); } void GPUDriverTestScreen::DiscardTest() {