mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
Fix merge conflicts with upstream master, plus fixes from review of PR #186.
This commit is contained in:
commit
0f97ffd8be
@ -18,7 +18,7 @@ struct main0_out
|
||||
{
|
||||
float3 vNormal [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]])
|
||||
|
@ -16,7 +16,7 @@ struct main0_in
|
||||
struct main0_out
|
||||
{
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _20 [[buffer(0)]])
|
||||
|
@ -20,7 +20,7 @@ struct main0_out
|
||||
{
|
||||
float2 vRot [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant PushMe& registers [[buffer(0)]])
|
||||
|
@ -26,7 +26,7 @@ struct main0_out
|
||||
{
|
||||
float4 vColor [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _18 [[buffer(0)]])
|
||||
|
@ -30,7 +30,7 @@ struct main0_out
|
||||
float4 oB [[user(locn4)]];
|
||||
float4 oA [[user(locn5)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(constant UBO& _22 [[buffer(0)]])
|
||||
|
@ -18,7 +18,7 @@ struct main0_in
|
||||
struct main0_out
|
||||
{
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant Buffer& _13 [[buffer(0)]])
|
||||
|
@ -18,7 +18,7 @@ struct main0_out
|
||||
{
|
||||
float3 vNormal [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]])
|
||||
|
@ -26,7 +26,7 @@ struct main0_out
|
||||
{
|
||||
float4 vColor [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]])
|
||||
|
@ -26,7 +26,7 @@ struct main0_out
|
||||
{
|
||||
float4 vColor [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]])
|
||||
|
@ -27,7 +27,7 @@ struct main0_out
|
||||
int2 vMSB [[user(locn3)]];
|
||||
int2 vLSB [[user(locn4)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
// Implementation of the GLSL radians() function
|
||||
|
@ -18,7 +18,7 @@ struct main0_out
|
||||
{
|
||||
float4 VertexOut_color [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
float gl_ClipDistance[1] /* [[clip_distance]] built-in not yet supported under Metal. */;
|
||||
};
|
||||
|
||||
|
@ -6,7 +6,7 @@ using namespace metal;
|
||||
struct main0_out
|
||||
{
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(texture2d<float> uSamp [[texture(0)]], texture2d<float> uSampo [[texture(1)]])
|
||||
|
@ -24,7 +24,7 @@ struct main0_out
|
||||
float3 vNormal [[user(locn1)]];
|
||||
float3 vColor [[user(locn2)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _18 [[buffer(0)]])
|
||||
|
@ -18,7 +18,7 @@ struct main0_out
|
||||
{
|
||||
float3 vNormal [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]])
|
||||
|
@ -6,7 +6,7 @@ using namespace metal;
|
||||
struct main0_out
|
||||
{
|
||||
float4 gl_Position [[position]];
|
||||
float gl_PointSize [[point_size]];
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
vertex main0_out main0(uint gl_VertexIndex [[vertex_id]], uint gl_InstanceIndex [[instance_id]])
|
||||
|
@ -296,8 +296,8 @@ struct SPIRType : IVariant
|
||||
bool depth;
|
||||
bool arrayed;
|
||||
bool ms;
|
||||
bool is_read = false;
|
||||
bool is_written = false;
|
||||
bool is_read = false; // TODO: temp hack to be replaced with var-based type output
|
||||
bool is_written = false; // TODO: temp hack to be replaced with var-based type output
|
||||
uint32_t sampled;
|
||||
spv::ImageFormat format;
|
||||
} image;
|
||||
|
@ -1960,7 +1960,13 @@ string CompilerMSL::member_attribute_qualifier(const SPIRType &type, uint32_t in
|
||||
return " /* [[clip_distance]] built-in not yet supported under Metal. */";
|
||||
|
||||
case BuiltInPointSize: // Must output only if really rendering points
|
||||
return options.is_rendering_points ? (string(" [[") + builtin_qualifier(builtin) + "]]") : "";
|
||||
// SPIR-V might declare PointSize as a builtin even though it's not really used.
|
||||
// In some cases PointSize builtin may be written without Point topology.
|
||||
// This is not an issue on GL/Vulkan, but it is on Metal, so we also have some way to forcefully disable
|
||||
// this builtin.
|
||||
return (active_output_builtins & (1ull << BuiltInPointSize)) && options.enable_point_size_builtin ?
|
||||
(string(" [[") + builtin_qualifier(builtin) + "]]") :
|
||||
"";
|
||||
|
||||
case BuiltInPosition:
|
||||
case BuiltInLayer:
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
struct Options
|
||||
{
|
||||
bool flip_vert_y = false;
|
||||
bool is_rendering_points = true;
|
||||
bool enable_point_size_builtin = true;
|
||||
std::string entry_point_name;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user