anv/cmd_buffer: Use the new emit macro for DRAWING_RECTANGLE
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Apr 2016 22:14:47 +0000 (15:14 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Apr 2016 21:54:09 +0000 (14:54 -0700)
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
src/intel/vulkan/genX_cmd_buffer.c

index 4a75825e4711713e4197140a0081c9774f6582b3..abf096133a58f8f443b97b0ccb684cf53e5f8c55 100644 (file)
@@ -1058,15 +1058,16 @@ void genX(CmdBeginRenderPass)(
 
    const VkRect2D *render_area = &pRenderPassBegin->renderArea;
 
-   anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_DRAWING_RECTANGLE),
-                  .ClippedDrawingRectangleYMin = MAX2(render_area->offset.y, 0),
-                  .ClippedDrawingRectangleXMin = MAX2(render_area->offset.x, 0),
-                  .ClippedDrawingRectangleYMax =
-                     render_area->offset.y + render_area->extent.height - 1,
-                  .ClippedDrawingRectangleXMax =
-                     render_area->offset.x + render_area->extent.width - 1,
-                  .DrawingRectangleOriginY = 0,
-                  .DrawingRectangleOriginX = 0);
+   anv_batch_emit_blk(&cmd_buffer->batch, GENX(3DSTATE_DRAWING_RECTANGLE), r) {
+      r.ClippedDrawingRectangleYMin = MAX2(render_area->offset.y, 0);
+      r.ClippedDrawingRectangleXMin = MAX2(render_area->offset.x, 0);
+      r.ClippedDrawingRectangleYMax =
+         render_area->offset.y + render_area->extent.height - 1;
+      r.ClippedDrawingRectangleXMax =
+         render_area->offset.x + render_area->extent.width - 1;
+      r.DrawingRectangleOriginY     = 0;
+      r.DrawingRectangleOriginX     = 0;
+   }
 
    genX(cmd_buffer_set_subpass)(cmd_buffer, pass->subpasses);
    anv_cmd_buffer_clear_subpass(cmd_buffer);