mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
glsl: Mark 'in' variables at global scope as read-only
Fixes Piglit tests:
spec/glsl-1.30/compiler/storage-qualifiers/static-write-centroid-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-02.frag
(cherry picked from commit 01a584d093)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
3ddf406530
commit
13711c8a5a
1 changed files with 2 additions and 1 deletions
|
|
@ -1651,7 +1651,6 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
|||
}
|
||||
}
|
||||
|
||||
/* FINISHME: Mark 'in' variables at global scope as read-only. */
|
||||
if (qual->constant || qual->attribute || qual->uniform
|
||||
|| (qual->varying && (state->target == fragment_shader)))
|
||||
var->read_only = 1;
|
||||
|
|
@ -1940,6 +1939,8 @@ ast_declarator_list::hir(exec_list *instructions,
|
|||
mode, var->name, extra);
|
||||
}
|
||||
} else if (var->mode == ir_var_in) {
|
||||
var->read_only = true;
|
||||
|
||||
if (state->target == vertex_shader) {
|
||||
bool error_emitted = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue