diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-12-10 12:27:38 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-12-29 10:39:25 -0800 |
commit | cddfc2cefa93b884c40329dcb193fe4fb22143ab (patch) | |
tree | 5f7de35cd73cbdcccb772524b8b80e08612c2c0c /src/mesa/drivers/dri/i965/brw_context.h | |
parent | 17ebb55a14b5a9aa639845fbda9330ef9421834a (diff) |
i965: Add support for gl_DrawIDARB and enable extension
We have to break open a new vec4 for gl_DrawIDARB. We've used up all
space in the vec4 we use for SGVS and gl_DrawIDARB has to come from its
own separate vertex buffer anyway. This is because we point the vb for
base vertex and base instance into the draw parameter BO for indirect
draw calls, but the draw id is generated by mesa in a different buffer.
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 4cbe585cd56..7b0340fc2ab 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -923,6 +923,15 @@ struct brw_context */ drm_intel_bo *draw_params_bo; uint32_t draw_params_offset; + + /** + * The value of gl_DrawID for the current _mesa_prim. This always comes + * in from it's own vertex buffer since it's not part of the indirect + * draw parameters. + */ + int gl_drawid; + drm_intel_bo *draw_id_bo; + uint32_t draw_id_offset; } draw; struct { |