mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Fix bug when no DXIL reflection information is present
* We generate a simple uint array but we were doubling up with a trailing ubyte array.
This commit is contained in:
@@ -970,6 +970,8 @@ DXBC::Reflection *Program::GetReflection()
|
||||
var.type.descriptor.varClass = DXBC::CLASS_SCALAR;
|
||||
var.type.descriptor.varType = VarType::UInt;
|
||||
|
||||
uint32_t remainingBytes = var.type.descriptor.bytesize * 16;
|
||||
|
||||
bind.variables.push_back(var);
|
||||
|
||||
// add any remaining bytes if the struct isn't a multiple of float4 size
|
||||
@@ -977,8 +979,7 @@ DXBC::Reflection *Program::GetReflection()
|
||||
var.type.descriptor.bytesize = var.type.descriptor.elements = 1;
|
||||
var.type.descriptor.varType = VarType::UByte;
|
||||
|
||||
for(uint32_t remainingBytes = var.type.descriptor.bytesize * 16;
|
||||
remainingBytes < bind.descriptor.byteSize; remainingBytes++)
|
||||
for(; remainingBytes < bind.descriptor.byteSize; remainingBytes++)
|
||||
{
|
||||
bind.variables.push_back(var);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user