glsl: do not make sampler/image types readonly variables
In plain GLSL, sampler and image types can only be declared uniform-qualified global variables or 'in' function parameters. Setting the read_only flag seems quite useless because other checks will prevent sampler/image variables to be assigned and also because the flag is not set for atomic_uint types which are opaque types. This will also help for ARB_bindless_texture because samplers and images can be assigned when they are considered bindless. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -1731,9 +1731,6 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
|
||||
this->data.fb_fetch_output = false;
|
||||
|
||||
if (type != NULL) {
|
||||
if (type->is_sampler())
|
||||
this->data.read_only = true;
|
||||
|
||||
if (type->is_interface())
|
||||
this->init_interface_type(type);
|
||||
else if (type->without_array()->is_interface())
|
||||
|
||||
Reference in New Issue
Block a user