diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 0f4247b094b..cdefd9b6c14 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -1144,7 +1144,9 @@ select_shader_variant(struct d3d12_selection_context *sel_ctx, d3d12_shader_sele if (new_nir_variant->info.stage == MESA_SHADER_TESS_CTRL) { new_nir_variant->info.tess._primitive_mode = (tess_primitive_mode)key.hs.primitive_mode; - new_nir_variant->info.tess.ccw = key.hs.ccw; + /* GL tess domain is lower-left origin, D3D is upper-left. + * Since we invert origin, we also need to invert triangle winding. */ + new_nir_variant->info.tess.ccw = !key.hs.ccw; new_nir_variant->info.tess.point_mode = key.hs.point_mode; new_nir_variant->info.tess.spacing = key.hs.spacing; diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 9f11158abe8..a20c7c0b878 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -1746,12 +1746,9 @@ get_tessellator_output_primitive(const struct shader_info *info) return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_POINT; if (info->tess._primitive_mode == TESS_PRIMITIVE_ISOLINES) return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_LINE; - /* Note: GL tessellation domain is inverted from D3D, which means triangle - * winding needs to be inverted. - */ if (info->tess.ccw) - return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_TRIANGLE_CW; - return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_TRIANGLE_CCW; + return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_TRIANGLE_CCW; + return DXIL_TESSELLATOR_OUTPUT_PRIMITIVE_TRIANGLE_CW; } static const struct dxil_mdnode *