diff options
author | Ilia Mirkin <[email protected]> | 2015-12-29 16:39:16 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-12-30 16:55:56 -0500 |
commit | 89bda9772d5b6f736d5f18e90a1ee4056438fe42 (patch) | |
tree | 4e94bf3b1d407cbc382bce7bb9b5f71423d75fcf /src/mesa/state_tracker | |
parent | daaf0bdf46bc5084bdba1ee5d42d994f30a65841 (diff) |
st/mesa: add GL_ARB_shader_draw_parameters support
Hooks up the new system values, passes the drawid in.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index f4b273bf93f..635a0126834 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -266,6 +266,7 @@ st_draw_vbo(struct gl_context *ctx, info.instance_count = prims[i].num_instances; info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices; info.index_bias = prims[i].basevertex; + info.drawid = prims[i].draw_id; if (!ib) { info.min_index = info.start; info.max_index = info.start + info.count - 1; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index a2418e28a91..a0168d8e408 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -454,6 +454,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(ARB_pipeline_statistics_query), PIPE_CAP_QUERY_PIPELINE_STATISTICS }, { o(ARB_point_sprite), PIPE_CAP_POINT_SPRITE }, { 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_texture_image_samples), PIPE_CAP_TGSI_TXQS }, { o(ARB_shader_texture_lod), PIPE_CAP_SM3 }, diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 5a6be08185f..160838c498e 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4328,8 +4328,8 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = { TGSI_SEMANTIC_INSTANCEID, TGSI_SEMANTIC_VERTEXID_NOBASE, TGSI_SEMANTIC_BASEVERTEX, - 0, /* SYSTEM_VALUE_BASE_INSTANCE */ - 0, /* SYSTEM_VALUE_DRAW_ID */ + TGSI_SEMANTIC_BASEINSTANCE, + TGSI_SEMANTIC_DRAWID, /* Geometry shader */ |