src/compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.h


Log

Author Commit Date CI Message
Shahbaz Youssefi e28883de 2020-01-25T23:25:43 Vulkan: Fix handling of inactive fragment outputs These were never assigned a location. They are now removed by the translator similar to other inactive variables. Bug: angleproject:4313 Change-Id: I3398d06e1dea3f43b84f206cca07cde5b44b21a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2021734 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 453926f5 2020-01-19T14:49:32 Vulkan: Remove inactive shader inputs in the translator Inactive vertex attributes are harmless to remove. Between two consecutive stages, the input varyings must be a subset of the previous stage's output varyings. This means removing inactive input varyings is also harmless. Removing inactive output varyings is not possible though. GLSL allows a varying to not be written by the previous stage even if it's used in the current stage (values will be undefined, but it's not an error). This means that an inactive output varying may still need to exist as part of the shader interface in case the following stage has that varying as input (and is active). Bug: angleproject:3394 Change-Id: I7302973d2b8356d9f54a66f8259c32f245a99904 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2009986 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a5dd3888 2019-12-04T14:31:57 Vulkan: fix handling of inactive atomic counters The translator emulates atomic counters with a storage buffer array during translation to Vulkan GLSL. Glslang wrapper then should assign set/binding to this buffer. However, if the atomic counters are actually unused in the shader, this assignment is never done. This change adds a small tree transformation for Vulkan that removes any uniform or interface block declaration that's not active. In particular, this makes atomic counter emulation a no-op if no atomic counters are used. It also has the benefit of not requiring glslang wrapper to remove such inactive resources. Bug: angleproject:4190 Change-Id: I286c199854ec2379558ad1ec48b4d2c4bf5544d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951523 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>