Commit cd092bf9 authored by Ilia Mirkin's avatar Ilia Mirkin

st/mesa: add support for GL_NV_viewport_array2

Signed-off-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!4529>
parent b0d0a3c9
......@@ -139,6 +139,10 @@ tgsi_get_gl_varying_semantic(gl_varying_slot attr,
*semantic_name = TGSI_SEMANTIC_TESSINNER;
*semantic_index = 0;
break;
case VARYING_SLOT_VIEWPORT_MASK:
*semantic_name = TGSI_SEMANTIC_VIEWPORT_MASK;
*semantic_index = 0;
break;
case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1:
......
......@@ -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) {
......
......@@ -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
......
......@@ -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) {
......
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