The assumption is that any driver capable of emitting layer from the
vertex shader and supporting viewports should be able to also handle
emitting viewport index from the vertex shader.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tobias Droste <tdroste@gmx.de>
<li>GL_ARB_viewport_array on nvc0</li>
<li>GL_ARB_seamless_cubemap_per_texture on i965, llvmpipe, nvc0, r600, radeonsi, softpipe</li>
<li>GL_ARB_fragment_layer_viewport on nv50, nvc0, llvmpipe, r600</li>
-<li>GL_AMD_vertex_shader_viewport_index on i965/gen7+</li>
+<li>GL_AMD_vertex_shader_viewport_index on i965/gen7+, r600</li>
</ul>
ctx->Const.ViewportBounds.Max = 16384.0;
ctx->Extensions.ARB_viewport_array = GL_TRUE;
ctx->Extensions.ARB_fragment_layer_viewport = GL_TRUE;
+ if (ctx->Extensions.AMD_vertex_shader_layer)
+ ctx->Extensions.AMD_vertex_shader_viewport_index = GL_TRUE;
}
}
if (ctx->Const.MaxProgramTextureGatherComponents > 0)
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_LAYER;
stvp->output_semantic_index[slot] = 0;
break;
+ case VARYING_SLOT_VIEWPORT:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_VIEWPORT_INDEX;
+ stvp->output_semantic_index[slot] = 0;
+ break;
case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1: