mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
d3d12: Handle indirect twoface draws
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
This commit is contained in:
parent
3dd292703b
commit
a4894fcbfc
1 changed files with 3 additions and 2 deletions
|
|
@ -631,11 +631,12 @@ static void
|
|||
twoface_emulation(struct d3d12_context *ctx,
|
||||
struct d3d12_rasterizer_state *rast,
|
||||
const struct pipe_draw_info *dinfo,
|
||||
const struct pipe_draw_indirect_info *indirect,
|
||||
const struct pipe_draw_start_count_bias *draw)
|
||||
{
|
||||
/* draw backfaces */
|
||||
ctx->base.bind_rasterizer_state(&ctx->base, rast->twoface_back);
|
||||
d3d12_draw_vbo(&ctx->base, dinfo, 0, NULL, draw, 1);
|
||||
d3d12_draw_vbo(&ctx->base, dinfo, 0, indirect, draw, 1);
|
||||
|
||||
/* restore real state */
|
||||
ctx->base.bind_rasterizer_state(&ctx->base, rast);
|
||||
|
|
@ -760,7 +761,7 @@ d3d12_draw_vbo(struct pipe_context *pctx,
|
|||
struct d3d12_rasterizer_state *rast = ctx->gfx_pipeline_state.rast;
|
||||
if (rast->twoface_back) {
|
||||
enum pipe_prim_type saved_mode = ctx->initial_api_prim;
|
||||
twoface_emulation(ctx, rast, dinfo, &draws[0]);
|
||||
twoface_emulation(ctx, rast, dinfo, indirect, &draws[0]);
|
||||
ctx->initial_api_prim = saved_mode;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue