Compare commits
2 Commits
afb3af6bf5
...
c3c2f9638a
Author | SHA1 | Date | |
---|---|---|---|
c3c2f9638a | |||
aea4e49f71 |
@ -1,11 +0,0 @@
|
|||||||
// Copyright (c) 2016-2020 The Khronos Group Inc.
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: CC-BY-4.0
|
|
||||||
|
|
||||||
= Code of Conduct
|
|
||||||
|
|
||||||
A reminder that this issue tracker is managed by the Khronos Group.
|
|
||||||
Interactions here should follow the
|
|
||||||
https://www.khronos.org/developers/code-of-conduct[Khronos Code of Conduct],
|
|
||||||
which prohibits aggressive or derogatory language. Please keep the
|
|
||||||
discussion friendly and civil.
|
|
@ -783,6 +783,9 @@ void CompilerHLSL::emit_builtin_inputs_in_struct()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BuiltInPrimitiveId:
|
case BuiltInPrimitiveId:
|
||||||
|
if (legacy)
|
||||||
|
SPIRV_CROSS_THROW("Primitive ID not supported in SM 3.0 or lower.");
|
||||||
|
|
||||||
type = "uint";
|
type = "uint";
|
||||||
semantic = "SV_PrimitiveID";
|
semantic = "SV_PrimitiveID";
|
||||||
break;
|
break;
|
||||||
@ -830,8 +833,16 @@ void CompilerHLSL::emit_builtin_inputs_in_struct()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BuiltInFrontFacing:
|
case BuiltInFrontFacing:
|
||||||
type = "bool";
|
if (legacy)
|
||||||
semantic = "SV_IsFrontFace";
|
{
|
||||||
|
type = "float";
|
||||||
|
semantic = "VFACE";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
type = "bool";
|
||||||
|
semantic = "SV_IsFrontFace";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BuiltInViewIndex:
|
case BuiltInViewIndex:
|
||||||
@ -3146,6 +3157,20 @@ void CompilerHLSL::emit_hlsl_entry_point()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
case BuiltInFrontFacing:
|
||||||
|
{
|
||||||
|
if (legacy)
|
||||||
|
statement(builtin, " = bool(stage_input.", builtin, " > 0.0 ? true : false);");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
statement(builtin, " = int(stage_input.", builtin, ");");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case BuiltInVertexId:
|
case BuiltInVertexId:
|
||||||
case BuiltInVertexIndex:
|
case BuiltInVertexIndex:
|
||||||
case BuiltInInstanceIndex:
|
case BuiltInInstanceIndex:
|
||||||
|
Loading…
Reference in New Issue
Block a user