summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-02-10 23:02:56 -0800
committerKenneth Graunke <[email protected]>2017-02-12 21:09:25 -0800
commit57dc6d80a0dab253ef8e8543810e5384b01f41f7 (patch)
tree980314bfbf561becd088c6468b43a448c4d6e52b /src/compiler/glsl/linker.cpp
parent1fad070f96596ab1c0d888d2e676b6425a48825b (diff)
glsl: Drop resize-to-MaxPatchVertices hack.
TCS and TES inputs without an array size are implicitly sized to gl_MaxPatchVertices. But TCS outputs are apparently not: "If no size is specified, it will be taken from the output patch size (gl_VerticesOut) declared in the shader." Fixes dEQP-GLES31.functional.program_interface_query.program_output. array_size.separable_tess_ctrl.var. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4c7bf282ce1..b3c7d2c1456 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3709,17 +3709,6 @@ create_shader_variable(struct gl_shader_program *shProg,
return out;
}
-static const glsl_type *
-resize_to_max_patch_vertices(const struct gl_context *ctx,
- const glsl_type *type)
-{
- if (!type)
- return NULL;
-
- return glsl_type::get_array_instance(type->fields.array,
- ctx->Const.MaxPatchVertices);
-}
-
static bool
add_shader_variable(const struct gl_context *ctx,
struct gl_shader_program *shProg,
@@ -3733,27 +3722,6 @@ add_shader_variable(const struct gl_context *ctx,
const glsl_type *interface_type = var->get_interface_type();
if (outermost_struct_type == NULL) {
- /* Unsized (non-patch) TCS output/TES input arrays are implicitly
- * sized to gl_MaxPatchVertices. Internally, we shrink them to a
- * smaller size.
- *
- * This can cause trouble with SSO programs. Since the TCS declares
- * the number of output vertices, we can always shrink TCS output
- * arrays. However, the TES might not be linked with a TCS, in
- * which case it won't know the size of the patch. In other words,
- * the TCS and TES may disagree on the (smaller) array sizes. This
- * can result in the resource names differing across stages, causing
- * SSO validation failures and other cascading issues.
- *
- * Expanding the array size to the full gl_MaxPatchVertices fixes
- * these issues. It's also what program interface queries expect,
- * as that is the official size of the array.
- */
- if (var->data.tess_varying_implicit_sized_array) {
- type = resize_to_max_patch_vertices(ctx, type);
- interface_type = resize_to_max_patch_vertices(ctx, interface_type);
- }
-
if (var->data.from_named_ifc_block) {
const char *interface_name = interface_type->name;