From bb0183f8178689876d33188428e909ee91563120 Mon Sep 17 00:00:00 2001 From: steve-lunarg Date: Tue, 4 Oct 2016 16:58:14 -0600 Subject: [PATCH] HLSL: phase 1: add RWTexture and RWBuffer There's a lot to do for RWTexture and RWBuffer, so it will be broken up into several PRs. This is #1. This adds RWTexture and RWBuffer support, with the following limitations: * Only 4 component formats supported * No operator[] yet Those will be added in other PRs. This PR supports declarations and the Load & GetDimensions methods. New tests are added. --- .../hlsl.getdimensions.rw.dx10.frag.out | 1082 +++++++++++++++++ .../hlsl.load.rwbuffer.dx10.frag.out | 200 +++ .../hlsl.load.rwtexture.array.dx10.frag.out | 383 ++++++ .../hlsl.load.rwtexture.dx10.frag.out | 432 +++++++ Test/hlsl.getdimensions.rw.dx10.frag | 96 ++ Test/hlsl.load.rwbuffer.dx10.frag | 32 + Test/hlsl.load.rwtexture.array.dx10.frag | 57 + Test/hlsl.load.rwtexture.dx10.frag | 62 + gtests/Hlsl.FromFile.cpp | 4 + hlsl/hlslGrammar.cpp | 61 +- hlsl/hlslParseHelper.cpp | 23 +- hlsl/hlslParseables.cpp | 70 +- hlsl/hlslScanContext.cpp | 13 + hlsl/hlslTokens.h | 7 + 14 files changed, 2483 insertions(+), 39 deletions(-) create mode 100644 Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out create mode 100644 Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out create mode 100644 Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out create mode 100644 Test/baseResults/hlsl.load.rwtexture.dx10.frag.out create mode 100644 Test/hlsl.getdimensions.rw.dx10.frag create mode 100644 Test/hlsl.load.rwbuffer.dx10.frag create mode 100644 Test/hlsl.load.rwtexture.array.dx10.frag create mode 100644 Test/hlsl.load.rwtexture.dx10.frag diff --git a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out new file mode 100644 index 000000000..717c376ab --- /dev/null +++ b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out @@ -0,0 +1,1082 @@ +hlsl.getdimensions.rw.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:44 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:44 Function Parameters: +0:? Sequence +0:63 Sequence +0:63 move second child to first child (temp uint) +0:63 'sizeQueryTemp' (temp uint) +0:63 imageQuerySize (temp uint) +0:63 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:63 move second child to first child (temp uint) +0:63 'WidthU' (temp uint) +0:63 'sizeQueryTemp' (temp uint) +0:64 Sequence +0:64 move second child to first child (temp uint) +0:64 'sizeQueryTemp' (temp uint) +0:64 imageQuerySize (temp uint) +0:64 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:64 move second child to first child (temp uint) +0:64 'WidthU' (temp uint) +0:64 'sizeQueryTemp' (temp uint) +0:65 Sequence +0:65 move second child to first child (temp uint) +0:65 'sizeQueryTemp' (temp uint) +0:65 imageQuerySize (temp uint) +0:65 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:65 move second child to first child (temp uint) +0:65 'WidthU' (temp uint) +0:65 'sizeQueryTemp' (temp uint) +0:68 Sequence +0:68 move second child to first child (temp uint) +0:68 'sizeQueryTemp' (temp uint) +0:68 imageQuerySize (temp uint) +0:68 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:68 move second child to first child (temp uint) +0:68 'WidthU' (temp uint) +0:68 'sizeQueryTemp' (temp uint) +0:69 Sequence +0:69 move second child to first child (temp uint) +0:69 'sizeQueryTemp' (temp uint) +0:69 imageQuerySize (temp uint) +0:69 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:69 move second child to first child (temp uint) +0:69 'WidthU' (temp uint) +0:69 'sizeQueryTemp' (temp uint) +0:70 Sequence +0:70 move second child to first child (temp uint) +0:70 'sizeQueryTemp' (temp uint) +0:70 imageQuerySize (temp uint) +0:70 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:70 move second child to first child (temp uint) +0:70 'WidthU' (temp uint) +0:70 'sizeQueryTemp' (temp uint) +0:73 Sequence +0:73 move second child to first child (temp 2-component vector of uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 imageQuerySize (temp 2-component vector of uint) +0:73 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:73 move second child to first child (temp uint) +0:73 'WidthU' (temp uint) +0:73 direct index (temp uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 Constant: +0:73 0 (const int) +0:73 move second child to first child (temp uint) +0:73 'ElementsU' (temp uint) +0:73 direct index (temp uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 Constant: +0:73 1 (const int) +0:74 Sequence +0:74 move second child to first child (temp 2-component vector of uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 imageQuerySize (temp 2-component vector of uint) +0:74 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:74 move second child to first child (temp uint) +0:74 'WidthU' (temp uint) +0:74 direct index (temp uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 Constant: +0:74 0 (const int) +0:74 move second child to first child (temp uint) +0:74 'ElementsU' (temp uint) +0:74 direct index (temp uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 Constant: +0:74 1 (const int) +0:75 Sequence +0:75 move second child to first child (temp 2-component vector of uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 imageQuerySize (temp 2-component vector of uint) +0:75 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:75 move second child to first child (temp uint) +0:75 'WidthU' (temp uint) +0:75 direct index (temp uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 Constant: +0:75 0 (const int) +0:75 move second child to first child (temp uint) +0:75 'ElementsU' (temp uint) +0:75 direct index (temp uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 Constant: +0:75 1 (const int) +0:78 Sequence +0:78 move second child to first child (temp 2-component vector of uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 imageQuerySize (temp 2-component vector of uint) +0:78 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:78 move second child to first child (temp uint) +0:78 'WidthU' (temp uint) +0:78 direct index (temp uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 Constant: +0:78 0 (const int) +0:78 move second child to first child (temp uint) +0:78 'HeightU' (temp uint) +0:78 direct index (temp uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 Constant: +0:78 1 (const int) +0:79 Sequence +0:79 move second child to first child (temp 2-component vector of uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 imageQuerySize (temp 2-component vector of uint) +0:79 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:79 move second child to first child (temp uint) +0:79 'WidthU' (temp uint) +0:79 direct index (temp uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 Constant: +0:79 0 (const int) +0:79 move second child to first child (temp uint) +0:79 'HeightU' (temp uint) +0:79 direct index (temp uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 Constant: +0:79 1 (const int) +0:80 Sequence +0:80 move second child to first child (temp 2-component vector of uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 imageQuerySize (temp 2-component vector of uint) +0:80 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:80 move second child to first child (temp uint) +0:80 'WidthU' (temp uint) +0:80 direct index (temp uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 Constant: +0:80 0 (const int) +0:80 move second child to first child (temp uint) +0:80 'HeightU' (temp uint) +0:80 direct index (temp uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 Constant: +0:80 1 (const int) +0:83 Sequence +0:83 move second child to first child (temp 3-component vector of uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 imageQuerySize (temp 3-component vector of uint) +0:83 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:83 move second child to first child (temp uint) +0:83 'WidthU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 0 (const int) +0:83 move second child to first child (temp uint) +0:83 'HeightU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 1 (const int) +0:83 move second child to first child (temp uint) +0:83 'ElementsU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 2 (const int) +0:84 Sequence +0:84 move second child to first child (temp 3-component vector of uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 imageQuerySize (temp 3-component vector of uint) +0:84 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:84 move second child to first child (temp uint) +0:84 'WidthU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 0 (const int) +0:84 move second child to first child (temp uint) +0:84 'HeightU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 1 (const int) +0:84 move second child to first child (temp uint) +0:84 'ElementsU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 2 (const int) +0:85 Sequence +0:85 move second child to first child (temp 3-component vector of uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 imageQuerySize (temp 3-component vector of uint) +0:85 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:85 move second child to first child (temp uint) +0:85 'WidthU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 0 (const int) +0:85 move second child to first child (temp uint) +0:85 'HeightU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 1 (const int) +0:85 move second child to first child (temp uint) +0:85 'ElementsU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 2 (const int) +0:88 Sequence +0:88 move second child to first child (temp 3-component vector of uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 imageQuerySize (temp 3-component vector of uint) +0:88 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:88 move second child to first child (temp uint) +0:88 'WidthU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 0 (const int) +0:88 move second child to first child (temp uint) +0:88 'HeightU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 1 (const int) +0:88 move second child to first child (temp uint) +0:88 'DepthU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 2 (const int) +0:89 Sequence +0:89 move second child to first child (temp 3-component vector of uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 imageQuerySize (temp 3-component vector of uint) +0:89 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:89 move second child to first child (temp uint) +0:89 'WidthU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 0 (const int) +0:89 move second child to first child (temp uint) +0:89 'HeightU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 1 (const int) +0:89 move second child to first child (temp uint) +0:89 'DepthU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 2 (const int) +0:90 Sequence +0:90 move second child to first child (temp 3-component vector of uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 imageQuerySize (temp 3-component vector of uint) +0:90 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:90 move second child to first child (temp uint) +0:90 'WidthU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 0 (const int) +0:90 move second child to first child (temp uint) +0:90 'HeightU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 1 (const int) +0:90 move second child to first child (temp uint) +0:90 'DepthU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 2 (const int) +0:92 move second child to first child (temp 4-component vector of float) +0:92 Color: direct index for structure (temp 4-component vector of float) +0:92 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:92 Constant: +0:92 0 (const int) +0:92 Constant: +0:92 1.000000 +0:92 1.000000 +0:92 1.000000 +0:92 1.000000 +0:93 move second child to first child (temp float) +0:93 Depth: direct index for structure (temp float) +0:93 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:93 Constant: +0:93 1 (const int) +0:93 Constant: +0:93 1.000000 +0:95 Sequence +0:95 Sequence +0:95 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:95 Color: direct index for structure (temp 4-component vector of float) +0:95 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:95 Constant: +0:95 0 (const int) +0:95 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:95 Depth: direct index for structure (temp float) +0:95 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:95 Constant: +0:95 1 (const int) +0:95 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:44 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:44 Function Parameters: +0:? Sequence +0:63 Sequence +0:63 move second child to first child (temp uint) +0:63 'sizeQueryTemp' (temp uint) +0:63 imageQuerySize (temp uint) +0:63 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:63 move second child to first child (temp uint) +0:63 'WidthU' (temp uint) +0:63 'sizeQueryTemp' (temp uint) +0:64 Sequence +0:64 move second child to first child (temp uint) +0:64 'sizeQueryTemp' (temp uint) +0:64 imageQuerySize (temp uint) +0:64 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:64 move second child to first child (temp uint) +0:64 'WidthU' (temp uint) +0:64 'sizeQueryTemp' (temp uint) +0:65 Sequence +0:65 move second child to first child (temp uint) +0:65 'sizeQueryTemp' (temp uint) +0:65 imageQuerySize (temp uint) +0:65 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:65 move second child to first child (temp uint) +0:65 'WidthU' (temp uint) +0:65 'sizeQueryTemp' (temp uint) +0:68 Sequence +0:68 move second child to first child (temp uint) +0:68 'sizeQueryTemp' (temp uint) +0:68 imageQuerySize (temp uint) +0:68 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:68 move second child to first child (temp uint) +0:68 'WidthU' (temp uint) +0:68 'sizeQueryTemp' (temp uint) +0:69 Sequence +0:69 move second child to first child (temp uint) +0:69 'sizeQueryTemp' (temp uint) +0:69 imageQuerySize (temp uint) +0:69 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:69 move second child to first child (temp uint) +0:69 'WidthU' (temp uint) +0:69 'sizeQueryTemp' (temp uint) +0:70 Sequence +0:70 move second child to first child (temp uint) +0:70 'sizeQueryTemp' (temp uint) +0:70 imageQuerySize (temp uint) +0:70 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:70 move second child to first child (temp uint) +0:70 'WidthU' (temp uint) +0:70 'sizeQueryTemp' (temp uint) +0:73 Sequence +0:73 move second child to first child (temp 2-component vector of uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 imageQuerySize (temp 2-component vector of uint) +0:73 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:73 move second child to first child (temp uint) +0:73 'WidthU' (temp uint) +0:73 direct index (temp uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 Constant: +0:73 0 (const int) +0:73 move second child to first child (temp uint) +0:73 'ElementsU' (temp uint) +0:73 direct index (temp uint) +0:73 'sizeQueryTemp' (temp 2-component vector of uint) +0:73 Constant: +0:73 1 (const int) +0:74 Sequence +0:74 move second child to first child (temp 2-component vector of uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 imageQuerySize (temp 2-component vector of uint) +0:74 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:74 move second child to first child (temp uint) +0:74 'WidthU' (temp uint) +0:74 direct index (temp uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 Constant: +0:74 0 (const int) +0:74 move second child to first child (temp uint) +0:74 'ElementsU' (temp uint) +0:74 direct index (temp uint) +0:74 'sizeQueryTemp' (temp 2-component vector of uint) +0:74 Constant: +0:74 1 (const int) +0:75 Sequence +0:75 move second child to first child (temp 2-component vector of uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 imageQuerySize (temp 2-component vector of uint) +0:75 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:75 move second child to first child (temp uint) +0:75 'WidthU' (temp uint) +0:75 direct index (temp uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 Constant: +0:75 0 (const int) +0:75 move second child to first child (temp uint) +0:75 'ElementsU' (temp uint) +0:75 direct index (temp uint) +0:75 'sizeQueryTemp' (temp 2-component vector of uint) +0:75 Constant: +0:75 1 (const int) +0:78 Sequence +0:78 move second child to first child (temp 2-component vector of uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 imageQuerySize (temp 2-component vector of uint) +0:78 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:78 move second child to first child (temp uint) +0:78 'WidthU' (temp uint) +0:78 direct index (temp uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 Constant: +0:78 0 (const int) +0:78 move second child to first child (temp uint) +0:78 'HeightU' (temp uint) +0:78 direct index (temp uint) +0:78 'sizeQueryTemp' (temp 2-component vector of uint) +0:78 Constant: +0:78 1 (const int) +0:79 Sequence +0:79 move second child to first child (temp 2-component vector of uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 imageQuerySize (temp 2-component vector of uint) +0:79 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:79 move second child to first child (temp uint) +0:79 'WidthU' (temp uint) +0:79 direct index (temp uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 Constant: +0:79 0 (const int) +0:79 move second child to first child (temp uint) +0:79 'HeightU' (temp uint) +0:79 direct index (temp uint) +0:79 'sizeQueryTemp' (temp 2-component vector of uint) +0:79 Constant: +0:79 1 (const int) +0:80 Sequence +0:80 move second child to first child (temp 2-component vector of uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 imageQuerySize (temp 2-component vector of uint) +0:80 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:80 move second child to first child (temp uint) +0:80 'WidthU' (temp uint) +0:80 direct index (temp uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 Constant: +0:80 0 (const int) +0:80 move second child to first child (temp uint) +0:80 'HeightU' (temp uint) +0:80 direct index (temp uint) +0:80 'sizeQueryTemp' (temp 2-component vector of uint) +0:80 Constant: +0:80 1 (const int) +0:83 Sequence +0:83 move second child to first child (temp 3-component vector of uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 imageQuerySize (temp 3-component vector of uint) +0:83 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:83 move second child to first child (temp uint) +0:83 'WidthU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 0 (const int) +0:83 move second child to first child (temp uint) +0:83 'HeightU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 1 (const int) +0:83 move second child to first child (temp uint) +0:83 'ElementsU' (temp uint) +0:83 direct index (temp uint) +0:83 'sizeQueryTemp' (temp 3-component vector of uint) +0:83 Constant: +0:83 2 (const int) +0:84 Sequence +0:84 move second child to first child (temp 3-component vector of uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 imageQuerySize (temp 3-component vector of uint) +0:84 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:84 move second child to first child (temp uint) +0:84 'WidthU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 0 (const int) +0:84 move second child to first child (temp uint) +0:84 'HeightU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 1 (const int) +0:84 move second child to first child (temp uint) +0:84 'ElementsU' (temp uint) +0:84 direct index (temp uint) +0:84 'sizeQueryTemp' (temp 3-component vector of uint) +0:84 Constant: +0:84 2 (const int) +0:85 Sequence +0:85 move second child to first child (temp 3-component vector of uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 imageQuerySize (temp 3-component vector of uint) +0:85 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:85 move second child to first child (temp uint) +0:85 'WidthU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 0 (const int) +0:85 move second child to first child (temp uint) +0:85 'HeightU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 1 (const int) +0:85 move second child to first child (temp uint) +0:85 'ElementsU' (temp uint) +0:85 direct index (temp uint) +0:85 'sizeQueryTemp' (temp 3-component vector of uint) +0:85 Constant: +0:85 2 (const int) +0:88 Sequence +0:88 move second child to first child (temp 3-component vector of uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 imageQuerySize (temp 3-component vector of uint) +0:88 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:88 move second child to first child (temp uint) +0:88 'WidthU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 0 (const int) +0:88 move second child to first child (temp uint) +0:88 'HeightU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 1 (const int) +0:88 move second child to first child (temp uint) +0:88 'DepthU' (temp uint) +0:88 direct index (temp uint) +0:88 'sizeQueryTemp' (temp 3-component vector of uint) +0:88 Constant: +0:88 2 (const int) +0:89 Sequence +0:89 move second child to first child (temp 3-component vector of uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 imageQuerySize (temp 3-component vector of uint) +0:89 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:89 move second child to first child (temp uint) +0:89 'WidthU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 0 (const int) +0:89 move second child to first child (temp uint) +0:89 'HeightU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 1 (const int) +0:89 move second child to first child (temp uint) +0:89 'DepthU' (temp uint) +0:89 direct index (temp uint) +0:89 'sizeQueryTemp' (temp 3-component vector of uint) +0:89 Constant: +0:89 2 (const int) +0:90 Sequence +0:90 move second child to first child (temp 3-component vector of uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 imageQuerySize (temp 3-component vector of uint) +0:90 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:90 move second child to first child (temp uint) +0:90 'WidthU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 0 (const int) +0:90 move second child to first child (temp uint) +0:90 'HeightU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 1 (const int) +0:90 move second child to first child (temp uint) +0:90 'DepthU' (temp uint) +0:90 direct index (temp uint) +0:90 'sizeQueryTemp' (temp 3-component vector of uint) +0:90 Constant: +0:90 2 (const int) +0:92 move second child to first child (temp 4-component vector of float) +0:92 Color: direct index for structure (temp 4-component vector of float) +0:92 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:92 Constant: +0:92 0 (const int) +0:92 Constant: +0:92 1.000000 +0:92 1.000000 +0:92 1.000000 +0:92 1.000000 +0:93 move second child to first child (temp float) +0:93 Depth: direct index for structure (temp float) +0:93 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:93 Constant: +0:93 1 (const int) +0:93 Constant: +0:93 1.000000 +0:95 Sequence +0:95 Sequence +0:95 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:95 Color: direct index for structure (temp 4-component vector of float) +0:95 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:95 Constant: +0:95 0 (const int) +0:95 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:95 Depth: direct index for structure (temp float) +0:95 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:95 Constant: +0:95 1 (const int) +0:95 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 225 + + Capability Shader + Capability Sampled1D + Capability SampledBuffer + Capability ImageQuery + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 210 214 + ExecutionMode 4 OriginUpperLeft + Name 4 "main" + Name 8 "sizeQueryTemp" + Name 12 "g_tTex1df4" + Name 16 "WidthU" + Name 18 "sizeQueryTemp" + Name 21 "g_tTex1di4" + Name 25 "sizeQueryTemp" + Name 28 "g_tTex1du4" + Name 32 "sizeQueryTemp" + Name 35 "g_tBuffF" + Name 39 "sizeQueryTemp" + Name 42 "g_tBuffI" + Name 46 "sizeQueryTemp" + Name 49 "g_tBuffU" + Name 55 "sizeQueryTemp" + Name 58 "g_tTex1df4a" + Name 65 "ElementsU" + Name 69 "sizeQueryTemp" + Name 72 "g_tTex1di4a" + Name 79 "sizeQueryTemp" + Name 82 "g_tTex1du4a" + Name 89 "sizeQueryTemp" + Name 92 "g_tTex2df4" + Name 97 "HeightU" + Name 100 "sizeQueryTemp" + Name 103 "g_tTex2di4" + Name 110 "sizeQueryTemp" + Name 113 "g_tTex2du4" + Name 122 "sizeQueryTemp" + Name 125 "g_tTex2df4a" + Name 136 "sizeQueryTemp" + Name 139 "g_tTex2di4a" + Name 148 "sizeQueryTemp" + Name 151 "g_tTex2du4a" + Name 160 "sizeQueryTemp" + Name 163 "g_tTex3df4" + Name 170 "DepthU" + Name 173 "sizeQueryTemp" + Name 176 "g_tTex3di4" + Name 185 "sizeQueryTemp" + Name 188 "g_tTex3du4" + Name 198 "PS_OUTPUT" + MemberName 198(PS_OUTPUT) 0 "Color" + MemberName 198(PS_OUTPUT) 1 "Depth" + Name 200 "psout" + Name 210 "Color" + Name 214 "Depth" + Name 220 "g_sSamp" + Name 222 "$Global" + MemberName 222($Global) 0 "c1" + MemberName 222($Global) 1 "c2" + MemberName 222($Global) 2 "c3" + MemberName 222($Global) 3 "c4" + MemberName 222($Global) 4 "o1" + MemberName 222($Global) 5 "o2" + MemberName 222($Global) 6 "o3" + MemberName 222($Global) 7 "o4" + Name 224 "" + Decorate 12(g_tTex1df4) DescriptorSet 0 + Decorate 12(g_tTex1df4) Binding 0 + Decorate 21(g_tTex1di4) DescriptorSet 0 + Decorate 28(g_tTex1du4) DescriptorSet 0 + Decorate 35(g_tBuffF) DescriptorSet 0 + Decorate 42(g_tBuffI) DescriptorSet 0 + Decorate 49(g_tBuffU) DescriptorSet 0 + Decorate 58(g_tTex1df4a) DescriptorSet 0 + Decorate 72(g_tTex1di4a) DescriptorSet 0 + Decorate 82(g_tTex1du4a) DescriptorSet 0 + Decorate 92(g_tTex2df4) DescriptorSet 0 + Decorate 103(g_tTex2di4) DescriptorSet 0 + Decorate 113(g_tTex2du4) DescriptorSet 0 + Decorate 125(g_tTex2df4a) DescriptorSet 0 + Decorate 139(g_tTex2di4a) DescriptorSet 0 + Decorate 151(g_tTex2du4a) DescriptorSet 0 + Decorate 163(g_tTex3df4) DescriptorSet 0 + Decorate 176(g_tTex3di4) DescriptorSet 0 + Decorate 188(g_tTex3du4) DescriptorSet 0 + Decorate 210(Color) Location 0 + Decorate 214(Depth) BuiltIn FragDepth + Decorate 220(g_sSamp) DescriptorSet 0 + Decorate 220(g_sSamp) Binding 0 + Decorate 222($Global) Block + Decorate 224 DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeFloat 32 + 10: TypeImage 9(float) 1D nonsampled format:Rgba32f + 11: TypePointer UniformConstant 10 + 12(g_tTex1df4): 11(ptr) Variable UniformConstant + 14: TypeInt 32 1 + 19: TypeImage 14(int) 1D nonsampled format:Rgba32i + 20: TypePointer UniformConstant 19 + 21(g_tTex1di4): 20(ptr) Variable UniformConstant + 26: TypeImage 6(int) 1D nonsampled format:Rgba32ui + 27: TypePointer UniformConstant 26 + 28(g_tTex1du4): 27(ptr) Variable UniformConstant + 33: TypeImage 9(float) Buffer nonsampled format:Rgba32f + 34: TypePointer UniformConstant 33 + 35(g_tBuffF): 34(ptr) Variable UniformConstant + 40: TypeImage 14(int) Buffer nonsampled format:Rgba32i + 41: TypePointer UniformConstant 40 + 42(g_tBuffI): 41(ptr) Variable UniformConstant + 47: TypeImage 6(int) Buffer nonsampled format:Rgba32ui + 48: TypePointer UniformConstant 47 + 49(g_tBuffU): 48(ptr) Variable UniformConstant + 53: TypeVector 6(int) 2 + 54: TypePointer Function 53(ivec2) + 56: TypeImage 9(float) 1D array nonsampled format:Rgba32f + 57: TypePointer UniformConstant 56 + 58(g_tTex1df4a): 57(ptr) Variable UniformConstant + 60: TypeVector 14(int) 2 + 62: 6(int) Constant 0 + 66: 6(int) Constant 1 + 70: TypeImage 14(int) 1D array nonsampled format:Rgba32i + 71: TypePointer UniformConstant 70 + 72(g_tTex1di4a): 71(ptr) Variable UniformConstant + 80: TypeImage 6(int) 1D array nonsampled format:Rgba32ui + 81: TypePointer UniformConstant 80 + 82(g_tTex1du4a): 81(ptr) Variable UniformConstant + 90: TypeImage 9(float) 2D nonsampled format:Rgba32f + 91: TypePointer UniformConstant 90 + 92(g_tTex2df4): 91(ptr) Variable UniformConstant + 101: TypeImage 14(int) 2D nonsampled format:Rgba32i + 102: TypePointer UniformConstant 101 + 103(g_tTex2di4): 102(ptr) Variable UniformConstant + 111: TypeImage 6(int) 2D nonsampled format:Rgba32ui + 112: TypePointer UniformConstant 111 + 113(g_tTex2du4): 112(ptr) Variable UniformConstant + 120: TypeVector 6(int) 3 + 121: TypePointer Function 120(ivec3) + 123: TypeImage 9(float) 2D array nonsampled format:Rgba32f + 124: TypePointer UniformConstant 123 +125(g_tTex2df4a): 124(ptr) Variable UniformConstant + 127: TypeVector 14(int) 3 + 133: 6(int) Constant 2 + 137: TypeImage 14(int) 2D array nonsampled format:Rgba32i + 138: TypePointer UniformConstant 137 +139(g_tTex2di4a): 138(ptr) Variable UniformConstant + 149: TypeImage 6(int) 2D array nonsampled format:Rgba32ui + 150: TypePointer UniformConstant 149 +151(g_tTex2du4a): 150(ptr) Variable UniformConstant + 161: TypeImage 9(float) 3D nonsampled format:Rgba32f + 162: TypePointer UniformConstant 161 + 163(g_tTex3df4): 162(ptr) Variable UniformConstant + 174: TypeImage 14(int) 3D nonsampled format:Rgba32i + 175: TypePointer UniformConstant 174 + 176(g_tTex3di4): 175(ptr) Variable UniformConstant + 186: TypeImage 6(int) 3D nonsampled format:Rgba32ui + 187: TypePointer UniformConstant 186 + 188(g_tTex3du4): 187(ptr) Variable UniformConstant + 197: TypeVector 9(float) 4 + 198(PS_OUTPUT): TypeStruct 197(fvec4) 9(float) + 199: TypePointer Function 198(PS_OUTPUT) + 201: 14(int) Constant 0 + 202: 9(float) Constant 1065353216 + 203: 197(fvec4) ConstantComposite 202 202 202 202 + 204: TypePointer Function 197(fvec4) + 206: 14(int) Constant 1 + 207: TypePointer Function 9(float) + 209: TypePointer Output 197(fvec4) + 210(Color): 209(ptr) Variable Output + 213: TypePointer Output 9(float) + 214(Depth): 213(ptr) Variable Output + 218: TypeSampler + 219: TypePointer UniformConstant 218 + 220(g_sSamp): 219(ptr) Variable UniformConstant + 221: TypeVector 14(int) 4 + 222($Global): TypeStruct 14(int) 60(ivec2) 127(ivec3) 221(ivec4) 14(int) 60(ivec2) 127(ivec3) 221(ivec4) + 223: TypePointer Uniform 222($Global) + 224: 223(ptr) Variable Uniform + 4(main): 2 Function None 3 + 5: Label +8(sizeQueryTemp): 7(ptr) Variable Function + 16(WidthU): 7(ptr) Variable Function +18(sizeQueryTemp): 7(ptr) Variable Function +25(sizeQueryTemp): 7(ptr) Variable Function +32(sizeQueryTemp): 7(ptr) Variable Function +39(sizeQueryTemp): 7(ptr) Variable Function +46(sizeQueryTemp): 7(ptr) Variable Function +55(sizeQueryTemp): 54(ptr) Variable Function + 65(ElementsU): 7(ptr) Variable Function +69(sizeQueryTemp): 54(ptr) Variable Function +79(sizeQueryTemp): 54(ptr) Variable Function +89(sizeQueryTemp): 54(ptr) Variable Function + 97(HeightU): 7(ptr) Variable Function +100(sizeQueryTemp): 54(ptr) Variable Function +110(sizeQueryTemp): 54(ptr) Variable Function +122(sizeQueryTemp): 121(ptr) Variable Function +136(sizeQueryTemp): 121(ptr) Variable Function +148(sizeQueryTemp): 121(ptr) Variable Function +160(sizeQueryTemp): 121(ptr) Variable Function + 170(DepthU): 7(ptr) Variable Function +173(sizeQueryTemp): 121(ptr) Variable Function +185(sizeQueryTemp): 121(ptr) Variable Function + 200(psout): 199(ptr) Variable Function + 13: 10 Load 12(g_tTex1df4) + 15: 14(int) ImageQuerySize 13 + Store 8(sizeQueryTemp) 15 + 17: 6(int) Load 8(sizeQueryTemp) + Store 16(WidthU) 17 + 22: 19 Load 21(g_tTex1di4) + 23: 14(int) ImageQuerySize 22 + Store 18(sizeQueryTemp) 23 + 24: 6(int) Load 18(sizeQueryTemp) + Store 16(WidthU) 24 + 29: 26 Load 28(g_tTex1du4) + 30: 14(int) ImageQuerySize 29 + Store 25(sizeQueryTemp) 30 + 31: 6(int) Load 25(sizeQueryTemp) + Store 16(WidthU) 31 + 36: 33 Load 35(g_tBuffF) + 37: 14(int) ImageQuerySize 36 + Store 32(sizeQueryTemp) 37 + 38: 6(int) Load 32(sizeQueryTemp) + Store 16(WidthU) 38 + 43: 40 Load 42(g_tBuffI) + 44: 14(int) ImageQuerySize 43 + Store 39(sizeQueryTemp) 44 + 45: 6(int) Load 39(sizeQueryTemp) + Store 16(WidthU) 45 + 50: 47 Load 49(g_tBuffU) + 51: 14(int) ImageQuerySize 50 + Store 46(sizeQueryTemp) 51 + 52: 6(int) Load 46(sizeQueryTemp) + Store 16(WidthU) 52 + 59: 56 Load 58(g_tTex1df4a) + 61: 60(ivec2) ImageQuerySize 59 + Store 55(sizeQueryTemp) 61 + 63: 7(ptr) AccessChain 55(sizeQueryTemp) 62 + 64: 6(int) Load 63 + Store 16(WidthU) 64 + 67: 7(ptr) AccessChain 55(sizeQueryTemp) 66 + 68: 6(int) Load 67 + Store 65(ElementsU) 68 + 73: 70 Load 72(g_tTex1di4a) + 74: 60(ivec2) ImageQuerySize 73 + Store 69(sizeQueryTemp) 74 + 75: 7(ptr) AccessChain 69(sizeQueryTemp) 62 + 76: 6(int) Load 75 + Store 16(WidthU) 76 + 77: 7(ptr) AccessChain 69(sizeQueryTemp) 66 + 78: 6(int) Load 77 + Store 65(ElementsU) 78 + 83: 80 Load 82(g_tTex1du4a) + 84: 60(ivec2) ImageQuerySize 83 + Store 79(sizeQueryTemp) 84 + 85: 7(ptr) AccessChain 79(sizeQueryTemp) 62 + 86: 6(int) Load 85 + Store 16(WidthU) 86 + 87: 7(ptr) AccessChain 79(sizeQueryTemp) 66 + 88: 6(int) Load 87 + Store 65(ElementsU) 88 + 93: 90 Load 92(g_tTex2df4) + 94: 60(ivec2) ImageQuerySize 93 + Store 89(sizeQueryTemp) 94 + 95: 7(ptr) AccessChain 89(sizeQueryTemp) 62 + 96: 6(int) Load 95 + Store 16(WidthU) 96 + 98: 7(ptr) AccessChain 89(sizeQueryTemp) 66 + 99: 6(int) Load 98 + Store 97(HeightU) 99 + 104: 101 Load 103(g_tTex2di4) + 105: 60(ivec2) ImageQuerySize 104 + Store 100(sizeQueryTemp) 105 + 106: 7(ptr) AccessChain 100(sizeQueryTemp) 62 + 107: 6(int) Load 106 + Store 16(WidthU) 107 + 108: 7(ptr) AccessChain 100(sizeQueryTemp) 66 + 109: 6(int) Load 108 + Store 97(HeightU) 109 + 114: 111 Load 113(g_tTex2du4) + 115: 60(ivec2) ImageQuerySize 114 + Store 110(sizeQueryTemp) 115 + 116: 7(ptr) AccessChain 110(sizeQueryTemp) 62 + 117: 6(int) Load 116 + Store 16(WidthU) 117 + 118: 7(ptr) AccessChain 110(sizeQueryTemp) 66 + 119: 6(int) Load 118 + Store 97(HeightU) 119 + 126: 123 Load 125(g_tTex2df4a) + 128: 127(ivec3) ImageQuerySize 126 + Store 122(sizeQueryTemp) 128 + 129: 7(ptr) AccessChain 122(sizeQueryTemp) 62 + 130: 6(int) Load 129 + Store 16(WidthU) 130 + 131: 7(ptr) AccessChain 122(sizeQueryTemp) 66 + 132: 6(int) Load 131 + Store 97(HeightU) 132 + 134: 7(ptr) AccessChain 122(sizeQueryTemp) 133 + 135: 6(int) Load 134 + Store 65(ElementsU) 135 + 140: 137 Load 139(g_tTex2di4a) + 141: 127(ivec3) ImageQuerySize 140 + Store 136(sizeQueryTemp) 141 + 142: 7(ptr) AccessChain 136(sizeQueryTemp) 62 + 143: 6(int) Load 142 + Store 16(WidthU) 143 + 144: 7(ptr) AccessChain 136(sizeQueryTemp) 66 + 145: 6(int) Load 144 + Store 97(HeightU) 145 + 146: 7(ptr) AccessChain 136(sizeQueryTemp) 133 + 147: 6(int) Load 146 + Store 65(ElementsU) 147 + 152: 149 Load 151(g_tTex2du4a) + 153: 127(ivec3) ImageQuerySize 152 + Store 148(sizeQueryTemp) 153 + 154: 7(ptr) AccessChain 148(sizeQueryTemp) 62 + 155: 6(int) Load 154 + Store 16(WidthU) 155 + 156: 7(ptr) AccessChain 148(sizeQueryTemp) 66 + 157: 6(int) Load 156 + Store 97(HeightU) 157 + 158: 7(ptr) AccessChain 148(sizeQueryTemp) 133 + 159: 6(int) Load 158 + Store 65(ElementsU) 159 + 164: 161 Load 163(g_tTex3df4) + 165: 127(ivec3) ImageQuerySize 164 + Store 160(sizeQueryTemp) 165 + 166: 7(ptr) AccessChain 160(sizeQueryTemp) 62 + 167: 6(int) Load 166 + Store 16(WidthU) 167 + 168: 7(ptr) AccessChain 160(sizeQueryTemp) 66 + 169: 6(int) Load 168 + Store 97(HeightU) 169 + 171: 7(ptr) AccessChain 160(sizeQueryTemp) 133 + 172: 6(int) Load 171 + Store 170(DepthU) 172 + 177: 174 Load 176(g_tTex3di4) + 178: 127(ivec3) ImageQuerySize 177 + Store 173(sizeQueryTemp) 178 + 179: 7(ptr) AccessChain 173(sizeQueryTemp) 62 + 180: 6(int) Load 179 + Store 16(WidthU) 180 + 181: 7(ptr) AccessChain 173(sizeQueryTemp) 66 + 182: 6(int) Load 181 + Store 97(HeightU) 182 + 183: 7(ptr) AccessChain 173(sizeQueryTemp) 133 + 184: 6(int) Load 183 + Store 170(DepthU) 184 + 189: 186 Load 188(g_tTex3du4) + 190: 127(ivec3) ImageQuerySize 189 + Store 185(sizeQueryTemp) 190 + 191: 7(ptr) AccessChain 185(sizeQueryTemp) 62 + 192: 6(int) Load 191 + Store 16(WidthU) 192 + 193: 7(ptr) AccessChain 185(sizeQueryTemp) 66 + 194: 6(int) Load 193 + Store 97(HeightU) 194 + 195: 7(ptr) AccessChain 185(sizeQueryTemp) 133 + 196: 6(int) Load 195 + Store 170(DepthU) 196 + 205: 204(ptr) AccessChain 200(psout) 201 + Store 205 203 + 208: 207(ptr) AccessChain 200(psout) 206 + Store 208 202 + 211: 204(ptr) AccessChain 200(psout) 201 + 212: 197(fvec4) Load 211 + Store 210(Color) 212 + 215: 207(ptr) AccessChain 200(psout) 206 + 216: 9(float) Load 215 + Store 214(Depth) 216 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out new file mode 100644 index 000000000..78b48040a --- /dev/null +++ b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out @@ -0,0 +1,200 @@ +hlsl.load.rwbuffer.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color}) +0:22 Function Parameters: +0:? Sequence +0:25 imageLoad (global 4-component vector of float) +0:25 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:25 c1: direct index for structure (layout(offset=0 ) uniform int) +0:25 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:25 Constant: +0:25 0 (const uint) +0:26 imageLoad (global 4-component vector of uint) +0:26 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:26 c1: direct index for structure (layout(offset=0 ) uniform int) +0:26 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:26 Constant: +0:26 0 (const uint) +0:27 imageLoad (global 4-component vector of int) +0:27 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:27 c1: direct index for structure (layout(offset=0 ) uniform int) +0:27 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:27 Constant: +0:27 0 (const uint) +0:29 move second child to first child (temp 4-component vector of float) +0:29 Color: direct index for structure (temp 4-component vector of float) +0:29 'psout' (temp structure{temp 4-component vector of float Color}) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 1.000000 +0:29 1.000000 +0:29 1.000000 +0:29 1.000000 +0:31 Sequence +0:31 Sequence +0:31 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:31 Color: direct index for structure (temp 4-component vector of float) +0:31 'psout' (temp structure{temp 4-component vector of float Color}) +0:31 Constant: +0:31 0 (const int) +0:31 Branch: Return +0:? Linker Objects +0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color}) +0:22 Function Parameters: +0:? Sequence +0:25 imageLoad (global 4-component vector of float) +0:25 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:25 c1: direct index for structure (layout(offset=0 ) uniform int) +0:25 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:25 Constant: +0:25 0 (const uint) +0:26 imageLoad (global 4-component vector of uint) +0:26 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:26 c1: direct index for structure (layout(offset=0 ) uniform int) +0:26 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:26 Constant: +0:26 0 (const uint) +0:27 imageLoad (global 4-component vector of int) +0:27 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:27 c1: direct index for structure (layout(offset=0 ) uniform int) +0:27 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:27 Constant: +0:27 0 (const uint) +0:29 move second child to first child (temp 4-component vector of float) +0:29 Color: direct index for structure (temp 4-component vector of float) +0:29 'psout' (temp structure{temp 4-component vector of float Color}) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 1.000000 +0:29 1.000000 +0:29 1.000000 +0:29 1.000000 +0:31 Sequence +0:31 Sequence +0:31 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:31 Color: direct index for structure (temp 4-component vector of float) +0:31 'psout' (temp structure{temp 4-component vector of float Color}) +0:31 Constant: +0:31 0 (const int) +0:31 Branch: Return +0:? Linker Objects +0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer) +0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer) +0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 52 + + Capability Shader + Capability SampledBuffer + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 48 + ExecutionMode 4 OriginUpperLeft + Name 4 "main" + Name 9 "g_tBuffF" + Name 15 "$Global" + MemberName 15($Global) 0 "c1" + MemberName 15($Global) 1 "c2" + MemberName 15($Global) 2 "c3" + MemberName 15($Global) 3 "c4" + MemberName 15($Global) 4 "o1" + MemberName 15($Global) 5 "o2" + MemberName 15($Global) 6 "o3" + MemberName 15($Global) 7 "o4" + Name 17 "" + Name 27 "g_tBuffU" + Name 35 "g_tBuffI" + Name 40 "PS_OUTPUT" + MemberName 40(PS_OUTPUT) 0 "Color" + Name 42 "psout" + Name 48 "Color" + Decorate 9(g_tBuffF) DescriptorSet 0 + MemberDecorate 15($Global) 0 Offset 0 + MemberDecorate 15($Global) 1 Offset 8 + MemberDecorate 15($Global) 2 Offset 16 + MemberDecorate 15($Global) 3 Offset 32 + MemberDecorate 15($Global) 4 Offset 48 + MemberDecorate 15($Global) 5 Offset 56 + MemberDecorate 15($Global) 6 Offset 64 + MemberDecorate 15($Global) 7 Offset 80 + Decorate 15($Global) Block + Decorate 17 DescriptorSet 0 + Decorate 27(g_tBuffU) DescriptorSet 0 + Decorate 35(g_tBuffI) DescriptorSet 0 + Decorate 48(Color) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) Buffer nonsampled format:Rgba32f + 8: TypePointer UniformConstant 7 + 9(g_tBuffF): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 2 + 13: TypeVector 11(int) 3 + 14: TypeVector 11(int) 4 + 15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4) + 16: TypePointer Uniform 15($Global) + 17: 16(ptr) Variable Uniform + 18: 11(int) Constant 0 + 19: TypePointer Uniform 11(int) + 22: TypeVector 6(float) 4 + 24: TypeInt 32 0 + 25: TypeImage 24(int) Buffer nonsampled format:Rgba32ui + 26: TypePointer UniformConstant 25 + 27(g_tBuffU): 26(ptr) Variable UniformConstant + 31: TypeVector 24(int) 4 + 33: TypeImage 11(int) Buffer nonsampled format:Rgba32i + 34: TypePointer UniformConstant 33 + 35(g_tBuffI): 34(ptr) Variable UniformConstant + 40(PS_OUTPUT): TypeStruct 22(fvec4) + 41: TypePointer Function 40(PS_OUTPUT) + 43: 6(float) Constant 1065353216 + 44: 22(fvec4) ConstantComposite 43 43 43 43 + 45: TypePointer Function 22(fvec4) + 47: TypePointer Output 22(fvec4) + 48(Color): 47(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 42(psout): 41(ptr) Variable Function + 10: 7 Load 9(g_tBuffF) + 20: 19(ptr) AccessChain 17 18 + 21: 11(int) Load 20 + 23: 22(fvec4) ImageRead 10 21 + 28: 25 Load 27(g_tBuffU) + 29: 19(ptr) AccessChain 17 18 + 30: 11(int) Load 29 + 32: 31(ivec4) ImageRead 28 30 + 36: 33 Load 35(g_tBuffI) + 37: 19(ptr) AccessChain 17 18 + 38: 11(int) Load 37 + 39: 14(ivec4) ImageRead 36 38 + 46: 45(ptr) AccessChain 42(psout) 18 + Store 46 44 + 49: 45(ptr) AccessChain 42(psout) 18 + 50: 22(fvec4) Load 49 + Store 48(Color) 50 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out new file mode 100644 index 000000000..353f769ce --- /dev/null +++ b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out @@ -0,0 +1,383 @@ +hlsl.load.rwtexture.array.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:40 Function Parameters: +0:? Sequence +0:44 imageLoad (global 4-component vector of float) +0:44 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:44 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:44 Constant: +0:44 1 (const uint) +0:45 imageLoad (global 4-component vector of int) +0:45 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:45 Constant: +0:45 1 (const uint) +0:46 imageLoad (global 4-component vector of uint) +0:46 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:46 Constant: +0:46 1 (const uint) +0:49 imageLoad (global 4-component vector of float) +0:49 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:49 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:49 Constant: +0:49 2 (const uint) +0:50 imageLoad (global 4-component vector of int) +0:50 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:50 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:50 Constant: +0:50 2 (const uint) +0:51 imageLoad (global 4-component vector of uint) +0:51 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:51 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:51 Constant: +0:51 2 (const uint) +0:53 move second child to first child (temp 4-component vector of float) +0:53 Color: direct index for structure (temp 4-component vector of float) +0:53 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1.000000 +0:53 1.000000 +0:53 1.000000 +0:53 1.000000 +0:54 move second child to first child (temp float) +0:54 Depth: direct index for structure (temp float) +0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:54 Constant: +0:54 1 (const int) +0:54 Constant: +0:54 1.000000 +0:56 Sequence +0:56 Sequence +0:56 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:56 Color: direct index for structure (temp 4-component vector of float) +0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:56 Constant: +0:56 0 (const int) +0:56 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:56 Depth: direct index for structure (temp float) +0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:56 Constant: +0:56 1 (const int) +0:56 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:40 Function Parameters: +0:? Sequence +0:44 imageLoad (global 4-component vector of float) +0:44 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:44 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:44 Constant: +0:44 1 (const uint) +0:45 imageLoad (global 4-component vector of int) +0:45 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:45 Constant: +0:45 1 (const uint) +0:46 imageLoad (global 4-component vector of uint) +0:46 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:46 Constant: +0:46 1 (const uint) +0:49 imageLoad (global 4-component vector of float) +0:49 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:49 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:49 Constant: +0:49 2 (const uint) +0:50 imageLoad (global 4-component vector of int) +0:50 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:50 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:50 Constant: +0:50 2 (const uint) +0:51 imageLoad (global 4-component vector of uint) +0:51 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:51 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:51 Constant: +0:51 2 (const uint) +0:53 move second child to first child (temp 4-component vector of float) +0:53 Color: direct index for structure (temp 4-component vector of float) +0:53 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1.000000 +0:53 1.000000 +0:53 1.000000 +0:53 1.000000 +0:54 move second child to first child (temp float) +0:54 Depth: direct index for structure (temp float) +0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:54 Constant: +0:54 1 (const int) +0:54 Constant: +0:54 1.000000 +0:56 Sequence +0:56 Sequence +0:56 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:56 Color: direct index for structure (temp 4-component vector of float) +0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:56 Constant: +0:56 0 (const int) +0:56 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:56 Depth: direct index for structure (temp float) +0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:56 Constant: +0:56 1 (const int) +0:56 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 112 + + Capability Shader + Capability Sampled1D + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 74 78 + ExecutionMode 4 OriginUpperLeft + Name 4 "main" + Name 9 "g_tTex1df4a" + Name 15 "$Global" + MemberName 15($Global) 0 "c1" + MemberName 15($Global) 1 "c2" + MemberName 15($Global) 2 "c3" + MemberName 15($Global) 3 "c4" + MemberName 15($Global) 4 "o1" + MemberName 15($Global) 5 "o2" + MemberName 15($Global) 6 "o3" + MemberName 15($Global) 7 "o4" + Name 17 "" + Name 26 "g_tTex1di4a" + Name 34 "g_tTex1du4a" + Name 42 "g_tTex2df4a" + Name 51 "g_tTex2di4a" + Name 58 "g_tTex2du4a" + Name 63 "PS_OUTPUT" + MemberName 63(PS_OUTPUT) 0 "Color" + MemberName 63(PS_OUTPUT) 1 "Depth" + Name 65 "psout" + Name 74 "Color" + Name 78 "Depth" + Name 84 "g_sSamp" + Name 87 "g_tTex1df4" + Name 90 "g_tTex1di4" + Name 93 "g_tTex1du4" + Name 96 "g_tTex2df4" + Name 99 "g_tTex2di4" + Name 102 "g_tTex2du4" + Name 105 "g_tTex3df4" + Name 108 "g_tTex3di4" + Name 111 "g_tTex3du4" + Decorate 9(g_tTex1df4a) DescriptorSet 0 + MemberDecorate 15($Global) 0 Offset 0 + MemberDecorate 15($Global) 1 Offset 8 + MemberDecorate 15($Global) 2 Offset 16 + MemberDecorate 15($Global) 3 Offset 32 + MemberDecorate 15($Global) 4 Offset 48 + MemberDecorate 15($Global) 5 Offset 56 + MemberDecorate 15($Global) 6 Offset 64 + MemberDecorate 15($Global) 7 Offset 80 + Decorate 15($Global) Block + Decorate 17 DescriptorSet 0 + Decorate 26(g_tTex1di4a) DescriptorSet 0 + Decorate 34(g_tTex1du4a) DescriptorSet 0 + Decorate 42(g_tTex2df4a) DescriptorSet 0 + Decorate 51(g_tTex2di4a) DescriptorSet 0 + Decorate 58(g_tTex2du4a) DescriptorSet 0 + Decorate 74(Color) Location 0 + Decorate 78(Depth) BuiltIn FragDepth + Decorate 84(g_sSamp) DescriptorSet 0 + Decorate 84(g_sSamp) Binding 0 + Decorate 87(g_tTex1df4) DescriptorSet 0 + Decorate 87(g_tTex1df4) Binding 0 + Decorate 90(g_tTex1di4) DescriptorSet 0 + Decorate 93(g_tTex1du4) DescriptorSet 0 + Decorate 96(g_tTex2df4) DescriptorSet 0 + Decorate 99(g_tTex2di4) DescriptorSet 0 + Decorate 102(g_tTex2du4) DescriptorSet 0 + Decorate 105(g_tTex3df4) DescriptorSet 0 + Decorate 108(g_tTex3di4) DescriptorSet 0 + Decorate 111(g_tTex3du4) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D array nonsampled format:Rgba32f + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4a): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 2 + 13: TypeVector 11(int) 3 + 14: TypeVector 11(int) 4 + 15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4) + 16: TypePointer Uniform 15($Global) + 17: 16(ptr) Variable Uniform + 18: 11(int) Constant 1 + 19: TypePointer Uniform 12(ivec2) + 22: TypeVector 6(float) 4 + 24: TypeImage 11(int) 1D array nonsampled format:Rgba32i + 25: TypePointer UniformConstant 24 + 26(g_tTex1di4a): 25(ptr) Variable UniformConstant + 31: TypeInt 32 0 + 32: TypeImage 31(int) 1D array nonsampled format:Rgba32ui + 33: TypePointer UniformConstant 32 + 34(g_tTex1du4a): 33(ptr) Variable UniformConstant + 38: TypeVector 31(int) 4 + 40: TypeImage 6(float) 2D array nonsampled format:Rgba32f + 41: TypePointer UniformConstant 40 + 42(g_tTex2df4a): 41(ptr) Variable UniformConstant + 44: 11(int) Constant 2 + 45: TypePointer Uniform 13(ivec3) + 49: TypeImage 11(int) 2D array nonsampled format:Rgba32i + 50: TypePointer UniformConstant 49 + 51(g_tTex2di4a): 50(ptr) Variable UniformConstant + 56: TypeImage 31(int) 2D array nonsampled format:Rgba32ui + 57: TypePointer UniformConstant 56 + 58(g_tTex2du4a): 57(ptr) Variable UniformConstant + 63(PS_OUTPUT): TypeStruct 22(fvec4) 6(float) + 64: TypePointer Function 63(PS_OUTPUT) + 66: 11(int) Constant 0 + 67: 6(float) Constant 1065353216 + 68: 22(fvec4) ConstantComposite 67 67 67 67 + 69: TypePointer Function 22(fvec4) + 71: TypePointer Function 6(float) + 73: TypePointer Output 22(fvec4) + 74(Color): 73(ptr) Variable Output + 77: TypePointer Output 6(float) + 78(Depth): 77(ptr) Variable Output + 82: TypeSampler + 83: TypePointer UniformConstant 82 + 84(g_sSamp): 83(ptr) Variable UniformConstant + 85: TypeImage 6(float) 1D nonsampled format:Rgba32f + 86: TypePointer UniformConstant 85 + 87(g_tTex1df4): 86(ptr) Variable UniformConstant + 88: TypeImage 11(int) 1D nonsampled format:Rgba32i + 89: TypePointer UniformConstant 88 + 90(g_tTex1di4): 89(ptr) Variable UniformConstant + 91: TypeImage 31(int) 1D nonsampled format:Rgba32ui + 92: TypePointer UniformConstant 91 + 93(g_tTex1du4): 92(ptr) Variable UniformConstant + 94: TypeImage 6(float) 2D nonsampled format:Rgba32f + 95: TypePointer UniformConstant 94 + 96(g_tTex2df4): 95(ptr) Variable UniformConstant + 97: TypeImage 11(int) 2D nonsampled format:Rgba32i + 98: TypePointer UniformConstant 97 + 99(g_tTex2di4): 98(ptr) Variable UniformConstant + 100: TypeImage 31(int) 2D nonsampled format:Rgba32ui + 101: TypePointer UniformConstant 100 + 102(g_tTex2du4): 101(ptr) Variable UniformConstant + 103: TypeImage 6(float) 3D nonsampled format:Rgba32f + 104: TypePointer UniformConstant 103 + 105(g_tTex3df4): 104(ptr) Variable UniformConstant + 106: TypeImage 11(int) 3D nonsampled format:Rgba32i + 107: TypePointer UniformConstant 106 + 108(g_tTex3di4): 107(ptr) Variable UniformConstant + 109: TypeImage 31(int) 3D nonsampled format:Rgba32ui + 110: TypePointer UniformConstant 109 + 111(g_tTex3du4): 110(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 65(psout): 64(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4a) + 20: 19(ptr) AccessChain 17 18 + 21: 12(ivec2) Load 20 + 23: 22(fvec4) ImageRead 10 21 + 27: 24 Load 26(g_tTex1di4a) + 28: 19(ptr) AccessChain 17 18 + 29: 12(ivec2) Load 28 + 30: 14(ivec4) ImageRead 27 29 + 35: 32 Load 34(g_tTex1du4a) + 36: 19(ptr) AccessChain 17 18 + 37: 12(ivec2) Load 36 + 39: 38(ivec4) ImageRead 35 37 + 43: 40 Load 42(g_tTex2df4a) + 46: 45(ptr) AccessChain 17 44 + 47: 13(ivec3) Load 46 + 48: 22(fvec4) ImageRead 43 47 + 52: 49 Load 51(g_tTex2di4a) + 53: 45(ptr) AccessChain 17 44 + 54: 13(ivec3) Load 53 + 55: 14(ivec4) ImageRead 52 54 + 59: 56 Load 58(g_tTex2du4a) + 60: 45(ptr) AccessChain 17 44 + 61: 13(ivec3) Load 60 + 62: 38(ivec4) ImageRead 59 61 + 70: 69(ptr) AccessChain 65(psout) 66 + Store 70 68 + 72: 71(ptr) AccessChain 65(psout) 18 + Store 72 67 + 75: 69(ptr) AccessChain 65(psout) 66 + 76: 22(fvec4) Load 75 + Store 74(Color) 76 + 79: 71(ptr) AccessChain 65(psout) 18 + 80: 6(float) Load 79 + Store 78(Depth) 80 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out new file mode 100644 index 000000000..60c54000f --- /dev/null +++ b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out @@ -0,0 +1,432 @@ +hlsl.load.rwtexture.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:40 Function Parameters: +0:? Sequence +0:44 imageLoad (global 4-component vector of float) +0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:44 c1: direct index for structure (layout(offset=0 ) uniform int) +0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:44 Constant: +0:44 0 (const uint) +0:45 imageLoad (global 4-component vector of int) +0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:45 c1: direct index for structure (layout(offset=0 ) uniform int) +0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:45 Constant: +0:45 0 (const uint) +0:46 imageLoad (global 4-component vector of uint) +0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:46 c1: direct index for structure (layout(offset=0 ) uniform int) +0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:46 Constant: +0:46 0 (const uint) +0:49 imageLoad (global 4-component vector of float) +0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:49 Constant: +0:49 1 (const uint) +0:50 imageLoad (global 4-component vector of int) +0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:50 Constant: +0:50 1 (const uint) +0:51 imageLoad (global 4-component vector of uint) +0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:51 Constant: +0:51 1 (const uint) +0:54 imageLoad (global 4-component vector of float) +0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:54 Constant: +0:54 2 (const uint) +0:55 imageLoad (global 4-component vector of int) +0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:55 Constant: +0:55 2 (const uint) +0:56 imageLoad (global 4-component vector of uint) +0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:56 Constant: +0:56 2 (const uint) +0:58 move second child to first child (temp 4-component vector of float) +0:58 Color: direct index for structure (temp 4-component vector of float) +0:58 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1.000000 +0:58 1.000000 +0:58 1.000000 +0:58 1.000000 +0:59 move second child to first child (temp float) +0:59 Depth: direct index for structure (temp float) +0:59 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 1.000000 +0:61 Sequence +0:61 Sequence +0:61 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:61 Color: direct index for structure (temp 4-component vector of float) +0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:61 Depth: direct index for structure (temp float) +0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:61 Constant: +0:61 1 (const int) +0:61 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:40 Function Parameters: +0:? Sequence +0:44 imageLoad (global 4-component vector of float) +0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:44 c1: direct index for structure (layout(offset=0 ) uniform int) +0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:44 Constant: +0:44 0 (const uint) +0:45 imageLoad (global 4-component vector of int) +0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:45 c1: direct index for structure (layout(offset=0 ) uniform int) +0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:45 Constant: +0:45 0 (const uint) +0:46 imageLoad (global 4-component vector of uint) +0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:46 c1: direct index for structure (layout(offset=0 ) uniform int) +0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:46 Constant: +0:46 0 (const uint) +0:49 imageLoad (global 4-component vector of float) +0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:49 Constant: +0:49 1 (const uint) +0:50 imageLoad (global 4-component vector of int) +0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:50 Constant: +0:50 1 (const uint) +0:51 imageLoad (global 4-component vector of uint) +0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int) +0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:51 Constant: +0:51 1 (const uint) +0:54 imageLoad (global 4-component vector of float) +0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:54 Constant: +0:54 2 (const uint) +0:55 imageLoad (global 4-component vector of int) +0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:55 Constant: +0:55 2 (const uint) +0:56 imageLoad (global 4-component vector of uint) +0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int) +0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) +0:56 Constant: +0:56 2 (const uint) +0:58 move second child to first child (temp 4-component vector of float) +0:58 Color: direct index for structure (temp 4-component vector of float) +0:58 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1.000000 +0:58 1.000000 +0:58 1.000000 +0:58 1.000000 +0:59 move second child to first child (temp float) +0:59 Depth: direct index for structure (temp float) +0:59 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 1.000000 +0:61 Sequence +0:61 Sequence +0:61 move second child to first child (temp 4-component vector of float) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:61 Color: direct index for structure (temp 4-component vector of float) +0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child (temp float) +0:? 'Depth' (out float FragDepth) +0:61 Depth: direct index for structure (temp float) +0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth}) +0:61 Constant: +0:61 1 (const int) +0:61 Branch: Return +0:? Linker Objects +0:? 'g_sSamp' (layout(binding=0 ) uniform sampler) +0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D) +0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D) +0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D) +0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D) +0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D) +0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D) +0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D) +0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D) +0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D) +0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray) +0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray) +0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray) +0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray) +0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray) +0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray) +0:? 'Color' (layout(location=0 ) out 4-component vector of float) +0:? 'Depth' (out float FragDepth) +0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4}) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 125 + + Capability Shader + Capability Sampled1D + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 96 100 + ExecutionMode 4 OriginUpperLeft + Name 4 "main" + Name 9 "g_tTex1df4" + Name 15 "$Global" + MemberName 15($Global) 0 "c1" + MemberName 15($Global) 1 "c2" + MemberName 15($Global) 2 "c3" + MemberName 15($Global) 3 "c4" + MemberName 15($Global) 4 "o1" + MemberName 15($Global) 5 "o2" + MemberName 15($Global) 6 "o3" + MemberName 15($Global) 7 "o4" + Name 17 "" + Name 26 "g_tTex1di4" + Name 34 "g_tTex1du4" + Name 42 "g_tTex2df4" + Name 51 "g_tTex2di4" + Name 58 "g_tTex2du4" + Name 65 "g_tTex3df4" + Name 74 "g_tTex3di4" + Name 81 "g_tTex3du4" + Name 86 "PS_OUTPUT" + MemberName 86(PS_OUTPUT) 0 "Color" + MemberName 86(PS_OUTPUT) 1 "Depth" + Name 88 "psout" + Name 96 "Color" + Name 100 "Depth" + Name 106 "g_sSamp" + Name 109 "g_tTex1df4a" + Name 112 "g_tTex1di4a" + Name 115 "g_tTex1du4a" + Name 118 "g_tTex2df4a" + Name 121 "g_tTex2di4a" + Name 124 "g_tTex2du4a" + Decorate 9(g_tTex1df4) DescriptorSet 0 + Decorate 9(g_tTex1df4) Binding 0 + MemberDecorate 15($Global) 0 Offset 0 + MemberDecorate 15($Global) 1 Offset 8 + MemberDecorate 15($Global) 2 Offset 16 + MemberDecorate 15($Global) 3 Offset 32 + MemberDecorate 15($Global) 4 Offset 48 + MemberDecorate 15($Global) 5 Offset 56 + MemberDecorate 15($Global) 6 Offset 64 + MemberDecorate 15($Global) 7 Offset 80 + Decorate 15($Global) Block + Decorate 17 DescriptorSet 0 + Decorate 26(g_tTex1di4) DescriptorSet 0 + Decorate 34(g_tTex1du4) DescriptorSet 0 + Decorate 42(g_tTex2df4) DescriptorSet 0 + Decorate 51(g_tTex2di4) DescriptorSet 0 + Decorate 58(g_tTex2du4) DescriptorSet 0 + Decorate 65(g_tTex3df4) DescriptorSet 0 + Decorate 74(g_tTex3di4) DescriptorSet 0 + Decorate 81(g_tTex3du4) DescriptorSet 0 + Decorate 96(Color) Location 0 + Decorate 100(Depth) BuiltIn FragDepth + Decorate 106(g_sSamp) DescriptorSet 0 + Decorate 106(g_sSamp) Binding 0 + Decorate 109(g_tTex1df4a) DescriptorSet 0 + Decorate 112(g_tTex1di4a) DescriptorSet 0 + Decorate 115(g_tTex1du4a) DescriptorSet 0 + Decorate 118(g_tTex2df4a) DescriptorSet 0 + Decorate 121(g_tTex2di4a) DescriptorSet 0 + Decorate 124(g_tTex2du4a) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D nonsampled format:Rgba32f + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 2 + 13: TypeVector 11(int) 3 + 14: TypeVector 11(int) 4 + 15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4) + 16: TypePointer Uniform 15($Global) + 17: 16(ptr) Variable Uniform + 18: 11(int) Constant 0 + 19: TypePointer Uniform 11(int) + 22: TypeVector 6(float) 4 + 24: TypeImage 11(int) 1D nonsampled format:Rgba32i + 25: TypePointer UniformConstant 24 + 26(g_tTex1di4): 25(ptr) Variable UniformConstant + 31: TypeInt 32 0 + 32: TypeImage 31(int) 1D nonsampled format:Rgba32ui + 33: TypePointer UniformConstant 32 + 34(g_tTex1du4): 33(ptr) Variable UniformConstant + 38: TypeVector 31(int) 4 + 40: TypeImage 6(float) 2D nonsampled format:Rgba32f + 41: TypePointer UniformConstant 40 + 42(g_tTex2df4): 41(ptr) Variable UniformConstant + 44: 11(int) Constant 1 + 45: TypePointer Uniform 12(ivec2) + 49: TypeImage 11(int) 2D nonsampled format:Rgba32i + 50: TypePointer UniformConstant 49 + 51(g_tTex2di4): 50(ptr) Variable UniformConstant + 56: TypeImage 31(int) 2D nonsampled format:Rgba32ui + 57: TypePointer UniformConstant 56 + 58(g_tTex2du4): 57(ptr) Variable UniformConstant + 63: TypeImage 6(float) 3D nonsampled format:Rgba32f + 64: TypePointer UniformConstant 63 + 65(g_tTex3df4): 64(ptr) Variable UniformConstant + 67: 11(int) Constant 2 + 68: TypePointer Uniform 13(ivec3) + 72: TypeImage 11(int) 3D nonsampled format:Rgba32i + 73: TypePointer UniformConstant 72 + 74(g_tTex3di4): 73(ptr) Variable UniformConstant + 79: TypeImage 31(int) 3D nonsampled format:Rgba32ui + 80: TypePointer UniformConstant 79 + 81(g_tTex3du4): 80(ptr) Variable UniformConstant + 86(PS_OUTPUT): TypeStruct 22(fvec4) 6(float) + 87: TypePointer Function 86(PS_OUTPUT) + 89: 6(float) Constant 1065353216 + 90: 22(fvec4) ConstantComposite 89 89 89 89 + 91: TypePointer Function 22(fvec4) + 93: TypePointer Function 6(float) + 95: TypePointer Output 22(fvec4) + 96(Color): 95(ptr) Variable Output + 99: TypePointer Output 6(float) + 100(Depth): 99(ptr) Variable Output + 104: TypeSampler + 105: TypePointer UniformConstant 104 + 106(g_sSamp): 105(ptr) Variable UniformConstant + 107: TypeImage 6(float) 1D array nonsampled format:Rgba32f + 108: TypePointer UniformConstant 107 +109(g_tTex1df4a): 108(ptr) Variable UniformConstant + 110: TypeImage 11(int) 1D array nonsampled format:Rgba32i + 111: TypePointer UniformConstant 110 +112(g_tTex1di4a): 111(ptr) Variable UniformConstant + 113: TypeImage 31(int) 1D array nonsampled format:Rgba32ui + 114: TypePointer UniformConstant 113 +115(g_tTex1du4a): 114(ptr) Variable UniformConstant + 116: TypeImage 6(float) 2D array nonsampled format:Rgba32f + 117: TypePointer UniformConstant 116 +118(g_tTex2df4a): 117(ptr) Variable UniformConstant + 119: TypeImage 11(int) 2D array nonsampled format:Rgba32i + 120: TypePointer UniformConstant 119 +121(g_tTex2di4a): 120(ptr) Variable UniformConstant + 122: TypeImage 31(int) 2D array nonsampled format:Rgba32ui + 123: TypePointer UniformConstant 122 +124(g_tTex2du4a): 123(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 88(psout): 87(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4) + 20: 19(ptr) AccessChain 17 18 + 21: 11(int) Load 20 + 23: 22(fvec4) ImageRead 10 21 + 27: 24 Load 26(g_tTex1di4) + 28: 19(ptr) AccessChain 17 18 + 29: 11(int) Load 28 + 30: 14(ivec4) ImageRead 27 29 + 35: 32 Load 34(g_tTex1du4) + 36: 19(ptr) AccessChain 17 18 + 37: 11(int) Load 36 + 39: 38(ivec4) ImageRead 35 37 + 43: 40 Load 42(g_tTex2df4) + 46: 45(ptr) AccessChain 17 44 + 47: 12(ivec2) Load 46 + 48: 22(fvec4) ImageRead 43 47 + 52: 49 Load 51(g_tTex2di4) + 53: 45(ptr) AccessChain 17 44 + 54: 12(ivec2) Load 53 + 55: 14(ivec4) ImageRead 52 54 + 59: 56 Load 58(g_tTex2du4) + 60: 45(ptr) AccessChain 17 44 + 61: 12(ivec2) Load 60 + 62: 38(ivec4) ImageRead 59 61 + 66: 63 Load 65(g_tTex3df4) + 69: 68(ptr) AccessChain 17 67 + 70: 13(ivec3) Load 69 + 71: 22(fvec4) ImageRead 66 70 + 75: 72 Load 74(g_tTex3di4) + 76: 68(ptr) AccessChain 17 67 + 77: 13(ivec3) Load 76 + 78: 14(ivec4) ImageRead 75 77 + 82: 79 Load 81(g_tTex3du4) + 83: 68(ptr) AccessChain 17 67 + 84: 13(ivec3) Load 83 + 85: 38(ivec4) ImageRead 82 84 + 92: 91(ptr) AccessChain 88(psout) 18 + Store 92 90 + 94: 93(ptr) AccessChain 88(psout) 44 + Store 94 89 + 97: 91(ptr) AccessChain 88(psout) 18 + 98: 22(fvec4) Load 97 + Store 96(Color) 98 + 101: 93(ptr) AccessChain 88(psout) 44 + 102: 6(float) Load 101 + Store 100(Depth) 102 + Return + FunctionEnd diff --git a/Test/hlsl.getdimensions.rw.dx10.frag b/Test/hlsl.getdimensions.rw.dx10.frag new file mode 100644 index 000000000..957a80828 --- /dev/null +++ b/Test/hlsl.getdimensions.rw.dx10.frag @@ -0,0 +1,96 @@ +SamplerState g_sSamp : register(s0); + +RWTexture1D g_tTex1df4 : register(t0); +RWTexture1D g_tTex1di4; +RWTexture1D g_tTex1du4; + +RWTexture2D g_tTex2df4; +RWTexture2D g_tTex2di4; +RWTexture2D g_tTex2du4; + +RWTexture3D g_tTex3df4; +RWTexture3D g_tTex3di4; +RWTexture3D g_tTex3du4; + +RWTexture1DArray g_tTex1df4a; +RWTexture1DArray g_tTex1di4a; +RWTexture1DArray g_tTex1du4a; + +RWTexture2DArray g_tTex2df4a; +RWTexture2DArray g_tTex2di4a; +RWTexture2DArray g_tTex2du4a; + +RWBuffer g_tBuffF; +RWBuffer g_tBuffI; +RWBuffer g_tBuffU; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + uint MipLevel; + uint WidthU; + uint HeightU; + uint ElementsU; + uint DepthU; + uint NumberOfLevelsU; + uint NumberOfSamplesU; + + float WidthF; + float HeightF; + float ElementsF; + float DepthF; + float NumberOfLevelsF; + float NumberOfSamplesF; + + // 1D, float/int/uint, uint params + g_tTex1df4.GetDimensions(WidthU); + g_tTex1di4.GetDimensions(WidthU); + g_tTex1du4.GetDimensions(WidthU); + + // buffer, float/int/uint, uint params + g_tBuffF.GetDimensions(WidthU); + g_tBuffI.GetDimensions(WidthU); + g_tBuffU.GetDimensions(WidthU); + + // 1DArray, float/int/uint, uint params + g_tTex1df4a.GetDimensions(WidthU, ElementsU); + g_tTex1di4a.GetDimensions(WidthU, ElementsU); + g_tTex1du4a.GetDimensions(WidthU, ElementsU); + + // 2D, float/int/uint, uint params + g_tTex2df4.GetDimensions(WidthU, HeightU); + g_tTex2di4.GetDimensions(WidthU, HeightU); + g_tTex2du4.GetDimensions(WidthU, HeightU); + + // 2DArray, float/int/uint, uint params + g_tTex2df4a.GetDimensions(WidthU, HeightU, ElementsU); + g_tTex2di4a.GetDimensions(WidthU, HeightU, ElementsU); + g_tTex2du4a.GetDimensions(WidthU, HeightU, ElementsU); + + // 3D, float/int/uint, uint params + g_tTex3df4.GetDimensions(WidthU, HeightU, DepthU); + g_tTex3di4.GetDimensions(WidthU, HeightU, DepthU); + g_tTex3du4.GetDimensions(WidthU, HeightU, DepthU); + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.rwbuffer.dx10.frag b/Test/hlsl.load.rwbuffer.dx10.frag new file mode 100644 index 000000000..accd5f0c1 --- /dev/null +++ b/Test/hlsl.load.rwbuffer.dx10.frag @@ -0,0 +1,32 @@ + +RWBuffer g_tBuffF; +RWBuffer g_tBuffI; +RWBuffer g_tBuffU; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + g_tBuffF.Load(c1); + g_tBuffU.Load(c1); + g_tBuffI.Load(c1); + + psout.Color = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.rwtexture.array.dx10.frag b/Test/hlsl.load.rwtexture.array.dx10.frag new file mode 100644 index 000000000..38e290962 --- /dev/null +++ b/Test/hlsl.load.rwtexture.array.dx10.frag @@ -0,0 +1,57 @@ +SamplerState g_sSamp : register(s0); + +RWTexture1D g_tTex1df4 : register(t0); +RWTexture1D g_tTex1di4; +RWTexture1D g_tTex1du4; + +RWTexture2D g_tTex2df4; +RWTexture2D g_tTex2di4; +RWTexture2D g_tTex2du4; + +RWTexture3D g_tTex3df4; +RWTexture3D g_tTex3di4; +RWTexture3D g_tTex3du4; + +RWTexture1DArray g_tTex1df4a; +RWTexture1DArray g_tTex1di4a; +RWTexture1DArray g_tTex1du4a; + +RWTexture2DArray g_tTex2df4a; +RWTexture2DArray g_tTex2di4a; +RWTexture2DArray g_tTex2du4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1D + g_tTex1df4a.Load(c2); + g_tTex1di4a.Load(c2); + g_tTex1du4a.Load(c2); + + // 2D + g_tTex2df4a.Load(c3); + g_tTex2di4a.Load(c3); + g_tTex2du4a.Load(c3); + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.rwtexture.dx10.frag b/Test/hlsl.load.rwtexture.dx10.frag new file mode 100644 index 000000000..c09507766 --- /dev/null +++ b/Test/hlsl.load.rwtexture.dx10.frag @@ -0,0 +1,62 @@ +SamplerState g_sSamp : register(s0); + +RWTexture1D g_tTex1df4 : register(t0); +RWTexture1D g_tTex1di4; +RWTexture1D g_tTex1du4; + +RWTexture2D g_tTex2df4; +RWTexture2D g_tTex2di4; +RWTexture2D g_tTex2du4; + +RWTexture3D g_tTex3df4; +RWTexture3D g_tTex3di4; +RWTexture3D g_tTex3du4; + +RWTexture1DArray g_tTex1df4a; +RWTexture1DArray g_tTex1di4a; +RWTexture1DArray g_tTex1du4a; + +RWTexture2DArray g_tTex2df4a; +RWTexture2DArray g_tTex2di4a; +RWTexture2DArray g_tTex2du4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1D + g_tTex1df4.Load(c1); + g_tTex1di4.Load(c1); + g_tTex1du4.Load(c1); + + // 2D + g_tTex2df4.Load(c2); + g_tTex2di4.Load(c2); + g_tTex2du4.Load(c2); + + // 3D + g_tTex3df4.Load(c3); + g_tTex3di4.Load(c3); + g_tTex3du4.Load(c3); + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp index b587b0d6e..90b62d150 100644 --- a/gtests/Hlsl.FromFile.cpp +++ b/gtests/Hlsl.FromFile.cpp @@ -111,6 +111,7 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.gatherRGBA.offset.dx10.frag", "main"}, {"hlsl.gatherRGBA.offsetarray.dx10.frag", "main"}, {"hlsl.getdimensions.dx10.frag", "main"}, + {"hlsl.getdimensions.rw.dx10.frag", "main"}, {"hlsl.getdimensions.dx10.vert", "main"}, {"hlsl.getsampleposition.dx10.frag", "main"}, {"hlsl.if.frag", "PixelShaderFunction"}, @@ -133,6 +134,9 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.load.basic.dx10.frag", "main"}, {"hlsl.load.basic.dx10.vert", "main"}, {"hlsl.load.buffer.dx10.frag", "main"}, + {"hlsl.load.rwbuffer.dx10.frag", "main"}, + {"hlsl.load.rwtexture.dx10.frag", "main"}, + {"hlsl.load.rwtexture.array.dx10.frag", "main"}, {"hlsl.load.offset.dx10.frag", "main"}, {"hlsl.load.offsetarray.dx10.frag", "main"}, {"hlsl.multiEntry.vert", "RealEntrypoint"}, diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp index b41618c23..626d29912 100755 --- a/hlsl/hlslGrammar.cpp +++ b/hlsl/hlslGrammar.cpp @@ -460,8 +460,14 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type) // further, it can create an anonymous instance of the block if (peekTokenClass(EHTokSemicolon)) parseContext.declareBlock(loc, type); - } else + } else { + // Some qualifiers are set when parsing the type. Merge those with + // whatever comes from acceptQualifier. + assert(qualifier.layoutFormat == ElfNone); + qualifier.layoutFormat = type.getQualifier().layoutFormat; + type.getQualifier() = qualifier; + } return true; } @@ -827,6 +833,13 @@ bool HlslGrammar::acceptSamplerType(TType& type) // | TEXTURECUBEARRAY // | TEXTURE2DMS // | TEXTURE2DMSARRAY +// | RWBUFFER +// | RWTEXTURE1D +// | RWTEXTURE1DARRAY +// | RWTEXTURE2D +// | RWTEXTURE2DARRAY +// | RWTEXTURE3D + bool HlslGrammar::acceptTextureType(TType& type) { const EHlslTokenClass textureType = peek(); @@ -834,6 +847,7 @@ bool HlslGrammar::acceptTextureType(TType& type) TSamplerDim dim = EsdNone; bool array = false; bool ms = false; + bool image = false; switch (textureType) { case EHTokBuffer: dim = EsdBuffer; break; @@ -846,6 +860,12 @@ bool HlslGrammar::acceptTextureType(TType& type) case EHTokTextureCubearray: dim = EsdCube; array = true; break; case EHTokTexture2DMS: dim = Esd2D; ms = true; break; case EHTokTexture2DMSarray: dim = Esd2D; array = true; ms = true; break; + case EHTokRWBuffer: dim = EsdBuffer; image=true; break; + case EHTokRWTexture1d: dim = Esd1D; array=false; image=true; break; + case EHTokRWTexture1darray: dim = Esd1D; array=true; image=true; break; + case EHTokRWTexture2d: dim = Esd2D; array=false; image=true; break; + case EHTokRWTexture2darray: dim = Esd2D; array=true; image=true; break; + case EHTokRWTexture3d: dim = Esd3D; array=false; image=true; break; default: return false; // not a texture declaration } @@ -856,7 +876,7 @@ bool HlslGrammar::acceptTextureType(TType& type) TIntermTyped* msCount = nullptr; - // texture type: required for multisample types! + // texture type: required for multisample types and RWBuffer/RWTextures! if (acceptTokenClass(EHTokLeftAngle)) { if (! acceptType(txType)) { expected("scalar or vector type"); @@ -911,22 +931,45 @@ bool HlslGrammar::acceptTextureType(TType& type) } else if (ms) { expected("texture type for multisample"); return false; + } else if (image) { + expected("type for RWTexture/RWBuffer"); + return false; } TArraySizes* arraySizes = nullptr; - const bool shadow = txType.isScalar() || (txType.isVector() && txType.getVectorSize() == 1); + const bool shadow = !image && (txType.isScalar() || (txType.isVector() && txType.getVectorSize() == 1)); TSampler sampler; + TLayoutFormat format = ElfNone; - // Buffers are combined. - if (dim == EsdBuffer) { + // RWBuffer and RWTexture (images) require a TLayoutFormat. We handle only a limit set. + if (image) { + if (txType.getVectorSize() != 4) + expected("4 component image"); + + switch (txType.getBasicType()) { + case EbtFloat: format = ElfRgba32f; break; + case EbtInt: format = ElfRgba32i; break; + case EbtUint: format = ElfRgba32ui; break; + default: + expected("unknown basic type in image format"); + } + } + + // Non-image Buffers are combined + if (dim == EsdBuffer && !image) { sampler.set(txType.getBasicType(), dim, array); } else { // DX10 textures are separated. TODO: DX9. - sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms); + if (image) { + sampler.setImage(txType.getBasicType(), dim, array, shadow, ms); + } else { + sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms); + } } type.shallowCopy(TType(sampler, EvqUniform, arraySizes)); + type.getQualifier().layoutFormat = format; return true; } @@ -966,6 +1009,12 @@ bool HlslGrammar::acceptType(TType& type) case EHTokTextureCubearray: // ... case EHTokTexture2DMS: // ... case EHTokTexture2DMSarray: // ... + case EHTokRWTexture1d: // ... + case EHTokRWTexture1darray: // ... + case EHTokRWTexture2d: // ... + case EHTokRWTexture2darray: // ... + case EHTokRWTexture3d: // ... + case EHTokRWBuffer: // ... return acceptTextureType(type); break; diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 08ffd5806..d02d193ec 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -1252,15 +1252,17 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType const TSampler& texSampler = texType.getSampler(); const TSamplerDim dim = texSampler.dim; + const bool isImage = texSampler.isImage(); const int numArgs = (int)argAggregate->getSequence().size(); int numDims = 0; switch (dim) { - case Esd1D: numDims = 1; break; // W - case Esd2D: numDims = 2; break; // W, H - case Esd3D: numDims = 3; break; // W, H, D - case EsdCube: numDims = 2; break; // W, H (cube) + case Esd1D: numDims = 1; break; // W + case Esd2D: numDims = 2; break; // W, H + case Esd3D: numDims = 3; break; // W, H, D + case EsdCube: numDims = 2; break; // W, H (cube) + case EsdBuffer: numDims = 1; break; // buffers default: assert(0 && "unhandled texture dimension"); } @@ -1273,7 +1275,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType const bool mipQuery = (numArgs > (numDims + 1)) && (!texSampler.isMultiSample()); // AST assumes integer return. Will be converted to float if required. - TIntermAggregate* sizeQuery = new TIntermAggregate(EOpTextureQuerySize); + TIntermAggregate* sizeQuery = new TIntermAggregate(isImage ? EOpImageQuerySize : EOpTextureQuerySize); sizeQuery->getSequence().push_back(argTex); // If we're querying an explicit LOD, add the LOD, which is always arg #1 if (mipQuery) { @@ -1419,11 +1421,12 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType const bool isMS = argTex->getType().getSampler().isMultiSample(); const bool isBuffer = argTex->getType().getSampler().dim == EsdBuffer; + const bool isImage = argTex->getType().getSampler().isImage(); const TBasicType coordBaseType = argCoord->getType().getBasicType(); // Last component of coordinate is the mip level, for non-MS. we separate them here: - if (isMS || isBuffer) { - // MS and Buffer have no LOD + if (isMS || isBuffer || isImage) { + // MS, Buffer, and Image have no LOD coordSwizzle = argCoord; } else { // Extract coordinate @@ -1443,7 +1446,9 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4)); // Create texel fetch - const TOperator fetchOp = (hasOffset ? EOpTextureFetchOffset : EOpTextureFetch); + const TOperator fetchOp = (isImage ? EOpImageLoad : + hasOffset ? EOpTextureFetchOffset : + EOpTextureFetch); TIntermAggregate* txfetch = new TIntermAggregate(fetchOp); // Build up the fetch @@ -1456,6 +1461,8 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType txfetch->getSequence().push_back(argSampleIdx); } else if (isBuffer) { // Nothing else to do for buffers. + } else if (isImage) { + // Nothing else to do for images. } else { // 2DMS and buffer have no LOD, but everything else does. txfetch->getSequence().push_back(lodComponent); diff --git a/hlsl/hlslParseables.cpp b/hlsl/hlslParseables.cpp index 3f725997e..a2d500f2e 100755 --- a/hlsl/hlslParseables.cpp +++ b/hlsl/hlslParseables.cpp @@ -67,20 +67,21 @@ const char* BaseTypeName(const char argOrder, const char* scalarName, const char } } -bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; } -bool IsTextureArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&'; } -bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; } -bool IsBuffer(const char argOrder) { return argOrder == '*'; } +bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; } +bool IsArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&' || argOrder == '#'; } +bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; } +bool IsBuffer(const char argOrder) { return argOrder == '*' || argOrder == '~'; } +bool IsImage(const char argOrder) { return argOrder == '!' || argOrder == '#' || argOrder == '~'; } bool IsTextureType(const char argOrder) { - return argOrder == '%' || argOrder == '@' || IsTextureMS(argOrder) || IsBuffer(argOrder); + return argOrder == '%' || argOrder == '@' || IsTextureMS(argOrder) || IsBuffer(argOrder) | IsImage(argOrder); } // Reject certain combinations that are illegal sample methods. For example, // 3D arrays. bool IsIllegalSample(const glslang::TString& name, const char* argOrder, int dim0) { - const bool isArrayed = IsTextureArrayed(*argOrder); + const bool isArrayed = IsArrayed(*argOrder); const bool isMS = IsTextureMS(*argOrder); const bool isBuffer = IsBuffer(*argOrder); @@ -153,9 +154,9 @@ int CoordinateArgPos(const glslang::TString& name, bool isTexture) } // Some texture methods use an addition coordinate dimension for the mip -bool HasMipInCoord(const glslang::TString& name, bool isMS, bool isBuffer) +bool HasMipInCoord(const glslang::TString& name, bool isMS, bool isBuffer, bool isImage) { - return name == "Load" && !isMS && !isBuffer; + return name == "Load" && !isMS && !isBuffer && !isImage; } // LOD calculations don't pass the array level in the coordinate. @@ -219,10 +220,11 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons { const bool isTranspose = (argOrder[0] == '^'); const bool isTexture = IsTextureType(argOrder[0]); - const bool isArrayed = IsTextureArrayed(argOrder[0]); + const bool isArrayed = IsArrayed(argOrder[0]); const bool isSampler = IsSamplerType(argType[0]); const bool isMS = IsTextureMS(argOrder[0]); const bool isBuffer = IsBuffer(argOrder[0]); + const bool isImage = IsImage(argOrder[0]); char type = *argType; @@ -253,9 +255,15 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons case 'B': s += "bool"; break; case 'S': s += "sampler"; break; case 's': s += "SamplerComparisonState"; break; - case 'T': s += (isBuffer ? "Buffer" : "Texture"); break; - case 'i': s += (isBuffer ? "Buffer " : "Texture "); break; - case 'u': s += (isBuffer ? "Buffer " : "Texture "); break; + case 'T': s += ((isBuffer && isImage) ? "RWBuffer" : + isBuffer ? "Buffer" : + isImage ? "RWTexture" : "Texture"); break; + case 'i': s += ((isBuffer && isImage) ? "RWBuffer " : + isBuffer ? "Buffer " : + isImage ? "RWTexture " : "Texture "); break; + case 'u': s += ((isBuffer && isImage) ? "RWBuffer " : + isBuffer ? "Buffer " : + isImage ? "RWTexture " : "Texture ");break; default: s += "UNKNOWN_TYPE"; break; } } else { @@ -274,7 +282,10 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons if (type != 'T') // create itexture, utexture, etc s += type; - s += (isBuffer ? "samplerBuffer" : "texture"); + s += ((isImage && isBuffer) ? "imageBuffer" : + isImage ? "image" : + isBuffer ? "samplerBuffer" : + "texture"); break; default: s += "UNKNOWN_TYPE"; break; @@ -507,6 +518,9 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c // '@' as first letter of order creates arrayed texture of given type // '$' / '&' as first letter of order creates 2DMS / 2DMSArray textures // '*' as first letter of order creates buffer object + // '!' as first letter of order creates image object + // '#' as first letter of order creates arrayed image object + // '~' as first letter of order creates an image buffer object static const struct { const char* name; // intrinsic name @@ -699,6 +713,11 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "Load", /* +sampleidex*/ "V4", nullptr, "$&,V,S", "FIU,I,I", EShLangAll }, { "Load", /* +samplindex, offset*/ "V4", nullptr, "$&,V,S,V", "FIU,I,I,I", EShLangAll }, + // RWTexture loads + { "Load", "V4", nullptr, "!#,V", "FIU,I", EShLangAll }, + // RWBuffer loads + { "Load", "V4", nullptr, "~1,V", "FIU,I", EShLangAll }, + { "Gather", /*!O*/ "V4", nullptr, "%@,S,V", "FIU,S,F", EShLangAll }, { "Gather", /* O*/ "V4", nullptr, "%@,S,V,V", "FIU,S,F,I", EShLangAll }, @@ -710,36 +729,36 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c // // UINT Width // UINT MipLevel, UINT Width, UINT NumberOfLevels - { "GetDimensions", /* 1D */ "-", "-", "%1,>S", "FUI,U", EShLangAll }, - { "GetDimensions", /* 1D */ "-", "-", "%1,>S", "FUI,F", EShLangAll }, + { "GetDimensions", /* 1D */ "-", "-", "%!~1,>S", "FUI,U", EShLangAll }, + { "GetDimensions", /* 1D */ "-", "-", "%!~1,>S", "FUI,F", EShLangAll }, { "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,,", EShLangAll }, { "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,F,", EShLangAll }, // UINT Width, UINT Elements // UINT MipLevel, UINT Width, UINT Elements, UINT NumberOfLevels - { "GetDimensions", /* 1DArray */ "-", "-", "@1,>S,", "FUI,U,", EShLangAll }, - { "GetDimensions", /* 1DArray */ "-", "-", "@1,>S,", "FUI,F,", EShLangAll }, + { "GetDimensions", /* 1DArray */ "-", "-", "@#1,>S,", "FUI,U,", EShLangAll }, + { "GetDimensions", /* 1DArray */ "-", "-", "@#1,>S,", "FUI,F,", EShLangAll }, { "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,,,", EShLangAll }, { "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,F,,", EShLangAll }, // UINT Width, UINT Height // UINT MipLevel, UINT Width, UINT Height, UINT NumberOfLevels - { "GetDimensions", /* 2D */ "-", "-", "%2,>S,", "FUI,U,", EShLangAll }, - { "GetDimensions", /* 2D */ "-", "-", "%2,>S,", "FUI,F,", EShLangAll }, + { "GetDimensions", /* 2D */ "-", "-", "%!2,>S,", "FUI,U,", EShLangAll }, + { "GetDimensions", /* 2D */ "-", "-", "%!2,>S,", "FUI,F,", EShLangAll }, { "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,,,", EShLangAll }, { "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,F,,", EShLangAll }, // UINT Width, UINT Height, UINT Elements // UINT MipLevel, UINT Width, UINT Height, UINT Elements, UINT NumberOfLevels - { "GetDimensions", /* 2DArray */ "-", "-", "@2,>S,,", "FUI,U,,", EShLangAll }, - { "GetDimensions", /* 2DArray */ "-", "-", "@2,>S,,", "FUI,F,F,F", EShLangAll }, + { "GetDimensions", /* 2DArray */ "-", "-", "@#2,>S,,", "FUI,U,,", EShLangAll }, + { "GetDimensions", /* 2DArray */ "-", "-", "@#2,>S,,", "FUI,F,F,F", EShLangAll }, { "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,,,,", EShLangAll }, { "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,F,,,", EShLangAll }, // UINT Width, UINT Height, UINT Depth // UINT MipLevel, UINT Width, UINT Height, UINT Depth, UINT NumberOfLevels - { "GetDimensions", /* 3D */ "-", "-", "%3,>S,,", "FUI,U,,", EShLangAll }, - { "GetDimensions", /* 3D */ "-", "-", "%3,>S,,", "FUI,F,,", EShLangAll }, + { "GetDimensions", /* 3D */ "-", "-", "%!3,>S,,", "FUI,U,,", EShLangAll }, + { "GetDimensions", /* 3D */ "-", "-", "%!3,>S,,", "FUI,F,,", EShLangAll }, { "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,,,,", EShLangAll }, { "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,F,,,", EShLangAll }, @@ -836,10 +855,11 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c for (const char* argOrder = intrinsic.argOrder; !IsEndOfArg(argOrder); ++argOrder) { // for each order... const bool isTexture = IsTextureType(*argOrder); - const bool isArrayed = IsTextureArrayed(*argOrder); + const bool isArrayed = IsArrayed(*argOrder); const bool isMS = IsTextureMS(*argOrder); const bool isBuffer = IsBuffer(*argOrder); - const bool mipInCoord = HasMipInCoord(intrinsic.name, isMS, isBuffer); + const bool isImage = IsImage(*argOrder); + const bool mipInCoord = HasMipInCoord(intrinsic.name, isMS, isBuffer, isImage); const int fixedVecSize = FixedVecSize(argOrder); const int coordArg = CoordinateArgPos(intrinsic.name, isTexture); diff --git a/hlsl/hlslScanContext.cpp b/hlsl/hlslScanContext.cpp index cf83ef393..f25bdd8ca 100755 --- a/hlsl/hlslScanContext.cpp +++ b/hlsl/hlslScanContext.cpp @@ -258,6 +258,13 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["TextureCubeArray"] = EHTokTextureCubearray; (*KeywordMap)["Texture2DMS"] = EHTokTexture2DMS; (*KeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray; + (*KeywordMap)["RWTexture1D"] = EHTokRWTexture1d; + (*KeywordMap)["RWTexture1DArray"] = EHTokRWTexture1darray; + (*KeywordMap)["RWTexture2D"] = EHTokRWTexture2d; + (*KeywordMap)["RWTexture2DArray"] = EHTokRWTexture2darray; + (*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d; + (*KeywordMap)["RWBuffer"] = EHTokRWBuffer; + (*KeywordMap)["struct"] = EHTokStruct; (*KeywordMap)["cbuffer"] = EHTokCBuffer; @@ -581,6 +588,12 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokTextureCubearray: case EHTokTexture2DMS: case EHTokTexture2DMSarray: + case EHTokRWTexture1d: + case EHTokRWTexture1darray: + case EHTokRWTexture2d: + case EHTokRWTexture2darray: + case EHTokRWTexture3d: + case EHTokRWBuffer: return keyword; // variable, user type, ... diff --git a/hlsl/hlslTokens.h b/hlsl/hlslTokens.h index e38cb9a60..2994001d2 100755 --- a/hlsl/hlslTokens.h +++ b/hlsl/hlslTokens.h @@ -209,6 +209,13 @@ enum EHlslTokenClass { EHTokTextureCubearray, EHTokTexture2DMS, EHTokTexture2DMSarray, + EHTokRWTexture1d, + EHTokRWTexture1darray, + EHTokRWTexture2d, + EHTokRWTexture2darray, + EHTokRWTexture3d, + EHTokRWBuffer, + // variable, user type, ... EHTokIdentifier,