Issue 8597 in angleproject: Assert while using +gl_VertexID

0 views
Skip to first unread message

kkinn… via monorail

unread,
Mar 8, 2024, 7:43:59 AM3/8/24
to angleproj...@googlegroups.com
Status: Available
Owner: ----
Components: Translator
OS: Mac iOS
Priority: Medium
Renderer: Metal
Type: Defect

New issue 8597 by kkinn...@apple.com: Assert while using +gl_VertexID
https://bugs.chromium.org/p/angleproject/issues/detail?id=8597

+TEST_F(MSLVertexOutputTest, VertexIDIvecNoCrash)
+{
+ const char kShader[] = R"(#version 300 es
+void main(){ivec2 xy=ivec2((+gl_VertexID));gl_Position=vec4((xy), 0,1);})";
+ compile(kShader);
+}

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Git Watcher via monorail

unread,
Apr 4, 2024, 4:58:15 PM4/4/24
to angleproj...@googlegroups.com

Comment #1 on issue 8597 by Git Watcher: Assert while using +gl_VertexID
https://bugs.chromium.org/p/angleproject/issues/detail?id=8597#c1

The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/3b650ffa399b612be6406bbf2d2b13657dda2237

commit 3b650ffa399b612be6406bbf2d2b13657dda2237
Author: Erica Li <ler...@apple.com>
Date: Tue Mar 19 07:53:06 2024

Metal: Assert while using gl_VertexID as ivec

Metal [vertex_id] is uint while gl_VertexID is int. Replacing
gl_VertexID with gl_VertexIDMetal without rewrites of the expressions
would cause invalid expressions.

Fix by casting uint kgl_VertexIDMetal to int kgl_VertexID instead
of replacing variable during compile.

Bug: angleproject:8597
Change-Id: I76acdb2a0ab5982aa05181175925b3359068e901
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5376498
Reviewed-by: Alexey Knyazev <lexa.k...@gmail.com>
Auto-Submit: Kimmo Kinnunen <kkin...@apple.com>
Commit-Queue: Kenneth Russell <k...@chromium.org>
Reviewed-by: Kenneth Russell <k...@chromium.org>

[modify] https://crrev.com/3b650ffa399b612be6406bbf2d2b13657dda2237/src/compiler/translator/msl/RewritePipelines.cpp
[modify] https://crrev.com/3b650ffa399b612be6406bbf2d2b13657dda2237/src/tests/compiler_tests/MSLOutput_test.cpp
[modify] https://crrev.com/3b650ffa399b612be6406bbf2d2b13657dda2237/src/libANGLE/renderer/metal/mtl_msl_utils.mm
[modify] https://crrev.com/3b650ffa399b612be6406bbf2d2b13657dda2237/src/compiler/translator/msl/TranslatorMSL.cpp
[modify] https://crrev.com/3b650ffa399b612be6406bbf2d2b13657dda2237/src/compiler/translator/tree_ops/msl/IntroduceVertexIndexID.cpp

kkinn… via monorail

unread,
May 14, 2024, 4:33:44 AM5/14/24
to angleproj...@googlegroups.com
Updates:
Status: Verified

Comment #2 on issue 8597 by kkinn...@apple.com: Assert while using +gl_VertexID
https://bugs.chromium.org/p/angleproject/issues/detail?id=8597#c2

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages