src/tests/compiler_tests/Parse_test.cpp


Log

Author Commit Date CI Message
Kimmo Kinnunen 18fa02be 2024-03-12T10:23:55 Rewrite exprs using separated decl variables Rewrite expressions that use the rewritten struct declaration variables. Declaration that specfies a struct and defines multiple variables will get its variable declarations separated. The type of the variable changes when a struct specifier is removed for the second and rest of the variable declarations. The type of the variable changes also when a anonymous struct is named. The expressions that used the separated variables used the old struct as their types. Fix by using TIntermRebuild. Upon creating a new symbol node referencing the new type, the rebuilder will instantiate also all the needed intermediate nodes, which then get the correct struct type. For consistency, fix the case of anonymous struct -> named struct transform naming the variables similar to named struct separation. Consider base case: struct S { .. } a, b; -> struct S { .. } a; S b; Compare against case: struct { .. } a, b; Before, inconsistency: struct s1 { .. }; s1 a; s1 b; After, fixed: struct s1 { .. } a; s1 b; Bug: angleproject:8590 Change-Id: Iffb0ef4441d6021e076b04485b808b26a7fa4dcb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5365201 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 11a2d27f 2024-03-08T14:26:56 Check array index against unsigned array size Fix an assert during GLSL parsing when a very large array (~1U) type is indexed. Bug: angleproject:8596 Change-Id: I219ac5c8f3fa58aa4c7d679eade6f32b59eb1103 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5352653 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Erica Li 0f110098 2024-03-08T12:40:09 Avoid assert with multiple memory qualifiers Add missing qualifier strings. Bug: angleproject:8593 Change-Id: I484571c33effd85d52712b4876f6a3a5c73d8fde Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5352255 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 39f29f65 2024-03-05T21:42:32 Ensure unary math op parse to an node on error Return the error node for ops like radians(). The math op parse can fail in multiple ways. Fixed: angleproject:8583 Change-Id: Ief7e150dffefe711f567d95c62d1023fc7fa1c91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5344716 Reviewed-by: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen 871a309c 2024-03-04T14:43:10 Fix layout(index=) parse assert on es 100 shaders Remove invalid assert about layout index qualifier being present only if EXT_blend_func_extended is present. The layout qualifier gets parsed to support EXT_shader_framebuffer_fetch in ES 100 shaders to support "layout(incoherent) mediump vec4 gl_FragData[gl_MaxDrawBuffers]" Fixed: angleproject:8570 Change-Id: I0d0d99bcc882a0befd97c2510dec4a8ccf1690bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5340249 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Kimmo Kinnunen 9d453e57 2024-02-16T22:28:18 Fix ASSERT in non-global precise var decls Precise was treated as invariant. Precise can be declared for non-global variables. Bug: angleproject:8550 Change-Id: Ia0d00d67d0d1504b78294ee2256785fe3da3e399 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5300976 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen 9d344b5c 2024-02-13T17:54:12 Uniform block reference in constuctors crash Passing uniform block instance name to a built-in constructor would cause type confusion. Block this by failing to parse. Bug: angleproject:8533 Change-Id: I5a676b41e2f3d766ece4ed472debc1c874753293 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5290897 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Kimmo Kinnunen ab71d751 2024-02-07T14:25:32 Fix an assert on multidim array constructors Fail early instead of asserting when trying to parse a multidimensional array constructor call with unsized argument array argument. int A[]; int B[int[][](A)]; Bug: angleproject:8519 Change-Id: Iee2c70318eebd2def57ffab8db709d1076692922 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5272434 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>