* ``PIPE_CAP_MIXED_FRAMEBUFFER_SIZES``: Whether it is allowed to have
different sizes for fb color/zs attachments. This controls whether
ARB_framebuffer_object is provided.
+* ``PIPE_CAP_TGSI_VS_LAYER``: Whether TGSI_SEMANTIC_LAYER is supported
+ as a vertex shader output.
.. _pipe_capf:
case PIPE_CAP_USER_INDEX_BUFFERS:
case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
/* Stream output. */
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
return PIPE_ENDIAN_LITTLE;
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
return true;
+ case PIPE_CAP_TGSI_VS_LAYER:
+ return 0;
default:
return 0;
return PIPE_MAX_VIEWPORTS;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_NATIVE;
+ case PIPE_CAP_TGSI_VS_LAYER:
+ return 0;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+ case PIPE_CAP_TGSI_VS_LAYER:
+ return 0;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+ case PIPE_CAP_TGSI_VS_LAYER:
+ return 0;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
/* SWTCL-only features. */
case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
case PIPE_CAP_VERTEX_COLOR_CLAMPED:
case PIPE_CAP_USER_VERTEX_BUFFERS:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
/* Stream output. */
case PIPE_CAP_TGSI_INSTANCEID:
case PIPE_CAP_COMPUTE:
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 1;
case PIPE_CAP_TEXTURE_MULTISAMPLE:
return 1;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_NATIVE;
+ case PIPE_CAP_TGSI_VS_LAYER:
+ return 0;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
+ case PIPE_CAP_TGSI_VS_LAYER:
return 0;
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
return 1;
PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83,
PIPE_CAP_MAX_VIEWPORTS = 84,
PIPE_CAP_ENDIANNESS = 85,
- PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86
+ PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86,
+ PIPE_CAP_TGSI_VS_LAYER = 87
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
ctx->Const.ForceGLSLVersion = st->options.force_glsl_version;
}
+ /* This extension needs full OpenGL 3.2, but we don't know if that's
+ * supported at this point. Only check the GLSL version. */
+ if (ctx->Const.GLSLVersion >= 150 &&
+ screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER)) {
+ ctx->Extensions.AMD_vertex_shader_layer = GL_TRUE;
+ }
+
if (ctx->Const.GLSLVersion >= 130) {
ctx->Const.NativeIntegers = GL_TRUE;
ctx->Const.MaxClipPlanes = 8;
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPVERTEX;
stvp->output_semantic_index[slot] = 0;
break;
+ case VARYING_SLOT_LAYER:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_LAYER;
+ stvp->output_semantic_index[slot] = 0;
+ break;
case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1: