Skip to content

d3d12: Only set draw params root parameter index for actual draw params

Jesse Natalie requested to merge jenatali/mesa:draw-params-fix into main

Otherwise, in a pipeline where multiple shaders have state vars (bound as root constants), the VS will tag the command signature as needing draw args, and then the last shader with state vars will have its root param index stored in the key. That means that later, when the indirect draw is done, the draw args will be sent to the wrong shader stage / state var, overwriting data and leaving the actual draw args with stale or incorrect data.

This was causing a Blender rendering issue in a pipeline where a GS variant was inserted. The GS was receiving the draw args instead of its needed state var.

Edited by Jesse Natalie

Merge request reports