Commit graph

10 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
Chris Forbes
a05d90c221 Recompile shaders with more modern glslang
The SPIRV previously checked in had various issues -- most commonly, it
would use the VertexId and InstanceId builtins rather than the
replacmenet VertexIndex and InstanceIndex builtins required by Vulkan.
2019-09-06 09:59:45 +01: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
6b3dbb81a2 Remove useless uniform in subpasses
Fixes #390
2018-04-27 19:10:47 +02:00
saschawillems
fa00daac41 Removed unnecessary preserve attachment and shader attachment writes (fixes validation) 2017-06-16 21:44:53 +02: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
saschawillems
66682abe8c Sub pass G-Buffer compositing example (wip) 2016-10-14 20:35:41 +02:00