On 09/15/2017 04:56 PM, Juan A. Suarez Romero wrote:
On Fri, 2017-09-15 at 13:04 +0200, Juan A. Suarez Romero wrote:
On Fri, 2017-09-15 at 12:47 +0200, Samuel Pitoiset wrote:
I guess this will break some piglits.



Right. I'll check them and provide fixes


After running piglit with and without this patch, I didn't find any
regression. So it seems no piglit test is affected.

That's quite bad. You might want to add some piglit tests for this.

Also, you probably have to update some code around write_only/read_only to reflect that change, for example in ast_process_struct_or_iface_block_members.


        J.A.


Thanks.

        J.A.



On 09/15/2017 10:49 AM, Juan A. Suarez Romero wrote:
In GLSL ES 3.10 session 4.9 [Memory Access Qualifiers], it has the following 
description:

"A variable could be qualified as both readonly and writeonly, disallowing both 
read and write, but still be passed to
imageSize() to have the size queried.".

This is for image variable, but not for buffer variables.

According to https://github.com/KhronosGroup/OpenGL-API/issues/7 Khronos
intent is to allow both readonly and writeonly in buffer variables, and
as such it will update the GLSL specification.

This commit address this issue, and fixes:

KHR-GL{43,44,45}.shader_storage_buffer_object.basic-readonly-writeonly
KHR-GLES31.core.shader_storage_buffer_object.basic-readonly-writeonly
---
   src/compiler/glsl/ast_to_hir.cpp | 5 -----
   1 file changed, 5 deletions(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 45c8ca2a5d..1a94c274b6 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -7254,11 +7254,6 @@ ast_process_struct_or_iface_block_members(exec_list 
*instructions,
               validate_matrix_layout_for_type(state, &loc, decl_type, NULL);
         }
- if (qual->flags.q.read_only && qual->flags.q.write_only) {
-         _mesa_glsl_error(&loc, state, "buffer variable can't be both "
-                          "readonly and writeonly.");
-      }
-
         foreach_list_typed (ast_declaration, decl, link,
                             &decl_list->declarations) {
            YYLTYPE loc = decl->get_location();




_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to