Module: Mesa
Branch: staging/23.0
Commit: 530c9bdce56a3db2947609270a5c3b4551ad1f87
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=530c9bdce56a3db2947609270a5c3b4551ad1f87

Author: Timothy Arceri <[email protected]>
Date:   Wed Mar 15 15:18:46 2023 +1100

glsl: allow 64-bit integer on RHS of shift

Fixes: 9ba9a7f854dd ("glsl: Add 64-bit integer support to some operations.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6862

Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21919>
(cherry picked from commit 174d6e6a545c03a9ac2a14287fae0071a79c1cda)

---

 .pick_status.json                 | 2 +-
 src/compiler/glsl/ast_to_hir.cpp  | 2 +-
 src/compiler/glsl/ir_validate.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cd564bf79c9..eec76ddd648 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -5008,7 +5008,7 @@
         "description": "glsl: allow 64-bit integer on RHS of shift",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "9ba9a7f854dd702364d0aaa02cb7fbf44aea5888"
     },
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index a61fe1d56d9..7831d5af5d0 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -747,7 +747,7 @@ shift_result_type(const struct glsl_type *type_a,
      return glsl_type::error_type;
 
    }
-   if (!type_b->is_integer_32()) {
+   if (!type_b->is_integer_32_64()) {
       _mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or "
                        "integer vector", ast_expression::operator_string(op));
      return glsl_type::error_type;
diff --git a/src/compiler/glsl/ir_validate.cpp 
b/src/compiler/glsl/ir_validate.cpp
index 2e120db4ea8..decb4d20a0e 100644
--- a/src/compiler/glsl/ir_validate.cpp
+++ b/src/compiler/glsl/ir_validate.cpp
@@ -805,7 +805,7 @@ ir_validate::visit_leave(ir_expression *ir)
    case ir_binop_lshift:
    case ir_binop_rshift:
       assert(ir->operands[0]->type->is_integer_16_32_64() &&
-             ir->operands[1]->type->is_integer_16_32());
+             ir->operands[1]->type->is_integer_16_32_64());
       if (ir->operands[0]->type->is_scalar()) {
           assert(ir->operands[1]->type->is_scalar());
       }

Reply via email to