graphics: fix vertex and instance IDs for unpatched indirect draws

This commit is contained in:
nmzik committed 2026-10-28 04:33:03 +01:00
1 parent 1be1c6c4f9
commit a833e1b735
10 files changed
+72 -46

No files matched your search

@@ -689,6 +689,7 @@ void PipelineCache::GetGraphicsPrograms(const CommandBuffer& command, DrawRender
const bool mesh_active = vertex_info[0].logical_stage == ShaderType::Mesh;
if (!tess_active && !mesh_active) {
vertex_info[0].indirect_offsets = state.indirect_offsets;
vertex_info[0].indirect_draw = state.indirect_draw;
}
if (object_primitive_id) {
// CxObjectIdMode: register source plus a 32-bit pipelined primitive-ID addition.
@@ -139,6 +139,7 @@ struct DrawRenderState {
ShaderPixelInputInfo ps_input_info;
// Input: the user-data slots a GPU-read indirect draw patches.
ShaderIndirectOffsets indirect_offsets;
bool indirect_draw = false;
[[nodiscard]] std::span<const ShaderVertexInputInfo> VertexStages() const {
return {vertex_info.data(), vertex_info[1].stage ? 3u : 1u};