-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate vertex stage returns the position built-in
- Loading branch information
Showing
54 changed files
with
535 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ fn test_fma() -> vec2<f32> { | |
} | ||
|
||
|
||
@vertex | ||
@fragment | ||
fn main() { | ||
let a = test_fma(); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@vertex | ||
@fragment | ||
fn main() { | ||
let f = 1.0; | ||
let v = vec4<f32>(0.0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@vertex | ||
@fragment | ||
fn main(@builtin(view_index) view_index: i32) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@vertex | ||
@fragment | ||
fn main(@builtin(view_index) view_index: i32) {} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
; SPIR-V | ||
; Version: 1.0 | ||
; Generator: Khronos Glslang Reference Front End; 10 | ||
; Bound: 27 | ||
; Schema: 0 | ||
OpCapability Shader | ||
%1 = OpExtInstImport "GLSL.std.450" | ||
OpMemoryModel Logical GLSL450 | ||
OpEntryPoint Fragment %main "main" %colour | ||
OpSource GLSL 450 | ||
OpName %main "main" | ||
OpName %deg "deg" | ||
OpName %rad "rad" | ||
OpName %deg_again "deg_again" | ||
OpName %colour "colour" | ||
OpDecorate %colour Location 0 | ||
%void = OpTypeVoid | ||
%3 = OpTypeFunction %void | ||
%float = OpTypeFloat 32 | ||
%_ptr_Function_float = OpTypePointer Function %float | ||
%float_15 = OpConstant %float 15 | ||
%v4float = OpTypeVector %float 4 | ||
%_ptr_Output_v4float = OpTypePointer Output %v4float | ||
%colour = OpVariable %_ptr_Output_v4float Output | ||
%v3float = OpTypeVector %float 3 | ||
%float_1 = OpConstant %float 1 | ||
%main = OpFunction %void None %3 | ||
%5 = OpLabel | ||
%deg = OpVariable %_ptr_Function_float Function | ||
%rad = OpVariable %_ptr_Function_float Function | ||
%deg_again = OpVariable %_ptr_Function_float Function | ||
OpStore %deg %float_15 | ||
%11 = OpLoad %float %deg | ||
%12 = OpExtInst %float %1 Radians %11 | ||
OpStore %rad %12 | ||
%14 = OpLoad %float %rad | ||
%15 = OpExtInst %float %1 Degrees %14 | ||
OpStore %deg_again %15 | ||
%19 = OpLoad %float %deg_again | ||
%21 = OpCompositeConstruct %v3float %19 %19 %19 | ||
%23 = OpCompositeExtract %float %21 0 | ||
%24 = OpCompositeExtract %float %21 1 | ||
%25 = OpCompositeExtract %float %21 2 | ||
%26 = OpCompositeConstruct %v4float %23 %24 %25 %float_1 | ||
OpStore %colour %26 | ||
OpReturn | ||
OpFunctionEnd |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
; SPIR-V | ||
; Version: 1.0 | ||
; Generator: Khronos Glslang Reference Front End; 10 | ||
; Bound: 19 | ||
; Schema: 0 | ||
OpCapability Shader | ||
%1 = OpExtInstImport "GLSL.std.450" | ||
OpMemoryModel Logical GLSL450 | ||
OpEntryPoint Fragment %main "main" | ||
OpSource GLSL 450 | ||
OpName %main "main" | ||
OpName %b "b" | ||
OpName %a "a" | ||
OpName %c "c" | ||
OpName %d "d" | ||
%void = OpTypeVoid | ||
%3 = OpTypeFunction %void | ||
%float = OpTypeFloat 32 | ||
%_ptr_Function_float = OpTypePointer Function %float | ||
%_ptr_Private_float = OpTypePointer Private %float | ||
%a = OpVariable %_ptr_Private_float Private | ||
%main = OpFunction %void None %3 | ||
%5 = OpLabel | ||
%b = OpVariable %_ptr_Function_float Function | ||
%c = OpVariable %_ptr_Function_float Function | ||
%d = OpVariable %_ptr_Function_float Function | ||
%11 = OpLoad %float %a | ||
%12 = OpExtInst %float %1 Asinh %11 | ||
OpStore %b %12 | ||
%14 = OpLoad %float %a | ||
%15 = OpExtInst %float %1 Acosh %14 | ||
OpStore %c %15 | ||
%17 = OpLoad %float %a | ||
%18 = OpExtInst %float %1 Atanh %17 | ||
OpStore %d %18 | ||
OpReturn | ||
OpFunctionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
; SPIR-V | ||
; Version: 1.0 | ||
; Generator: Khronos Glslang Reference Front End; 10 | ||
; Bound: 31 | ||
; Schema: 0 | ||
OpCapability Shader | ||
%1 = OpExtInstImport "GLSL.std.450" | ||
OpMemoryModel Logical GLSL450 | ||
OpEntryPoint Vertex %main "main" %v_uv %a_uv %_ %a_pos | ||
OpSource GLSL 460 | ||
OpName %main "main" | ||
OpName %v_uv "v_uv" | ||
OpName %a_uv "a_uv" | ||
OpName %gl_PerVertex "gl_PerVertex" | ||
OpMemberName %gl_PerVertex 0 "gl_Position" | ||
OpMemberName %gl_PerVertex 1 "gl_PointSize" | ||
OpMemberName %gl_PerVertex 2 "gl_ClipDistance" | ||
OpMemberName %gl_PerVertex 3 "gl_CullDistance" | ||
OpName %_ "" | ||
OpName %a_pos "a_pos" | ||
OpDecorate %v_uv Location 0 | ||
OpDecorate %a_uv Location 1 | ||
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position | ||
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize | ||
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance | ||
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance | ||
OpDecorate %gl_PerVertex Block | ||
OpDecorate %a_pos Location 0 | ||
%void = OpTypeVoid | ||
%3 = OpTypeFunction %void | ||
%float = OpTypeFloat 32 | ||
%v2float = OpTypeVector %float 2 | ||
%_ptr_Output_v2float = OpTypePointer Output %v2float | ||
%v_uv = OpVariable %_ptr_Output_v2float Output | ||
%_ptr_Input_v2float = OpTypePointer Input %v2float | ||
%a_uv = OpVariable %_ptr_Input_v2float Input | ||
%v4float = OpTypeVector %float 4 | ||
%uint = OpTypeInt 32 0 | ||
%uint_1 = OpConstant %uint 1 | ||
%_arr_float_uint_1 = OpTypeArray %float %uint_1 | ||
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1 | ||
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex | ||
%_ = OpVariable %_ptr_Output_gl_PerVertex Output | ||
%int = OpTypeInt 32 1 | ||
%int_0 = OpConstant %int 0 | ||
%a_pos = OpVariable %_ptr_Input_v2float Input | ||
%float_0 = OpConstant %float 0 | ||
%float_1 = OpConstant %float 1 | ||
%_ptr_Output_v4float = OpTypePointer Output %v4float | ||
%main = OpFunction %void None %3 | ||
%5 = OpLabel | ||
%12 = OpLoad %v2float %a_uv | ||
OpStore %v_uv %12 | ||
%23 = OpLoad %v2float %a_pos | ||
%26 = OpCompositeExtract %float %23 0 | ||
%27 = OpCompositeExtract %float %23 1 | ||
%28 = OpCompositeConstruct %v4float %26 %27 %float_0 %float_1 | ||
%30 = OpAccessChain %_ptr_Output_v4float %_ %int_0 | ||
OpStore %30 %28 | ||
OpReturn | ||
OpFunctionEnd |
Oops, something went wrong.