0ebb88cc39
If a buffer rewrites its Offsets, all member references to that struct are invalidated, and must be redirected, do so in to_member_reference, but there might be other places where this is needed. Fix as required. SPIR-V code relying on this is somewhat questionable, but seems to be in-spec.
29 lines
412 B
GLSL
29 lines
412 B
GLSL
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct UBO
|
|
{
|
|
float4 v;
|
|
float4x4 m;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 FragColor [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 vColor [[user(locn0)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant UBO& _13 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.FragColor = (_13.m * in.vColor) + _13.v;
|
|
return out;
|
|
}
|
|
|