src/compiler/translator/OutputVulkanGLSLForMetal.mm


Log

Author Commit Date CI Message
Tobin Ehlis 1a5c7a16 2020-02-25T12:02:31 Reland "Vulkan:Include precision qualifier in GLSL" Currently still ignoring precision qualifiers for Vulkan shaders by default, but have added feature "enablePrecisionQualifiers" that can be enabled in order to include precision qualifiers. With this initial implementation, it's possible to get precision qualifier mis-matches in the generated GLSL 4.50. According to the spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and Precision Qualifiers": For the purposes of determining if an output from one shader stage matches an input of the next stage, the precision qualifier need not match. However, when converted to SPIR-V and run through the shader validation any mismatches will cause shader validation errors. Initially just ignoring those errors with this commit. Bug: angleproject:3078 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com> Change-Id: Ieecca604bb2c834c9b1c2bcab85279d1f8755dfa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2086280
Tobin Ehlis a60e4973 2020-02-27T20:11:20 Revert "Vulkan:Include precision qualifier in GLSL" This reverts commit 93e72f5f0eb80b89334ea8fe577b32901a00b5fb. Reason for revert: This is having a negative impact on gfxbench Manhattan 3.1 tests (20-30%) with only a minor improvement (~4%) in TRex offscreen. Pulling out for now and need to re-evaluate best solution here. Original change's description: > Vulkan:Include precision qualifier in GLSL > > With this initial implementation, it's possible to get precision > qualifier mis-matches in the generated GLSL 4.50. According to the > spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and > Precision Qualifiers": > > For the purposes of determining if an output from one shader stage > matches an input of the next stage, the precision qualifier need not > match. > > However, when converted to SPIR-V and run through the shader validation > any mismatches will cause shader validation errors. Initially just > ignoring those errors with this commit. > > Bug: angleproject:3078 > Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Tobin Ehlis <tobine@google.com> > Reviewed-by: Tim Van Patten <timvp@google.com> > Commit-Queue: Tobin Ehlis <tobine@google.com> TBR=tobine@google.com,timvp@google.com,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:3078 Change-Id: I84984e2a963bde573f0f1de585001ceb83623c89 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079334 Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Tobin Ehlis 93e72f5f 2020-02-25T12:02:31 Vulkan:Include precision qualifier in GLSL With this initial implementation, it's possible to get precision qualifier mis-matches in the generated GLSL 4.50. According to the spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and Precision Qualifiers": For the purposes of determining if an output from one shader stage matches an input of the next stage, the precision qualifier need not match. However, when converted to SPIR-V and run through the shader validation any mismatches will cause shader validation errors. Initially just ignoring those errors with this commit. Bug: angleproject:3078 Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Shahbaz Youssefi 07f0f019 2019-12-19T14:47:46 Translator: Memory qualifiers on SSBO fields These were not output prior to this CL. Of these qualifiers, readonly and writeonly are unnecessary as ANGLE already does the appropriate validation, but the rest (coherent, volatile, restrict) are necessary, even though the tests pass on the bots by coincidence of driver behavior/test simplicity. Bug: angleproject:3602 Change-Id: Ie75fee0f004944b50ef21124ba25c4315e082b85 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1976499 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 795a3559 2019-12-03T11:31:18 Vulkan: EXT_gpu_shader5 support: precise The precise keyword is used in tessellation shaders but introduced in this extension. EXT_gpu_shader5 introduces a handful of features to shaders. This change only implements the `precise` keyword. Bug: angleproject:3569 Change-Id: I2252b79098eb8ba2d2faa040d7eaed7548b7051e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1939851 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 249cb200 2019-12-03T11:10:06 Translator: Rename TIntermInvariantDeclaration to ..GlobalQualifier.. This is to support the upcoming `precise` keyword. Bug: angleproject:3569 Change-Id: Idbcc8fd6f261757dbbf81b381e7a2dae938d8101 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947451 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Quyen a5a04ac0 2019-10-29T22:57:55 Metal backend pt3: shader translator Implementation of GLSL to MSL translator Bug: angleproject:2634 Change-Id: I66e2374b461548fac46163ea79790a488515e6b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1887251 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Quyen d200a77a 2019-10-10T00:44:01 Metal backend skeleton implementation. Bug: angleproject:2634 Change-Id: I34be82f4a80a6851fecb53a51e069b134d82613a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849079 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>