i965/blorp: Reduce the urb size requirement for vertex buffer
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 19 Apr 2016 17:08:55 +0000 (20:08 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 21 Apr 2016 07:20:03 +0000 (10:20 +0300)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen7_blorp.cpp

index e1e855951f878c9f8f5b8c2ade188dc7513d3004..414ec9ccfb656edf9a6d71f933005b3b46ae2255 100644 (file)
@@ -37,11 +37,10 @@ gen7_blorp_skip_urb_config(const struct brw_context *brw)
    if (brw->ctx.NewDriverState & (BRW_NEW_CONTEXT | BRW_NEW_URB_SIZE))
       return false;
 
-   /* Vertex elements along with full VUE header take 96 bytes. As the size
-    * is expressed in 64 bytes, one needs at least two times that, otherwise
-    * the setup can be any valid configuration.
+   /* Vertex buffer takes 24 bytes. As the size is expressed in 64 bytes,
+    * one will suffice, otherwise the setup can be any valid configuration.
     */
-   return brw->urb.vsize >= 2;
+   return brw->urb.vsize > 0;
 }
 
 /* 3DSTATE_URB_VS
@@ -66,7 +65,7 @@ gen7_blorp_emit_urb_config(struct brw_context *brw)
    const unsigned push_constant_bytes = 1024 * urb_size;
    const unsigned push_constant_chunks =
       push_constant_bytes / chunk_size_bytes;
-   const unsigned vs_size = 2;
+   const unsigned vs_size = 1;
    const unsigned vs_start = push_constant_chunks;
    const unsigned vs_chunks =
       DIV_ROUND_UP(brw->urb.min_vs_entries * vs_size * 64, chunk_size_bytes);