From 77c5c16467059816545a75e526f1e7c0cba4d83b Mon Sep 17 00:00:00 2001 From: plapins Date: Thu, 16 Jun 2016 10:35:43 +0200 Subject: [PATCH] Updated GLSL and SPIR-V shaders (added gl_PerVertex redeclaration to vertex shaders). --- Project/Tutorial03/Data03/frag.spv.txt | 2 +- Project/Tutorial03/Data03/shader.vert | 7 ++- Project/Tutorial03/Data03/vert.spv | Bin 1040 -> 896 bytes Project/Tutorial03/Data03/vert.spv.txt | 67 +++++++++++------------ Project/Tutorial04/Data04/frag.spv.txt | 2 +- Project/Tutorial04/Data04/shader.vert | 7 ++- Project/Tutorial04/Data04/vert.spv | Bin 796 -> 636 bytes Project/Tutorial04/Data04/vert.spv.txt | 70 +++++++++++-------------- Project/Tutorial05/Data05/frag.spv.txt | 2 +- Project/Tutorial05/Data05/shader.vert | 7 ++- Project/Tutorial05/Data05/vert.spv | Bin 796 -> 636 bytes Project/Tutorial05/Data05/vert.spv.txt | 70 +++++++++++-------------- 12 files changed, 113 insertions(+), 121 deletions(-) diff --git a/Project/Tutorial03/Data03/frag.spv.txt b/Project/Tutorial03/Data03/frag.spv.txt index 523f110..a53936c 100644 --- a/Project/Tutorial03/Data03/frag.spv.txt +++ b/Project/Tutorial03/Data03/frag.spv.txt @@ -1,4 +1,4 @@ -shader.frag +Tutorial03/Data03/shader.frag Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. diff --git a/Project/Tutorial03/Data03/shader.vert b/Project/Tutorial03/Data03/shader.vert index 4b58e1f..1337b9a 100644 --- a/Project/Tutorial03/Data03/shader.vert +++ b/Project/Tutorial03/Data03/shader.vert @@ -8,7 +8,12 @@ // Intel does not assume any responsibility for any errors which may appear in this software // nor any responsibility to update it. -#version 400 +#version 450 + +out gl_PerVertex +{ + vec4 gl_Position; +}; void main() { vec2 pos[3] = vec2[3]( vec2(-0.7, 0.7), vec2(0.7, 0.7), vec2(0.0, -0.7) ); diff --git a/Project/Tutorial03/Data03/vert.spv b/Project/Tutorial03/Data03/vert.spv index c16b07ea2ed5124a3b3167796973c29343f6a77c..6d70ba5974f38dba32280bb238c4ef8d6648c289 100644 GIT binary patch literal 896 zcmYk4TT4Pw5QVpzcDK9TtWMX5k_fB_qM|1YdMJWkBTzyp4fUbN{#nqk>Luv=Jm*AP z7BjPE&7RqF%w;zRL&)$O3OgY_Qz1(n!e}V;ZSCg%X2093?;jo=s3?Y9U#MmxP|g_u zuTRaE{ybO)IeuB}7s5P>|C&6xF>-J1F1bRO!+(Bxylr$I8l7I_oe(zW_06@r&0e$J zLZ9pRkhj)ef+=k&;b!{o8v?QZ=)dDl5vecyXV z&i-X!?@KD|y9(6EtFdkk$lsxHC+i7^`QtVc&NtjrN&EiSRB|XC~CJLr^BjR%n)XfB$H|J1ow+J0G@< zoC6;Fe;XDF=PO@D61y})fel_G@iZ+ON7}LP_1mDGAh_4wI(SM&GAEcMR(#s;f z!i24Ob$x?jR%C-5cD#&t){@Wi;wZaLjf+0};`@G{UF>DU;v_#!=~FLfGtQpQNKDo6 zXMSeaA9$R_)2hUO&VF*r7-t_jH`3?dT)95CwZ6XhU=CJ(jTmFq+h|Q>0v3sPliKCky+a$RUv71@`bXLtK~Wc!WD zxu=)N1X$A^+DpJ={xVXZy!qO`jhy~hNOvLPeP5%8aI>p_1I=E}^^qBUAMfLlzlCWa zt?e85U0drbUUm2K1)u#_fxW+xVc!H8BX5j(YajuK#JHPvAm@qP8+5rba6p!`y#>bV Y^KHC?eVl(2xHI?ST-wIpQQ;G~2g%esCjbBd diff --git a/Project/Tutorial03/Data03/vert.spv.txt b/Project/Tutorial03/Data03/vert.spv.txt index 9e23a7f..403d96f 100644 --- a/Project/Tutorial03/Data03/vert.spv.txt +++ b/Project/Tutorial03/Data03/vert.spv.txt @@ -1,5 +1,5 @@ -shader.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. +Tutorial03/Data03/shader.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. Linked vertex stage: @@ -7,27 +7,22 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 40 +// Id's are bound by 38 Capability Shader - Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 25 29 - Source GLSL 400 + EntryPoint Vertex 4 "main" 23 27 + Source GLSL 450 Name 4 "main" Name 12 "pos" - Name 23 "gl_PerVertex" - MemberName 23(gl_PerVertex) 0 "gl_Position" - MemberName 23(gl_PerVertex) 1 "gl_PointSize" - MemberName 23(gl_PerVertex) 2 "gl_ClipDistance" - Name 25 "" - Name 29 "gl_VertexIndex" - MemberDecorate 23(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 23(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 23(gl_PerVertex) 2 BuiltIn ClipDistance - Decorate 23(gl_PerVertex) Block - Decorate 29(gl_VertexIndex) BuiltIn VertexIndex + Name 21 "gl_PerVertex" + MemberName 21(gl_PerVertex) 0 "gl_Position" + Name 23 "" + Name 27 "gl_VertexIndex" + MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position + Decorate 21(gl_PerVertex) Block + Decorate 27(gl_VertexIndex) BuiltIn VertexIndex 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -44,29 +39,27 @@ Linked vertex stage: 18: 7(fvec2) ConstantComposite 17 13 19: 10 ConstantComposite 15 16 18 20: TypeVector 6(float) 4 - 21: 8(int) Constant 1 - 22: TypeArray 6(float) 21 -23(gl_PerVertex): TypeStruct 20(fvec4) 6(float) 22 - 24: TypePointer Output 23(gl_PerVertex) - 25: 24(ptr) Variable Output - 26: TypeInt 32 1 - 27: 26(int) Constant 0 - 28: TypePointer Input 26(int) -29(gl_VertexIndex): 28(ptr) Variable Input - 31: TypePointer Function 7(fvec2) - 34: 6(float) Constant 1065353216 - 38: TypePointer Output 20(fvec4) +21(gl_PerVertex): TypeStruct 20(fvec4) + 22: TypePointer Output 21(gl_PerVertex) + 23: 22(ptr) Variable Output + 24: TypeInt 32 1 + 25: 24(int) Constant 0 + 26: TypePointer Input 24(int) +27(gl_VertexIndex): 26(ptr) Variable Input + 29: TypePointer Function 7(fvec2) + 32: 6(float) Constant 1065353216 + 36: TypePointer Output 20(fvec4) 4(main): 2 Function None 3 5: Label 12(pos): 11(ptr) Variable Function Store 12(pos) 19 - 30: 26(int) Load 29(gl_VertexIndex) - 32: 31(ptr) AccessChain 12(pos) 30 - 33: 7(fvec2) Load 32 - 35: 6(float) CompositeExtract 33 0 - 36: 6(float) CompositeExtract 33 1 - 37: 20(fvec4) CompositeConstruct 35 36 17 34 - 39: 38(ptr) AccessChain 25 27 - Store 39 37 + 28: 24(int) Load 27(gl_VertexIndex) + 30: 29(ptr) AccessChain 12(pos) 28 + 31: 7(fvec2) Load 30 + 33: 6(float) CompositeExtract 31 0 + 34: 6(float) CompositeExtract 31 1 + 35: 20(fvec4) CompositeConstruct 33 34 17 32 + 37: 36(ptr) AccessChain 23 25 + Store 37 35 Return FunctionEnd diff --git a/Project/Tutorial04/Data04/frag.spv.txt b/Project/Tutorial04/Data04/frag.spv.txt index 209e57a..393aed1 100644 --- a/Project/Tutorial04/Data04/frag.spv.txt +++ b/Project/Tutorial04/Data04/frag.spv.txt @@ -1,4 +1,4 @@ -shader.frag +Tutorial04/Data04/shader.frag Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. diff --git a/Project/Tutorial04/Data04/shader.vert b/Project/Tutorial04/Data04/shader.vert index 1030cb3..cce5865 100644 --- a/Project/Tutorial04/Data04/shader.vert +++ b/Project/Tutorial04/Data04/shader.vert @@ -8,11 +8,16 @@ // Intel does not assume any responsibility for any errors which may appear in this software // nor any responsibility to update it. -#version 430 +#version 450 layout(location = 0) in vec4 i_Position; layout(location = 1) in vec4 i_Color; +out gl_PerVertex +{ + vec4 gl_Position; +}; + layout(location = 0) out vec4 v_Color; void main() { diff --git a/Project/Tutorial04/Data04/vert.spv b/Project/Tutorial04/Data04/vert.spv index 55be53cc4f70f2f734d3270a9411f9d33e85b42a..278837c26a5814a7443b1a7054f795673e9371b9 100644 GIT binary patch literal 636 zcmYk2PfNo<5XHy*snu$0t<_tJcod2UEd@~!5Ao1Lq2RR$23e>Lq(S_Aekw15@3%>; zSthgZ&CHwG34@DWvmKqb4Xyh676_YltmS<=Tg=9r@^yTDb45niLZ3)Z&-VO1(*OO% ztpWS8uIyMgkcB#d{Fe%1i*&ZRv3j(H-&V_cRy=1#nSBb1t$6Ol@{KE9zE*wc_2FY3 z`nYY_>(lpR`IxWr!eeG|HGUF9KfX@oER`l4Gp3pj&Cy>h^6&VM(F61TfvTuG_phup zPIYgIOJrx#(}F$b-J`k}T%s7;W1IB9tugz98wxXHBBR%3jSqC^qyA8y7<$x$nIDe$ zkvv*W9L#>;nta|v{zSXsEzHSB&bOFY{!T0!JsJ8BV$tf$n3tLERRJca$v@E@ePZ+l J|ESwk_6zhyCQ$$Y literal 796 zcmYk3PfG$p7{(`eS1n63Q#*ugbPS|JMGysHupK-ELRXPmV!(Do7l}SppRY^M^BZ@t z8Qy*7dEUP>8&pnf#%yWV&5>EJwyB641IEIJsXCsFC*$F=cpY9`o)g(L0pNTsv+d5I zzV9=eLH1;ASy$GR1=d_E?n@^w8#dEqS(oa#TYn?N`d}#}tXHsh} zo;jUvvtnYuQsTUiUh<9R_T#}Wi&^%Ps&C-tA}-QqKD#L^C3N$yrlWkGFC1rfTk=OK z%*pcTHD*Bry~Ye^yi}quXS76p=sl3J;Jnj+PG30nI?5vNL^Y_zxu;WA7|Z&~*N=3Z zckPPTg|UovR&xFl^^V1Ngyf?Q%6s`5_+rKE3hBq(Hznu4qS2!%jAhiM2fQU?k-sm* zM_uya+#3ylM@TL2hw~0-KAv|V{z@})Z|=t;=0{2-yp>9g0~z)2rBdrq#=OjQrwlkT RKEAIr_3_ac{;O`+vOg=gGkpL6 diff --git a/Project/Tutorial04/Data04/vert.spv.txt b/Project/Tutorial04/Data04/vert.spv.txt index 67ed30a..b600e4b 100644 --- a/Project/Tutorial04/Data04/vert.spv.txt +++ b/Project/Tutorial04/Data04/vert.spv.txt @@ -1,5 +1,5 @@ -shader.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. +Tutorial04/Data04/shader.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. Linked vertex stage: @@ -7,53 +7,45 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 24 +// Id's are bound by 21 Capability Shader - Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 13 17 21 22 - Source GLSL 430 + EntryPoint Vertex 4 "main" 10 14 18 19 + Source GLSL 450 Name 4 "main" - Name 11 "gl_PerVertex" - MemberName 11(gl_PerVertex) 0 "gl_Position" - MemberName 11(gl_PerVertex) 1 "gl_PointSize" - MemberName 11(gl_PerVertex) 2 "gl_ClipDistance" - Name 13 "" - Name 17 "i_Position" - Name 21 "v_Color" - Name 22 "i_Color" - MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance - Decorate 11(gl_PerVertex) Block - Decorate 17(i_Position) Location 0 - Decorate 21(v_Color) Location 0 - Decorate 22(i_Color) Location 1 + Name 8 "gl_PerVertex" + MemberName 8(gl_PerVertex) 0 "gl_Position" + Name 10 "" + Name 14 "i_Position" + Name 18 "v_Color" + Name 19 "i_Color" + MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position + Decorate 8(gl_PerVertex) Block + Decorate 14(i_Position) Location 0 + Decorate 18(v_Color) Location 0 + Decorate 19(i_Color) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 8: TypeInt 32 0 - 9: 8(int) Constant 1 - 10: TypeArray 6(float) 9 -11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 - 12: TypePointer Output 11(gl_PerVertex) - 13: 12(ptr) Variable Output - 14: TypeInt 32 1 - 15: 14(int) Constant 0 - 16: TypePointer Input 7(fvec4) - 17(i_Position): 16(ptr) Variable Input - 19: TypePointer Output 7(fvec4) - 21(v_Color): 19(ptr) Variable Output - 22(i_Color): 16(ptr) Variable Input + 8(gl_PerVertex): TypeStruct 7(fvec4) + 9: TypePointer Output 8(gl_PerVertex) + 10: 9(ptr) Variable Output + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13: TypePointer Input 7(fvec4) + 14(i_Position): 13(ptr) Variable Input + 16: TypePointer Output 7(fvec4) + 18(v_Color): 16(ptr) Variable Output + 19(i_Color): 13(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 18: 7(fvec4) Load 17(i_Position) - 20: 19(ptr) AccessChain 13 15 - Store 20 18 - 23: 7(fvec4) Load 22(i_Color) - Store 21(v_Color) 23 + 15: 7(fvec4) Load 14(i_Position) + 17: 16(ptr) AccessChain 10 12 + Store 17 15 + 20: 7(fvec4) Load 19(i_Color) + Store 18(v_Color) 20 Return FunctionEnd diff --git a/Project/Tutorial05/Data05/frag.spv.txt b/Project/Tutorial05/Data05/frag.spv.txt index 209e57a..e90c406 100644 --- a/Project/Tutorial05/Data05/frag.spv.txt +++ b/Project/Tutorial05/Data05/frag.spv.txt @@ -1,4 +1,4 @@ -shader.frag +Tutorial05/Data05/shader.frag Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. diff --git a/Project/Tutorial05/Data05/shader.vert b/Project/Tutorial05/Data05/shader.vert index 1030cb3..cce5865 100644 --- a/Project/Tutorial05/Data05/shader.vert +++ b/Project/Tutorial05/Data05/shader.vert @@ -8,11 +8,16 @@ // Intel does not assume any responsibility for any errors which may appear in this software // nor any responsibility to update it. -#version 430 +#version 450 layout(location = 0) in vec4 i_Position; layout(location = 1) in vec4 i_Color; +out gl_PerVertex +{ + vec4 gl_Position; +}; + layout(location = 0) out vec4 v_Color; void main() { diff --git a/Project/Tutorial05/Data05/vert.spv b/Project/Tutorial05/Data05/vert.spv index 55be53cc4f70f2f734d3270a9411f9d33e85b42a..278837c26a5814a7443b1a7054f795673e9371b9 100644 GIT binary patch literal 636 zcmYk2PfNo<5XHy*snu$0t<_tJcod2UEd@~!5Ao1Lq2RR$23e>Lq(S_Aekw15@3%>; zSthgZ&CHwG34@DWvmKqb4Xyh676_YltmS<=Tg=9r@^yTDb45niLZ3)Z&-VO1(*OO% ztpWS8uIyMgkcB#d{Fe%1i*&ZRv3j(H-&V_cRy=1#nSBb1t$6Ol@{KE9zE*wc_2FY3 z`nYY_>(lpR`IxWr!eeG|HGUF9KfX@oER`l4Gp3pj&Cy>h^6&VM(F61TfvTuG_phup zPIYgIOJrx#(}F$b-J`k}T%s7;W1IB9tugz98wxXHBBR%3jSqC^qyA8y7<$x$nIDe$ zkvv*W9L#>;nta|v{zSXsEzHSB&bOFY{!T0!JsJ8BV$tf$n3tLERRJca$v@E@ePZ+l J|ESwk_6zhyCQ$$Y literal 796 zcmYk3PfG$p7{(`eS1n63Q#*ugbPS|JMGysHupK-ELRXPmV!(Do7l}SppRY^M^BZ@t z8Qy*7dEUP>8&pnf#%yWV&5>EJwyB641IEIJsXCsFC*$F=cpY9`o)g(L0pNTsv+d5I zzV9=eLH1;ASy$GR1=d_E?n@^w8#dEqS(oa#TYn?N`d}#}tXHsh} zo;jUvvtnYuQsTUiUh<9R_T#}Wi&^%Ps&C-tA}-QqKD#L^C3N$yrlWkGFC1rfTk=OK z%*pcTHD*Bry~Ye^yi}quXS76p=sl3J;Jnj+PG30nI?5vNL^Y_zxu;WA7|Z&~*N=3Z zckPPTg|UovR&xFl^^V1Ngyf?Q%6s`5_+rKE3hBq(Hznu4qS2!%jAhiM2fQU?k-sm* zM_uya+#3ylM@TL2hw~0-KAv|V{z@})Z|=t;=0{2-yp>9g0~z)2rBdrq#=OjQrwlkT RKEAIr_3_ac{;O`+vOg=gGkpL6 diff --git a/Project/Tutorial05/Data05/vert.spv.txt b/Project/Tutorial05/Data05/vert.spv.txt index 67ed30a..df285f0 100644 --- a/Project/Tutorial05/Data05/vert.spv.txt +++ b/Project/Tutorial05/Data05/vert.spv.txt @@ -1,5 +1,5 @@ -shader.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. +Tutorial05/Data05/shader.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. Linked vertex stage: @@ -7,53 +7,45 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 24 +// Id's are bound by 21 Capability Shader - Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 13 17 21 22 - Source GLSL 430 + EntryPoint Vertex 4 "main" 10 14 18 19 + Source GLSL 450 Name 4 "main" - Name 11 "gl_PerVertex" - MemberName 11(gl_PerVertex) 0 "gl_Position" - MemberName 11(gl_PerVertex) 1 "gl_PointSize" - MemberName 11(gl_PerVertex) 2 "gl_ClipDistance" - Name 13 "" - Name 17 "i_Position" - Name 21 "v_Color" - Name 22 "i_Color" - MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance - Decorate 11(gl_PerVertex) Block - Decorate 17(i_Position) Location 0 - Decorate 21(v_Color) Location 0 - Decorate 22(i_Color) Location 1 + Name 8 "gl_PerVertex" + MemberName 8(gl_PerVertex) 0 "gl_Position" + Name 10 "" + Name 14 "i_Position" + Name 18 "v_Color" + Name 19 "i_Color" + MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position + Decorate 8(gl_PerVertex) Block + Decorate 14(i_Position) Location 0 + Decorate 18(v_Color) Location 0 + Decorate 19(i_Color) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 8: TypeInt 32 0 - 9: 8(int) Constant 1 - 10: TypeArray 6(float) 9 -11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 - 12: TypePointer Output 11(gl_PerVertex) - 13: 12(ptr) Variable Output - 14: TypeInt 32 1 - 15: 14(int) Constant 0 - 16: TypePointer Input 7(fvec4) - 17(i_Position): 16(ptr) Variable Input - 19: TypePointer Output 7(fvec4) - 21(v_Color): 19(ptr) Variable Output - 22(i_Color): 16(ptr) Variable Input + 8(gl_PerVertex): TypeStruct 7(fvec4) + 9: TypePointer Output 8(gl_PerVertex) + 10: 9(ptr) Variable Output + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13: TypePointer Input 7(fvec4) + 14(i_Position): 13(ptr) Variable Input + 16: TypePointer Output 7(fvec4) + 18(v_Color): 16(ptr) Variable Output + 19(i_Color): 13(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 18: 7(fvec4) Load 17(i_Position) - 20: 19(ptr) AccessChain 13 15 - Store 20 18 - 23: 7(fvec4) Load 22(i_Color) - Store 21(v_Color) 23 + 15: 7(fvec4) Load 14(i_Position) + 17: 16(ptr) AccessChain 10 12 + Store 17 15 + 20: 7(fvec4) Load 19(i_Color) + Store 18(v_Color) 20 Return FunctionEnd