List an encoding for shader debuginfo source. Add HLSL/spvas to enum

This commit is contained in:
baldurk
2018-08-09 16:56:50 +01:00
parent 492a9bf828
commit 7de19f4c35
7 changed files with 39 additions and 3 deletions
+3
View File
@@ -831,9 +831,12 @@ std::string DoStringise(const ShaderEncoding &el)
{
BEGIN_ENUM_STRINGISE(ShaderEncoding)
{
STRINGISE_ENUM_CLASS(Unknown);
STRINGISE_ENUM_CLASS(DXBC);
STRINGISE_ENUM_CLASS(GLSL);
STRINGISE_ENUM_CLASS_NAMED(SPIRV, "SPIR-V");
STRINGISE_ENUM_CLASS_NAMED(SPIRVAsm, "SPIR-V Asm");
STRINGISE_ENUM_CLASS(HLSL);
}
END_ENUM_STRINGISE();
}
+19
View File
@@ -1376,6 +1376,10 @@ constexpr inline bool IsD3D(GraphicsAPI api)
DOCUMENT(R"(Identifies a shader encoding used to pass shader code to an API.
.. data:: Unknown
Unknown or unprocessable format.
.. data:: DXBC
DXBC binary shader, used by D3D11 and D3D12.
@@ -1387,14 +1391,29 @@ DOCUMENT(R"(Identifies a shader encoding used to pass shader code to an API.
.. data:: SPIRV
SPIR-V binary shader, used by Vulkan and with an extension by OpenGL.
.. data:: SPIRVAsm
Canonical SPIR-V assembly form, used (indirectly via :data:`SPIRV`) by Vulkan and with an
extension by OpenGL.
.. data:: HLSL
HLSL in string format, used by D3D11, D3D12, and Vulkan/GL via compilation to SPIR-V.
)");
enum class ShaderEncoding : uint32_t
{
Unknown,
First = Unknown,
DXBC,
GLSL,
SPIRV,
SPIRVAsm,
HLSL,
Count,
};
ITERABLE_OPERATORS(ShaderEncoding);
DECLARE_REFLECTION_ENUM(ShaderEncoding);
DOCUMENT(R"(A primitive topology used for processing vertex data.
+4 -1
View File
@@ -915,11 +915,14 @@ struct ShaderDebugInfo
DOCUMENT("A :class:`ShaderCompileFlags` containing the flags used to compile this shader.");
ShaderCompileFlags compileFlags;
DOCUMENT(R"(A list of :class:`ShaderSourceFile`.
DOCUMENT(R"(A list of :class:`ShaderSourceFile`, encoded in the form denoted by :data:`encoding`.
The first entry in the list is always the file where the entry point is.
)");
rdcarray<ShaderSourceFile> files;
DOCUMENT("The :class:`ShaderEncoding` of the source. See :data:`files`.");
ShaderEncoding encoding = ShaderEncoding::Unknown;
};
DECLARE_REFLECTION_STRUCT(ShaderDebugInfo);