mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 20:54:10 +00:00
420b7913d4
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
65 lines
1.5 KiB
GLSL
65 lines
1.5 KiB
GLSL
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct Vert
|
|
{
|
|
float arr[3];
|
|
float3x3 wMatrix;
|
|
float4 wTmp;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float3 vMatrix_0 [[user(locn0)]];
|
|
float3 vMatrix_1 [[user(locn1)]];
|
|
float3 vMatrix_2 [[user(locn2)]];
|
|
float Vert_arr_0 [[user(locn4)]];
|
|
float Vert_arr_1 [[user(locn5)]];
|
|
float Vert_arr_2 [[user(locn6)]];
|
|
float3 Vert_wMatrix_0 [[user(locn7)]];
|
|
float3 Vert_wMatrix_1 [[user(locn8)]];
|
|
float3 Vert_wMatrix_2 [[user(locn9)]];
|
|
float4 Vert_wTmp [[user(locn10)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 Matrix_0 [[attribute(0)]];
|
|
float3 Matrix_1 [[attribute(1)]];
|
|
float3 Matrix_2 [[attribute(2)]];
|
|
float4 Pos [[attribute(4)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]])
|
|
{
|
|
main0_out out = {};
|
|
float3x3 vMatrix = {};
|
|
Vert _20 = {};
|
|
float3x3 Matrix = {};
|
|
Matrix[0] = in.Matrix_0;
|
|
Matrix[1] = in.Matrix_1;
|
|
Matrix[2] = in.Matrix_2;
|
|
vMatrix = Matrix;
|
|
_20.wMatrix = Matrix;
|
|
_20.arr[0] = 1.0;
|
|
_20.arr[1] = 2.0;
|
|
_20.arr[2] = 3.0;
|
|
_20.wTmp = in.Pos;
|
|
out.gl_Position = in.Pos;
|
|
out.vMatrix_0 = vMatrix[0];
|
|
out.vMatrix_1 = vMatrix[1];
|
|
out.vMatrix_2 = vMatrix[2];
|
|
out.Vert_arr_0 = _20.arr[0];
|
|
out.Vert_arr_1 = _20.arr[1];
|
|
out.Vert_arr_2 = _20.arr[2];
|
|
out.Vert_wMatrix_0 = _20.wMatrix[0];
|
|
out.Vert_wMatrix_1 = _20.wMatrix[1];
|
|
out.Vert_wMatrix_2 = _20.wMatrix[2];
|
|
out.Vert_wTmp = _20.wTmp;
|
|
return out;
|
|
}
|
|
|