mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Properly apply vertexOffset for builtin in indexed draws
This commit is contained in:
@@ -894,6 +894,14 @@ static void ConvertToMeshOutputCompute(const ShaderReflection &refl, const SPIRV
|
||||
if(builtin == ShaderBuiltin::VertexIndex)
|
||||
{
|
||||
valueID = vertexIndexID;
|
||||
// although for indexed draws we accounted for vertexOffset when looking up fixed
|
||||
// function vertex inputs, we still need to apply it to the VertexIndex builtin here.
|
||||
if(draw->flags & DrawFlags::Indexed)
|
||||
{
|
||||
valueID =
|
||||
ops.add(rdcspv::OpIAdd(uint32ID, editor.MakeId(), valueID,
|
||||
editor.AddConstantImmediate<uint32_t>(draw->vertexOffset)));
|
||||
}
|
||||
}
|
||||
else if(builtin == ShaderBuiltin::InstanceIndex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user