diff options
author | Ilia Mirkin <[email protected]> | 2020-04-10 23:46:08 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2020-04-15 20:12:48 -0400 |
commit | cd092bf937020984d6008f93eb0d15d647c112c5 (patch) | |
tree | 17f79f6832947b98a2daa25dc987c6eee83e2684 /src/mesa | |
parent | b0d0a3c916595860749220bcb3a4b1cc408ddd34 (diff) |
st/mesa: add support for GL_NV_viewport_array2
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index f6fc615d224..11b0ce6ec55 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -125,7 +125,8 @@ static void check_program_state( struct st_context *st ) struct gl_program *last_prim_shader = new_gp ? new_gp : new_tep ? new_tep : new_vp; if (last_prim_shader && - last_prim_shader->info.outputs_written & VARYING_BIT_VIEWPORT) + last_prim_shader->info.outputs_written & ( + VARYING_BIT_VIEWPORT | VARYING_BIT_VIEWPORT_MASK)) num_viewports = ctx->Const.MaxViewports; if (st->state.num_viewports != num_viewports) { diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 9db85a077f6..97ab11f41d4 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -804,6 +804,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(NV_primitive_restart), PIPE_CAP_PRIMITIVE_RESTART }, { o(NV_shader_atomic_float), PIPE_CAP_TGSI_ATOMFADD }, { o(NV_texture_barrier), PIPE_CAP_TEXTURE_BARRIER }, + { o(NV_viewport_array2), PIPE_CAP_VIEWPORT_MASK }, { o(NV_viewport_swizzle), PIPE_CAP_VIEWPORT_SWIZZLE }, { o(NVX_gpu_memory_info), PIPE_CAP_QUERY_MEMORY_INFO }, /* GL_NV_point_sprite is not supported by gallium because we don't diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 254f966b4e3..a9a824f7bda 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6832,6 +6832,9 @@ st_translate_program( emit_compute_block_size(proginfo, ureg); } + if (program->shader->Program->info.layer_viewport_relative) + ureg_property(ureg, TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE, 1); + /* Declare address register. */ if (program->num_address_regs > 0) { |