aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_ddebug/dd_draw.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <[email protected]>2020-03-24 12:02:51 -0400
committerMarge Bot <[email protected]>2020-04-29 18:05:06 +0000
commit1c8bcad81a7ce106b37f1ee4a75b817651d6545e (patch)
tree89ce4e4e5cfb117422582b12c284f261b9944ba7 /src/gallium/auxiliary/driver_ddebug/dd_draw.c
parent882928dcaa2133fe07b73e7e962d50625c8e6a03 (diff)
gallium: add pipe cap for scissored clears and pass scissor state to clear() hook
this adds a new pipe cap that drivers can support which enables passing buffer clears with scissor test enabled through to be handled by the driver instead of having mesa draw a quad also adjust all existing clear() hooks to have the new parameter Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
Diffstat (limited to 'src/gallium/auxiliary/driver_ddebug/dd_draw.c')
-rw-r--r--src/gallium/auxiliary/driver_ddebug/dd_draw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c
index a0414a6cd5e..b93890f4f99 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c
+++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c
@@ -515,6 +515,9 @@ dd_dump_clear(struct dd_draw_state *dstate, struct call_clear *info, FILE *f)
{
fprintf(f, "%s:\n", __func__+8);
DUMP_M(uint, info, buffers);
+ fprintf(f, " scissor_state: %d,%d %d,%d\n",
+ info->scissor_state.minx, info->scissor_state.miny,
+ info->scissor_state.maxx, info->scissor_state.maxy);
DUMP_M_ADDR(color_union, info, color);
DUMP_M(double, info, depth);
DUMP_M(hex, info, stencil);
@@ -1478,7 +1481,7 @@ dd_context_flush_resource(struct pipe_context *_pipe,
}
static void
-dd_context_clear(struct pipe_context *_pipe, unsigned buffers,
+dd_context_clear(struct pipe_context *_pipe, unsigned buffers, const struct pipe_scissor_state *scissor_state,
const union pipe_color_union *color, double depth,
unsigned stencil)
{
@@ -1488,12 +1491,14 @@ dd_context_clear(struct pipe_context *_pipe, unsigned buffers,
record->call.type = CALL_CLEAR;
record->call.info.clear.buffers = buffers;
+ if (scissor_state)
+ record->call.info.clear.scissor_state = *scissor_state;
record->call.info.clear.color = *color;
record->call.info.clear.depth = depth;
record->call.info.clear.stencil = stencil;
dd_before_draw(dctx, record);
- pipe->clear(pipe, buffers, color, depth, stencil);
+ pipe->clear(pipe, buffers, scissor_state, color, depth, stencil);
dd_after_draw(dctx, record);
}