Use innertype id to look up image type. Closes #2970

Fixes incorrect shader debugging for ImageFetch operation on arrays on buffers (and certain scenarios of arrays of textures).
This commit is contained in:
Jake Turner
2023-07-20 17:26:30 +01:00
committed by Jake Turner
parent d4c9de7f81
commit 944b38dc1f
@@ -1257,11 +1257,13 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
// sampler, so accessing the original type might be non-trivial at point of access
uint32_t texType = DebugAPIWrapper::Float_Texture;
Id imgid = type.InnerType();
Id imgid = innertype->id;
if(innertype->type == DataType::SampledImageType)
imgid = sampledImageTypes[imgid].baseId;
RDCASSERT(imageTypes[imgid].dim != Dim::Max);
if(imageTypes[imgid].dim == Dim::Buffer)
texType |= DebugAPIWrapper::Buffer_Texture;