[GPU] Shader::IsHostVertexShaderTypeDomain

This commit is contained in:
Triang3l
2022-05-15 16:13:05 +03:00
parent f9b3b90a68
commit a65fd4f673
4 changed files with 49 additions and 34 deletions

View File

@@ -659,16 +659,25 @@ class Shader {
// packed. This is : uint32_t for simplicity of packing in bit fields.
enum class HostVertexShaderType : uint32_t {
kVertex,
kLineDomainCPIndexed,
kDomainStart,
kLineDomainCPIndexed = kDomainStart,
kLineDomainPatchIndexed,
kTriangleDomainCPIndexed,
kTriangleDomainPatchIndexed,
kQuadDomainCPIndexed,
kQuadDomainPatchIndexed,
kDomainEnd,
};
// For packing HostVertexShaderType in bit fields.
static constexpr uint32_t kHostVertexShaderTypeBitCount = 3;
static constexpr bool IsHostVertexShaderTypeDomain(
HostVertexShaderType host_vertex_shader_type) {
return host_vertex_shader_type >= HostVertexShaderType::kDomainStart &&
host_vertex_shader_type < HostVertexShaderType::kDomainEnd;
}
struct Error {
bool is_fatal = false;
std::string message;