Reorder PLS RW texture definitions Reorder "@PLS_IMPL_RW_TEXTURE" macro definitions in a way that feels more intuitive. Diffs= 6bb88136d Reorder PLS RW texture definitions (#5388) Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head index 6f17d2b..4b9413e 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -298dd2da62c36e9a7d7750ebe695b9e5b192f2e2 +6bb88136d85122356c2731bf96d47b07e41471a9
diff --git a/renderer/shaders/glsl.glsl b/renderer/shaders/glsl.glsl index 1dec658..f8a9b5b 100644 --- a/renderer/shaders/glsl.glsl +++ b/renderer/shaders/glsl.glsl
@@ -178,18 +178,6 @@ #ifdef @PLS_IMPL_RW_TEXTURE -#define PLS_BLOCK_BEGIN -#define PLS_DECL4F(B) layout(binding = B, rgba8) uniform lowp coherent image2D -#define PLS_DECL2F(B) layout(binding = B, r32ui) uniform highp coherent uimage2D -#define PLS_BLOCK_END - -#define PLS_LOAD4F(P) imageLoad(P, plsCoord) -#define PLS_LOAD2F(P) unpackHalf2x16(imageLoad(P, plsCoord).x) -#define PLS_STORE4F(P, V) imageStore(P, plsCoord, V) -#define PLS_STORE2F(P, X, Y) imageStore(P, plsCoord, uvec4(packHalf2x16(vec2(X, Y)))) - -#define PLS_PRESERVE_VALUE(P) - #extension GL_ARB_fragment_shader_interlock : enable #extension GL_INTEL_fragment_shader_ordering : enable @@ -205,6 +193,18 @@ #define PLS_INTERLOCK_END #endif +#define PLS_BLOCK_BEGIN +#define PLS_DECL4F(B) layout(binding = B, rgba8) uniform lowp coherent image2D +#define PLS_DECL2F(B) layout(binding = B, r32ui) uniform highp coherent uimage2D +#define PLS_BLOCK_END + +#define PLS_LOAD4F(P) imageLoad(P, plsCoord) +#define PLS_LOAD2F(P) unpackHalf2x16(imageLoad(P, plsCoord).x) +#define PLS_STORE4F(P, V) imageStore(P, plsCoord, V) +#define PLS_STORE2F(P, X, Y) imageStore(P, plsCoord, uvec4(packHalf2x16(vec2(X, Y)))) + +#define PLS_PRESERVE_VALUE(P) + #endif #define VERTEX_MAIN void main