mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 15:06:32 +00:00
Get the element type from the Constant not Global Variable for GEP
This commit is contained in:
@@ -891,12 +891,17 @@ static bool ConvertDXILConstantToShaderVariable(const Constant *constant, Shader
|
||||
RDCERR("Constant GetElementPtr first member is not a GlobalVar");
|
||||
return false;
|
||||
}
|
||||
const DXIL::Type *elementType = gv->type;
|
||||
if(elementType->type != Type::TypeKind::Pointer)
|
||||
if(gv->type->type != Type::TypeKind::Pointer)
|
||||
{
|
||||
RDCERR("Constant GetElementPtr global variable is not a Pointer");
|
||||
return false;
|
||||
}
|
||||
const DXIL::Type *elementType = constant->type;
|
||||
if(elementType->type != Type::TypeKind::Pointer)
|
||||
{
|
||||
RDCERR("Constant variable is not a Pointer");
|
||||
return false;
|
||||
}
|
||||
elementType = elementType->inner;
|
||||
VarType baseType = ConvertDXILTypeToVarType(elementType);
|
||||
uint32_t elementSize = GetElementByteSize(baseType);
|
||||
|
||||
Reference in New Issue
Block a user