i965: Add support for gl_DrawIDARB and enable extension

Graphics / Mesa 3D Graphics Library / Mesa - Kristian Høgsberg Kristensen [bitplanet.net] - 29 December 2015 12:39 UTC

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.

cddfc2c i965: Add support for gl_DrawIDARB and enable extension
src/mesa/drivers/dri/i965/brw_compiler.h | 1 +
src/mesa/drivers/dri/i965/brw_context.h | 9 +++++
src/mesa/drivers/dri/i965/brw_draw.c | 12 ++++++
src/mesa/drivers/dri/i965/brw_draw_upload.c | 45 ++++++++++++++++++++-
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 10 ++++-
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 10 +++++
src/mesa/drivers/dri/i965/brw_vec4.cpp | 13 +++++-
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 8 ++++
src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp | 5 +++
src/mesa/drivers/dri/i965/gen8_draw_upload.c | 34 +++++++++++++++-
src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
12 files changed, 145 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share