Fix crash when constant buffer is unused by shader but still exists

This commit is contained in:
Wojtek Figat
2025-06-27 19:06:25 +02:00
parent 185151b025
commit 3dc7546dd4
21 changed files with 24 additions and 151 deletions

View File

@@ -59,14 +59,8 @@ bool BitonicSort::setupResources()
if (!_shader->IsLoaded())
return true;
const auto shader = _shader->GetShader();
// Validate shader constant buffer size
_cb = shader->GetCB(0);
if (_cb->GetSize() != sizeof(Data))
{
REPORT_INVALID_SHADER_PASS_CB_SIZE(shader, 0, Data);
return true;
}
CHECK_INVALID_SHADER_PASS_CB_SIZE(shader, 0, Data);
// Cache compute shaders
_indirectArgsCS = shader->GetCS("CS_IndirectArgs");