On 04/12/2017 12:21 PM, Samuel Pitoiset wrote:
On 04/12/2017 02:18 AM, Timothy Arceri wrote:
On 12/04/17 02:48, Samuel Pitoiset wrote:
Bindless images can be explicitely converted to and from uvec2
using scalar constructors.
Signed-off-by: Samuel Pitoiset <[email protected]>
---
src/compiler/glsl/ast_to_hir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/ast_to_hir.cpp
b/src/compiler/glsl/ast_to_hir.cpp
index f52ba8181a..bcdf212497 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -3411,7 +3411,7 @@ apply_image_qualifier_to_variable(const struct
ast_type_qualifier *qual,
var->data.image_coherent |= qual->flags.q.coherent;
var->data.image_volatile |= qual->flags.q._volatile;
var->data.image_restrict |= qual->flags.q.restrict_flag;
- var->data.read_only = true;
+ var->data.read_only = base_type->is_image();
if (qual->flags.q.explicit_image_format) {
if (var->data.mode == ir_var_function_in) {
Just curious. If we remove this what stops values being directly
assigned to images when not using the constructors?
do_assignment() doesn't allow image types to be assigned. For example,
this valid VS code doesn't pass without that patch.
layout (bindless_sampler) writeonly uniform image2D img;
flat out writeonly image2D image_vs;
void main()
{
image_vs = img;
}
because the spec allows to declare image types as shader inputs/outputs,
I guess they can be assigned.
However, the commit description *should* be updated.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev