|
@@ -638,6 +638,17 @@ namespace bgfx { namespace metal
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
std::string source = msl.compile();
|
|
std::string source = msl.compile();
|
|
|
|
|
+
|
|
|
|
|
+ // fix https://github.com/bkaradzic/bgfx/issues/2822
|
|
|
|
|
+ // insert struct member which declares point size, defaulted to 1
|
|
|
|
|
+ if (_options.shaderType == 'v'){
|
|
|
|
|
+ auto findName = "xlatMtlMain_out\n{";
|
|
|
|
|
+ auto pos = source.find(findName);
|
|
|
|
|
+ if (pos != std::string::npos){
|
|
|
|
|
+ pos += strlen(findName);
|
|
|
|
|
+ source.insert(pos, "\n\tfloat bgfx_metal_pointSize [[point_size]] = 1;");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if ('c' == _options.shaderType)
|
|
if ('c' == _options.shaderType)
|
|
|
{
|
|
{
|