[D3D12] Non-adaptive triangle tessellation

This commit is contained in:
Triang3l
2020-04-07 18:55:43 +03:00
parent b00baadf53
commit 9d36c257b0
21 changed files with 445 additions and 247 deletions

View File

@@ -714,6 +714,12 @@ D3D12Shader* PipelineCache::LoadShader(ShaderType shader_type,
Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid()
const {
// If the values this functions returns are changed, INVALIDATE THE SHADER
// STORAGE (increase kVersion for BOTH shaders and pipeline states)! The
// exception is when the function originally returned "unsupported", but
// started to return a valid value (in this case the shader wouldn't be cached
// in the first place). Otherwise games will not be able to locate shaders for
// draws for which the host vertex shader type has changed!
auto& regs = *register_file_;
auto vgt_draw_initiator = regs.Get<reg::VGT_DRAW_INITIATOR>();
if (!xenos::IsMajorModeExplicit(vgt_draw_initiator.major_mode,
@@ -729,26 +735,35 @@ Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid()
xenos::TessellationMode tessellation_mode =
regs.Get<reg::VGT_HOS_CNTL>().tess_mode;
switch (vgt_draw_initiator.prim_type) {
// case PrimitiveType::kTriangleList:
// switch (tessellation_mode) {
// case xenos::TessellationMode::kDiscrete:
// // Call of Duty 3 - green terrain in the first mission.
// case xenos::TessellationMode::kContinuous:
// // Viva Pinata - something on the start screen.
// return Shader::HostVertexShaderType::kTriangleDomainConstant;
// }
// break;
// TODO(Triang3l): Support non-adaptive tessellation.
case PrimitiveType::kTriangleList:
// Also supported by triangle strips and fans according to:
// https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_vertex_shader_tessellator.txt
// Would need to convert those to triangle lists, but haven't seen any
// games using tessellated strips/fans so far.
switch (tessellation_mode) {
case xenos::TessellationMode::kDiscrete:
// - Call of Duty 3 - nets above barrels in the beginning of the
// first mission (turn right after the end of the intro) -
// kTriangleList.
case xenos::TessellationMode::kContinuous:
// - Viva Pinata - tree building with a beehive in the beginning
// (visible on the start screen behind the logo), waterfall in the
// beginning - kTriangleList.
return Shader::HostVertexShaderType::kTriangleDomainConstant;
default:
break;
}
break;
case PrimitiveType::kTrianglePatch:
if (tessellation_mode == xenos::TessellationMode::kAdaptive) {
// Banjo-Kazooie: Nuts & Bolts - water.
// Halo 3 - water.
// - Banjo-Kazooie: Nuts & Bolts - water.
// - Halo 3 - water.
return Shader::HostVertexShaderType::kTriangleDomainAdaptive;
}
break;
case PrimitiveType::kQuadPatch:
if (tessellation_mode == xenos::TessellationMode::kAdaptive) {
// Viva Pinata - something on the start screen.
// - Viva Pinata - something on the start screen.
return Shader::HostVertexShaderType::kQuadDomainAdaptive;
}
break;
@@ -932,10 +947,36 @@ bool PipelineCache::TranslateShader(
sampler_bindings, sampler_binding_count);
if (shader->is_valid()) {
const char* host_shader_type;
if (shader->type() == ShaderType::kVertex) {
switch (shader->host_vertex_shader_type()) {
case Shader::HostVertexShaderType::kLineDomainConstant:
host_shader_type = "constant line domain";
break;
case Shader::HostVertexShaderType::kLineDomainAdaptive:
host_shader_type = "adaptive line domain";
break;
case Shader::HostVertexShaderType::kTriangleDomainConstant:
host_shader_type = "constant triangle domain";
break;
case Shader::HostVertexShaderType::kTriangleDomainAdaptive:
host_shader_type = "adaptive triangle domain";
break;
case Shader::HostVertexShaderType::kQuadDomainConstant:
host_shader_type = "constant quad domain";
break;
case Shader::HostVertexShaderType::kQuadDomainAdaptive:
host_shader_type = "adaptive quad domain";
break;
default:
host_shader_type = "vertex";
}
} else {
host_shader_type = "pixel";
}
XELOGGPU("Generated %s shader (%db) - hash %.16" PRIX64 ":\n%s\n",
shader->type() == ShaderType::kVertex ? "vertex" : "pixel",
shader->ucode_dword_count() * 4, shader->ucode_data_hash(),
shader->ucode_disassembly().c_str());
host_shader_type, shader->ucode_dword_count() * 4,
shader->ucode_data_hash(), shader->ucode_disassembly().c_str());
}
// Create a version of the shader with early depth/stencil forced by Xenia

View File

@@ -39,8 +39,7 @@ XeHSControlPointOutput main(
InputPatch<XeHSControlPointInput, 4> xe_input_patch,
uint xe_control_point_id : SV_OutputControlPointID) {
XeHSControlPointOutput output;
// TODO(Triang3l): Re-enable when non-adaptive tessellation is properly added.
/* output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor); */
output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor);
return output;
}

View File

@@ -34,8 +34,7 @@ XeHSControlPointOutput main(
InputPatch<XeHSControlPointInput, 3> xe_input_patch,
uint xe_control_point_id : SV_OutputControlPointID) {
XeHSControlPointOutput output;
// TODO(Triang3l): Re-enable when non-adaptive tessellation is properly added.
/* output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor); */
output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor);
return output;
}

View File

@@ -39,8 +39,7 @@ XeHSControlPointOutput main(
InputPatch<XeHSControlPointInput, 4> xe_input_patch,
uint xe_control_point_id : SV_OutputControlPointID) {
XeHSControlPointOutput output;
// TODO(Triang3l): Re-enable when non-adaptive tessellation is properly added.
/* output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor); */
output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor);
return output;
}

View File

@@ -38,8 +38,7 @@ XeHSControlPointOutput main(
InputPatch<XeHSControlPointInput, 3> xe_input_patch,
uint xe_control_point_id : SV_OutputControlPointID) {
XeHSControlPointOutput output;
// TODO(Triang3l): Re-enable when non-adaptive tessellation is properly added.
/* output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor); */
output.index =
float(xe_input_patch[xe_control_point_id].index_or_edge_factor);
return output;
}

View File

@@ -1,11 +1,11 @@
// generated from `xb buildhlsl`
// source: continuous_quad.hs.hlsl
const uint8_t continuous_quad_hs[] = {
0x44, 0x58, 0x42, 0x43, 0x76, 0xC7, 0xA0, 0x46, 0x15, 0xD6, 0xCA, 0xBC,
0x4E, 0x86, 0xDF, 0xA5, 0xDD, 0x15, 0xF5, 0x21, 0x01, 0x00, 0x00, 0x00,
0x48, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x74, 0x0A, 0x00, 0x00,
0x38, 0x0B, 0x00, 0x00, 0xAC, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0x44, 0x58, 0x42, 0x43, 0x54, 0x6C, 0x4B, 0xEC, 0x89, 0x62, 0x2A, 0xD1,
0x5C, 0x19, 0xA6, 0x76, 0x00, 0x84, 0xA7, 0xF2, 0x01, 0x00, 0x00, 0x00,
0xC4, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x98, 0x0A, 0x00, 0x00,
0x5C, 0x0B, 0x00, 0x00, 0x28, 0x0D, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0xF0, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x48,
0x00, 0x05, 0x00, 0x00, 0xC6, 0x09, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25,
@@ -221,9 +221,12 @@ const uint8_t continuous_quad_hs[] = {
0x31, 0x00, 0xAB, 0xAB, 0x49, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB, 0x4F, 0x53, 0x47, 0x4E,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0E, 0x00, 0x00,
0x58, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB,
0x50, 0x43, 0x53, 0x47, 0xBC, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -240,49 +243,56 @@ const uint8_t continuous_quad_hs[] = {
0x01, 0x0E, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54, 0x65, 0x73, 0x73, 0x46,
0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x53, 0x56, 0x5F, 0x49, 0x6E, 0x73,
0x69, 0x64, 0x65, 0x54, 0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x6C, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0xC4, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x71, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x93, 0x20, 0x00, 0x01, 0x94, 0x20, 0x00, 0x01, 0x95, 0x18, 0x00, 0x01,
0x96, 0x20, 0x00, 0x01, 0x97, 0x18, 0x00, 0x01, 0x6A, 0x08, 0x00, 0x01,
0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00,
0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0C, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x02, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x60, 0x01, 0x00, 0x5F, 0x00, 0x00, 0x04, 0x12, 0x10, 0x20, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x01, 0x00, 0x2B, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x10, 0xA0, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02,
0x02, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04,
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00,
0x36, 0x00, 0x00, 0x09, 0x12, 0x20, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08,
0x12, 0x20, 0x90, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01,
0x99, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x09, 0x12, 0x20, 0xD0, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
0x94, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@@ -65,14 +65,15 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// XEVERTEXID 0 x 0 NONE int
// XEVERTEXID 0 x 0 NONE int x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
// XEVERTEXID 0 x 0 NONE float x
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Quadrilateral 4
@@ -91,6 +92,12 @@ dcl_tessellator_output_primitive output_triangle_cw
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][15], immediateIndexed, space=0
hs_control_point_phase
dcl_input vOutputControlPointID
dcl_input v[4][0].x
dcl_output o0.x
dcl_temps 1
mov r0.x, vOutputControlPointID
itof o0.x, v[r0.x + 0][0].x
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 4
@@ -114,4 +121,4 @@ dcl_indexrange o4.x 2
mov r0.x, vForkInstanceID.x
mov o[r0.x + 4].x, CB0[0][14].y
ret
// Approximately 7 instruction slots used
// Approximately 9 instruction slots used

View File

@@ -1,11 +1,11 @@
// generated from `xb buildhlsl`
// source: continuous_triangle.hs.hlsl
const uint8_t continuous_triangle_hs[] = {
0x44, 0x58, 0x42, 0x43, 0xB0, 0xD9, 0xC9, 0x59, 0xEF, 0xD3, 0xB8, 0x72,
0x20, 0x5B, 0xC2, 0x4D, 0x99, 0x0C, 0x41, 0xC6, 0x01, 0x00, 0x00, 0x00,
0xB8, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x74, 0x0A, 0x00, 0x00,
0x08, 0x0B, 0x00, 0x00, 0x1C, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0x44, 0x58, 0x42, 0x43, 0x0F, 0x28, 0xA3, 0x27, 0xAF, 0x06, 0xF6, 0x3C,
0x45, 0x17, 0xD9, 0x0F, 0x54, 0xAD, 0xAA, 0xC4, 0x01, 0x00, 0x00, 0x00,
0x34, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x98, 0x0A, 0x00, 0x00,
0x2C, 0x0B, 0x00, 0x00, 0x98, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0xF0, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x48,
0x00, 0x05, 0x00, 0x00, 0xC6, 0x09, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25,
@@ -221,9 +221,12 @@ const uint8_t continuous_triangle_hs[] = {
0x31, 0x00, 0xAB, 0xAB, 0x49, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB, 0x4F, 0x53, 0x47, 0x4E,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0E, 0x00, 0x00,
0x58, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB,
0x50, 0x43, 0x53, 0x47, 0x8C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -236,41 +239,48 @@ const uint8_t continuous_triangle_hs[] = {
0x01, 0x0E, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54, 0x65, 0x73, 0x73, 0x46,
0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x53, 0x56, 0x5F, 0x49, 0x6E, 0x73,
0x69, 0x64, 0x65, 0x54, 0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x0C, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x43, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x64, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x59, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x93, 0x18, 0x00, 0x01, 0x94, 0x18, 0x00, 0x01, 0x95, 0x10, 0x00, 0x01,
0x96, 0x20, 0x00, 0x01, 0x97, 0x18, 0x00, 0x01, 0x6A, 0x08, 0x00, 0x01,
0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00,
0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04,
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00,
0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00, 0x0A, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x60, 0x01, 0x00, 0x5F, 0x00, 0x00, 0x04, 0x12, 0x10, 0x20, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x01, 0x00, 0x2B, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x10, 0xA0, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02,
0x03, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x07, 0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
0x94, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@@ -63,14 +63,15 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// XEVERTEXID 0 x 0 NONE int
// XEVERTEXID 0 x 0 NONE int x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
// XEVERTEXID 0 x 0 NONE float x
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Triangle 3
@@ -89,6 +90,12 @@ dcl_tessellator_output_primitive output_triangle_cw
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][15], immediateIndexed, space=0
hs_control_point_phase
dcl_input vOutputControlPointID
dcl_input v[3][0].x
dcl_output o0.x
dcl_temps 1
mov r0.x, vOutputControlPointID
itof o0.x, v[r0.x + 0][0].x
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 3
@@ -105,4 +112,4 @@ hs_fork_phase
dcl_output_siv o3.x, finalTriInsideTessFactor
mov o3.x, CB0[0][14].y
ret
// Approximately 6 instruction slots used
// Approximately 8 instruction slots used

View File

@@ -1,11 +1,11 @@
// generated from `xb buildhlsl`
// source: discrete_quad.hs.hlsl
const uint8_t discrete_quad_hs[] = {
0x44, 0x58, 0x42, 0x43, 0xAE, 0xC1, 0x1F, 0x97, 0x00, 0x34, 0x91, 0x82,
0x96, 0x0C, 0x8F, 0x6F, 0x4B, 0xF4, 0x27, 0x2F, 0x01, 0x00, 0x00, 0x00,
0x48, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x74, 0x0A, 0x00, 0x00,
0x38, 0x0B, 0x00, 0x00, 0xAC, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0x44, 0x58, 0x42, 0x43, 0x8A, 0x06, 0x56, 0xDB, 0x1A, 0x2B, 0x72, 0x36,
0x68, 0xB8, 0x74, 0xD8, 0x40, 0xD8, 0xD2, 0xBC, 0x01, 0x00, 0x00, 0x00,
0xC4, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x98, 0x0A, 0x00, 0x00,
0x5C, 0x0B, 0x00, 0x00, 0x28, 0x0D, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0xF0, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x48,
0x00, 0x05, 0x00, 0x00, 0xC6, 0x09, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25,
@@ -221,9 +221,12 @@ const uint8_t discrete_quad_hs[] = {
0x31, 0x00, 0xAB, 0xAB, 0x49, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB, 0x4F, 0x53, 0x47, 0x4E,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0E, 0x00, 0x00,
0x58, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB,
0x50, 0x43, 0x53, 0x47, 0xBC, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -240,49 +243,56 @@ const uint8_t discrete_quad_hs[] = {
0x01, 0x0E, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54, 0x65, 0x73, 0x73, 0x46,
0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x53, 0x56, 0x5F, 0x49, 0x6E, 0x73,
0x69, 0x64, 0x65, 0x54, 0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x6C, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0xC4, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x71, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x93, 0x20, 0x00, 0x01, 0x94, 0x20, 0x00, 0x01, 0x95, 0x18, 0x00, 0x01,
0x96, 0x08, 0x00, 0x01, 0x97, 0x18, 0x00, 0x01, 0x6A, 0x08, 0x00, 0x01,
0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00,
0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0C, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x02, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x60, 0x01, 0x00, 0x5F, 0x00, 0x00, 0x04, 0x12, 0x10, 0x20, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x01, 0x00, 0x2B, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x10, 0xA0, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02,
0x02, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04,
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00,
0x36, 0x00, 0x00, 0x09, 0x12, 0x20, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08,
0x12, 0x20, 0x90, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01,
0x99, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x09, 0x12, 0x20, 0xD0, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
0x94, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@@ -65,14 +65,15 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// XEVERTEXID 0 x 0 NONE int
// XEVERTEXID 0 x 0 NONE int x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
// XEVERTEXID 0 x 0 NONE float x
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Quadrilateral 4
@@ -91,6 +92,12 @@ dcl_tessellator_output_primitive output_triangle_cw
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][15], immediateIndexed, space=0
hs_control_point_phase
dcl_input vOutputControlPointID
dcl_input v[4][0].x
dcl_output o0.x
dcl_temps 1
mov r0.x, vOutputControlPointID
itof o0.x, v[r0.x + 0][0].x
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 4
@@ -114,4 +121,4 @@ dcl_indexrange o4.x 2
mov r0.x, vForkInstanceID.x
mov o[r0.x + 4].x, CB0[0][14].y
ret
// Approximately 7 instruction slots used
// Approximately 9 instruction slots used

View File

@@ -1,11 +1,11 @@
// generated from `xb buildhlsl`
// source: discrete_triangle.hs.hlsl
const uint8_t discrete_triangle_hs[] = {
0x44, 0x58, 0x42, 0x43, 0xD3, 0xE0, 0x18, 0x9E, 0xED, 0xAE, 0x8C, 0x08,
0xAA, 0xA1, 0xF2, 0xF0, 0x62, 0xDF, 0x88, 0xA0, 0x01, 0x00, 0x00, 0x00,
0xB8, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x74, 0x0A, 0x00, 0x00,
0x08, 0x0B, 0x00, 0x00, 0x1C, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0x44, 0x58, 0x42, 0x43, 0x78, 0xB4, 0xD4, 0xFC, 0xA1, 0xD7, 0x9F, 0x70,
0x23, 0x39, 0xD4, 0x01, 0x11, 0x6C, 0xC6, 0x61, 0x01, 0x00, 0x00, 0x00,
0x34, 0x0D, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x30, 0x0A, 0x00, 0x00, 0x64, 0x0A, 0x00, 0x00, 0x98, 0x0A, 0x00, 0x00,
0x2C, 0x0B, 0x00, 0x00, 0x98, 0x0C, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
0xF0, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x48,
0x00, 0x05, 0x00, 0x00, 0xC6, 0x09, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25,
@@ -221,9 +221,12 @@ const uint8_t discrete_triangle_hs[] = {
0x31, 0x00, 0xAB, 0xAB, 0x49, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x58, 0x45, 0x56, 0x45,
0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB, 0x4F, 0x53, 0x47, 0x4E,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0E, 0x00, 0x00,
0x58, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x58, 0x49, 0x44, 0x00, 0xAB,
0x50, 0x43, 0x53, 0x47, 0x8C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -236,41 +239,48 @@ const uint8_t discrete_triangle_hs[] = {
0x01, 0x0E, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54, 0x65, 0x73, 0x73, 0x46,
0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x53, 0x56, 0x5F, 0x49, 0x6E, 0x73,
0x69, 0x64, 0x65, 0x54, 0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x0C, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x43, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x72, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x64, 0x01, 0x00, 0x00,
0x51, 0x00, 0x03, 0x00, 0x59, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01,
0x93, 0x18, 0x00, 0x01, 0x94, 0x18, 0x00, 0x01, 0x95, 0x10, 0x00, 0x01,
0x96, 0x08, 0x00, 0x01, 0x97, 0x18, 0x00, 0x01, 0x6A, 0x08, 0x00, 0x01,
0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00,
0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04,
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x01, 0x00,
0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00, 0x0A, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01,
0x73, 0x00, 0x00, 0x01, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x01, 0x5F, 0x00, 0x00, 0x02,
0x00, 0x60, 0x01, 0x00, 0x5F, 0x00, 0x00, 0x04, 0x12, 0x10, 0x20, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x01, 0x00, 0x2B, 0x00, 0x00, 0x07,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x10, 0xA0, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x99, 0x00, 0x00, 0x02,
0x03, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x02, 0x00, 0x70, 0x01, 0x00,
0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0x12, 0x20, 0x10, 0x00,
0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x70, 0x01, 0x00, 0x36, 0x00, 0x00, 0x08, 0x12, 0x20, 0x90, 0x00,
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x80, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x01, 0x67, 0x00, 0x00, 0x04,
0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x36, 0x00, 0x00, 0x07, 0x12, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
0x1A, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
0x94, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@@ -63,14 +63,15 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// XEVERTEXID 0 x 0 NONE int
// XEVERTEXID 0 x 0 NONE int x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
// XEVERTEXID 0 x 0 NONE float x
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Triangle 3
@@ -89,6 +90,12 @@ dcl_tessellator_output_primitive output_triangle_cw
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][15], immediateIndexed, space=0
hs_control_point_phase
dcl_input vOutputControlPointID
dcl_input v[3][0].x
dcl_output o0.x
dcl_temps 1
mov r0.x, vOutputControlPointID
itof o0.x, v[r0.x + 0][0].x
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 3
@@ -105,4 +112,4 @@ hs_fork_phase
dcl_output_siv o3.x, finalTriInsideTessFactor
mov o3.x, CB0[0][14].y
ret
// Approximately 6 instruction slots used
// Approximately 8 instruction slots used

View File

@@ -59,8 +59,7 @@ struct XeHSControlPointInput {
};
struct XeHSControlPointOutput {
// TODO(Triang3l): Re-enable when non-adaptive tessellation is properly added.
// float index : XEVERTEXID;
float index : XEVERTEXID;
};
struct XeVertexPostGS {