summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-03-10 19:15:32 -0800
committerJason Ekstrand <[email protected]>2016-05-27 15:18:11 -0700
commitfb2a5ceb3264123e94a5e3f4d92cf6ec605e76e8 (patch)
treed392b6dd9058588b9af10359c038a2b3190a7a3d /src/intel/vulkan/genX_state.c
parent3a83c176eab8c513eb723554a240af1a7308d701 (diff)
anv: Emit DRAWING_RECTANGLE once at driver initialization
Also, we don't actually need it for clipping because meta always colors inside the lines and, for all other operations, the user is required to set a scissor. Since DRAWING_RECTANGLE stalls the GPU, we want to emit it as little as possible. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_state.c')
-rw-r--r--src/intel/vulkan/genX_state.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c
index a53555cbed9..f67b0a7cb51 100644
--- a/src/intel/vulkan/genX_state.c
+++ b/src/intel/vulkan/genX_state.c
@@ -61,6 +61,15 @@ genX(init_device_state)(struct anv_device *device)
anv_batch_emit(&batch, GENX(3DSTATE_STREAMOUT), so);
anv_batch_emit(&batch, GENX(3DSTATE_AA_LINE_PARAMETERS), aa);
+ anv_batch_emit(&batch, GENX(3DSTATE_DRAWING_RECTANGLE), rect) {
+ rect.ClippedDrawingRectangleYMin = 0;
+ rect.ClippedDrawingRectangleXMin = 0;
+ rect.ClippedDrawingRectangleYMax = UINT16_MAX;
+ rect.ClippedDrawingRectangleXMax = UINT16_MAX;
+ rect.DrawingRectangleOriginY = 0;
+ rect.DrawingRectangleOriginX = 0;
+ }
+
#if GEN_GEN >= 8
anv_batch_emit(&batch, GENX(3DSTATE_WM_CHROMAKEY), ck);