diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-17 11:01:27 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-17 13:35:22 -0700 |
| commit | 6f239b0489602d0c333282a3751d454a166d33f1 (patch) | |
| tree | 3bc353c2a84e5ed2b09de951c24083d0e7aa0c36 /source | |
| parent | b4977c1626f9791bc0c84c75e7012ddd7cb40913 (diff) | |
Map HLSL `linear` to GLSL... nothing
The behavior of the `linear` modifier should be the default interpolation behavior in GLSL.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/emit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 0eb371b88..effa9aa97 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2683,6 +2683,9 @@ struct EmitVisitor #define CASE2(TYPE, HLSL_NAME, GLSL_NAME) \ else if(auto mod_##TYPE = mod.As<TYPE>()) Emit((context->shared->target == CodeGenTarget::GLSL) ? (#GLSL_NAME " ") : (#HLSL_NAME " ")) + #define CASE2_RAW(TYPE, HLSL_NAME, GLSL_NAME) \ + else if(auto mod_##TYPE = mod.As<TYPE>()) Emit((context->shared->target == CodeGenTarget::GLSL) ? (GLSL_NAME) : (HLSL_NAME)) + CASE(RowMajorLayoutModifier, row_major); CASE(ColumnMajorLayoutModifier, column_major); @@ -2703,7 +2706,7 @@ struct EmitVisitor CASE(HLSLLineAdjModifier, lineadj); CASE(HLSLTriangleAdjModifier, triangleadj); - CASE(HLSLLinearModifier, linear); + CASE2_RAW(HLSLLinearModifier, "linear ", ""); CASE(HLSLSampleModifier, sample); CASE(HLSLCentroidModifier, centroid); |
