-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ConstantEvaluator::swizzle: Handle vector concatenation.
- Loading branch information
Showing
8 changed files
with
138 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn f() -> vec4<i32> { | ||
let a = vec2(1, 2); | ||
let b = vec2(3, 4); | ||
return vec4(a, b).wzyx; | ||
} |
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,7 @@ | ||
int4 f() | ||
{ | ||
int2 a = int2(1, 2); | ||
int2 b = int2(3, 4); | ||
return int4(4, 3, 2, 1); | ||
} | ||
|
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,8 @@ | ||
( | ||
vertex:[ | ||
], | ||
fragment:[ | ||
], | ||
compute:[ | ||
], | ||
) |
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,13 @@ | ||
// language: metal2.0 | ||
#include <metal_stdlib> | ||
#include <simd/simd.h> | ||
|
||
using metal::uint; | ||
|
||
|
||
metal::int4 f( | ||
) { | ||
metal::int2 a = metal::int2(1, 2); | ||
metal::int2 b = metal::int2(3, 4); | ||
return metal::int4(4, 3, 2, 1); | ||
} |
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,26 @@ | ||
; SPIR-V | ||
; Version: 1.1 | ||
; Generator: rspirv | ||
; Bound: 17 | ||
OpCapability Shader | ||
OpCapability Linkage | ||
%1 = OpExtInstImport "GLSL.std.450" | ||
OpMemoryModel Logical GLSL450 | ||
%2 = OpTypeVoid | ||
%4 = OpTypeInt 32 1 | ||
%3 = OpTypeVector %4 4 | ||
%5 = OpTypeVector %4 2 | ||
%8 = OpTypeFunction %3 | ||
%9 = OpConstant %4 1 | ||
%10 = OpConstant %4 2 | ||
%11 = OpConstantComposite %5 %9 %10 | ||
%12 = OpConstant %4 3 | ||
%13 = OpConstant %4 4 | ||
%14 = OpConstantComposite %5 %12 %13 | ||
%15 = OpConstantComposite %3 %13 %12 %10 %9 | ||
%7 = OpFunction %3 None %8 | ||
%6 = OpLabel | ||
OpBranch %16 | ||
%16 = OpLabel | ||
OpReturnValue %15 | ||
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,6 @@ | ||
fn f() -> vec4<i32> { | ||
let a = vec2<i32>(1, 2); | ||
let b = vec2<i32>(3, 4); | ||
return vec4<i32>(4, 3, 2, 1); | ||
} | ||
|
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