mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 07:50:35 +01:00
dzn: Don't set view instancing mask until after the PSO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27286>
This commit is contained in:
parent
86b5c9278c
commit
fa1c9618f9
1 changed files with 8 additions and 2 deletions
|
|
@ -3109,6 +3109,7 @@ dzn_cmd_buffer_update_pipeline(struct dzn_cmd_buffer *cmdbuf, uint32_t bindpoint
|
|||
ID3D12PipelineState *old_pipeline_state =
|
||||
cmdbuf->state.pipeline ? cmdbuf->state.pipeline->state : NULL;
|
||||
|
||||
uint32_t view_instance_mask = 0;
|
||||
if (cmdbuf->state.bindpoint[bindpoint].dirty & DZN_CMD_BINDPOINT_DIRTY_PIPELINE) {
|
||||
if (cmdbuf->state.bindpoint[bindpoint].root_sig != pipeline->root.sig) {
|
||||
cmdbuf->state.bindpoint[bindpoint].root_sig = pipeline->root.sig;
|
||||
|
|
@ -3144,9 +3145,9 @@ dzn_cmd_buffer_update_pipeline(struct dzn_cmd_buffer *cmdbuf, uint32_t bindpoint
|
|||
ID3D12GraphicsCommandList1_IASetPrimitiveTopology(cmdbuf->cmdlist, gfx->ia.topology);
|
||||
dzn_graphics_pipeline_get_state(gfx, &cmdbuf->state.pipeline_variant);
|
||||
if (gfx->multiview.native_view_instancing)
|
||||
ID3D12GraphicsCommandList1_SetViewInstanceMask(cmdbuf->cmdlist, gfx->multiview.view_mask);
|
||||
view_instance_mask = gfx->multiview.view_mask;
|
||||
else
|
||||
ID3D12GraphicsCommandList1_SetViewInstanceMask(cmdbuf->cmdlist, 1);
|
||||
view_instance_mask = 1;
|
||||
|
||||
if (gfx->zsa.dynamic_depth_bias && gfx->use_gs_for_polygon_mode_point)
|
||||
cmdbuf->state.bindpoint[bindpoint].dirty |= DZN_CMD_BINDPOINT_DIRTY_SYSVALS;
|
||||
|
|
@ -3159,6 +3160,11 @@ dzn_cmd_buffer_update_pipeline(struct dzn_cmd_buffer *cmdbuf, uint32_t bindpoint
|
|||
ID3D12GraphicsCommandList1_SetPipelineState(cmdbuf->cmdlist, pipeline->state);
|
||||
cmdbuf->state.pipeline = pipeline;
|
||||
}
|
||||
|
||||
/* Deferring this until after the pipeline has been set due to an NVIDIA driver bug
|
||||
* when view instancing mask is set with no pipeline bound. */
|
||||
if (view_instance_mask)
|
||||
ID3D12GraphicsCommandList1_SetViewInstanceMask(cmdbuf->cmdlist, view_instance_mask);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue