d3d12: Bind 16 scissor rects when scissor disabled

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14881>
This commit is contained in:
Jesse Natalie
2022-02-04 06:16:56 -08:00
committed by Marge Bot
parent 929985893a
commit bafa0e0369
+9 -1
View File
@@ -49,6 +49,14 @@ static const D3D12_RECT MAX_SCISSOR = { D3D12_VIEWPORT_BOUNDS_MIN,
D3D12_VIEWPORT_BOUNDS_MAX,
D3D12_VIEWPORT_BOUNDS_MAX };
static const D3D12_RECT MAX_SCISSOR_ARRAY[] = {
MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR,
MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR,
MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR,
MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR, MAX_SCISSOR
};
static_assert(ARRAY_SIZE(MAX_SCISSOR_ARRAY) == PIPE_MAX_VIEWPORTS, "Wrong scissor count");
static D3D12_GPU_DESCRIPTOR_HANDLE
fill_cbv_descriptors(struct d3d12_context *ctx,
struct d3d12_shader *shader,
@@ -1075,7 +1083,7 @@ d3d12_draw_vbo(struct pipe_context *pctx,
if (ctx->gfx_pipeline_state.rast->base.scissor && ctx->num_viewports > 0)
ctx->cmdlist->RSSetScissorRects(ctx->num_viewports, ctx->scissors);
else
ctx->cmdlist->RSSetScissorRects(1, &MAX_SCISSOR);
ctx->cmdlist->RSSetScissorRects(PIPE_MAX_VIEWPORTS, MAX_SCISSOR_ARRAY);
}
if (ctx->cmdlist_dirty & D3D12_DIRTY_BLEND_COLOR) {