Commit graph

6 commits

Author SHA1 Message Date
Jakub Kuderski
8982f8f2ec Perform sampling before branching to discard
This two fragment shaders that exhibit undefined behavior. In GLSL,
it is undefined to use implicit or explicit derivatives in
non-uniform control flow [1]. The SPIR-V produced by glslang contained
similar undefined behavior, which results in incorrect codegen
with the amdvlk's LLPC shader compiler, and produces visually
incorrect image.

This PR fixes this issue by hoisting the sampling so that it's
executed before discarding. It's a simple fix and may not be
the optimial way to resolve this issue.

[1]
https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
p. 137.
2020-02-13 10:01:50 -05:00
saschawillems
1f3cb12bd3 Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
saschawillems
28a9f1ca37 Corrected input attachment indices (Refs #295) [skip ci] 2017-03-25 12:58:52 +01:00
saschawillems
405c76737c Use new sample building scene for subpass example, added transparent texture 2017-01-14 16:06:44 +01:00
saschawillems
81885abeb6 Pass depth test for forward transparent geometry for texel without depth from deferred pass [skip ci] 2017-01-12 20:02:55 +01:00
saschawillems
b57f74012f Added transparent forward pass as third subpass, demonstrate preserve attachment 2017-01-11 21:25:53 +01:00