Commit 89bda977 authored by Ilia Mirkin's avatar Ilia Mirkin

st/mesa: add GL_ARB_shader_draw_parameters support

Hooks up the new system values, passes the drawid in.
Signed-off-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: default avatarRoland Scheidegger <sroland@vmware.com>
parent daaf0bdf
...@@ -266,6 +266,7 @@ st_draw_vbo(struct gl_context *ctx, ...@@ -266,6 +266,7 @@ st_draw_vbo(struct gl_context *ctx,
info.instance_count = prims[i].num_instances; info.instance_count = prims[i].num_instances;
info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices; info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
info.index_bias = prims[i].basevertex; info.index_bias = prims[i].basevertex;
info.drawid = prims[i].draw_id;
if (!ib) { if (!ib) {
info.min_index = info.start; info.min_index = info.start;
info.max_index = info.start + info.count - 1; info.max_index = info.start + info.count - 1;
......
...@@ -454,6 +454,7 @@ void st_init_extensions(struct pipe_screen *screen, ...@@ -454,6 +454,7 @@ void st_init_extensions(struct pipe_screen *screen,
{ o(ARB_pipeline_statistics_query), PIPE_CAP_QUERY_PIPELINE_STATISTICS }, { o(ARB_pipeline_statistics_query), PIPE_CAP_QUERY_PIPELINE_STATISTICS },
{ o(ARB_point_sprite), PIPE_CAP_POINT_SPRITE }, { o(ARB_point_sprite), PIPE_CAP_POINT_SPRITE },
{ o(ARB_seamless_cube_map), PIPE_CAP_SEAMLESS_CUBE_MAP }, { o(ARB_seamless_cube_map), PIPE_CAP_SEAMLESS_CUBE_MAP },
{ o(ARB_shader_draw_parameters), PIPE_CAP_DRAW_PARAMETERS },
{ o(ARB_shader_stencil_export), PIPE_CAP_SHADER_STENCIL_EXPORT }, { o(ARB_shader_stencil_export), PIPE_CAP_SHADER_STENCIL_EXPORT },
{ o(ARB_shader_texture_image_samples), PIPE_CAP_TGSI_TXQS }, { o(ARB_shader_texture_image_samples), PIPE_CAP_TGSI_TXQS },
{ o(ARB_shader_texture_lod), PIPE_CAP_SM3 }, { o(ARB_shader_texture_lod), PIPE_CAP_SM3 },
......
...@@ -4328,8 +4328,8 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = { ...@@ -4328,8 +4328,8 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
TGSI_SEMANTIC_INSTANCEID, TGSI_SEMANTIC_INSTANCEID,
TGSI_SEMANTIC_VERTEXID_NOBASE, TGSI_SEMANTIC_VERTEXID_NOBASE,
TGSI_SEMANTIC_BASEVERTEX, TGSI_SEMANTIC_BASEVERTEX,
0, /* SYSTEM_VALUE_BASE_INSTANCE */ TGSI_SEMANTIC_BASEINSTANCE,
0, /* SYSTEM_VALUE_DRAW_ID */ TGSI_SEMANTIC_DRAWID,
/* Geometry shader /* Geometry shader
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment