Module: Mesa
Branch: staging/23.3
Commit: 6fa1ab1ad0d7184945831081fd9b9a4a5a38e050
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fa1ab1ad0d7184945831081fd9b9a4a5a38e050

Author: Rhys Perry <pendingchao...@gmail.com>
Date:   Tue Jan  2 12:44:24 2024 +0000

aco/tests: use more raw strings

Python 3.12 started giving a SyntaxWarning for unrecognized escapes such
as "\w". This might become a SyntaxError in a future python version.

Signed-off-by: Rhys Perry <pendingchao...@gmail.com>
Reviewed-by: Georg Lehmann <dadschoo...@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26850>
(cherry picked from commit cad2c0915d60b2f217aa228e8c4c53d1abf65c21)

---

 .pick_status.json                      | 2 +-
 src/amd/compiler/tests/glsl_scraper.py | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index e9348352626..f8688403255 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -204,7 +204,7 @@
         "description": "aco/tests: use more raw strings",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null
diff --git a/src/amd/compiler/tests/glsl_scraper.py 
b/src/amd/compiler/tests/glsl_scraper.py
index 291b33958f4..3167d7cf614 100644
--- a/src/amd/compiler/tests/glsl_scraper.py
+++ b/src/amd/compiler/tests/glsl_scraper.py
@@ -28,16 +28,16 @@ stage_to_glslang_stage = {
 }
 
 base_layout_qualifier_id_re = r'({0}\s*=\s*(?P<{0}>\d+))'
-id_re = '(?P<name_%d>[^(gl_)]\w+)'
-type_re = '(?P<dtype_%d>\w+)'
+id_re = r'(?P<name_%d>[^(gl_)]\w+)'
+type_re = r'(?P<dtype_%d>\w+)'
 location_re = base_layout_qualifier_id_re.format('location')
 component_re = base_layout_qualifier_id_re.format('component')
 binding_re = base_layout_qualifier_id_re.format('binding')
 set_re = base_layout_qualifier_id_re.format('set')
 unk_re = r'\w+(=\d+)?'
 layout_qualifier_re = r'layout\W*\((%s)+\)' % '|'.join([location_re, 
binding_re, set_re, unk_re, '[, ]+'])
-ubo_decl_re = 'uniform\W+%s(\W*{)?(?P<type_ubo>)' % (id_re%0)
-ssbo_decl_re = 'buffer\W+%s(\W*{)?(?P<type_ssbo>)' % (id_re%1)
+ubo_decl_re = r'uniform\W+%s(\W*{)?(?P<type_ubo>)' % (id_re%0)
+ssbo_decl_re = r'buffer\W+%s(\W*{)?(?P<type_ssbo>)' % (id_re%1)
 image_buffer_decl_re = r'uniform\W+imageBuffer\w+%s;(?P<type_img_buf>)' % 
(id_re%2)
 image_decl_re = r'uniform\W+image\w+\W+%s;(?P<type_img>)' % (id_re%3)
 texture_buffer_decl_re = r'uniform\W+textureBuffer\w+%s;(?P<type_tex_buf>)' % 
(id_re%4)

Reply via email to