[GPU] xenos.h: max texture size, interpolators
This commit is contained in:
@@ -3065,11 +3065,11 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
||||
// Conversion to Direct3D 12 normalized device coordinates.
|
||||
// See viewport configuration in UpdateFixedFunctionState for explanations.
|
||||
// X and Y scale/offset is to convert unnormalized coordinates generated by
|
||||
// shaders (for rectangle list drawing, for instance) to the 8192x8192
|
||||
// viewport (the maximum render target size) that is used to emulate
|
||||
// unnormalized coordinates. Z scale/offset is to convert from OpenGL NDC to
|
||||
// Direct3D NDC if needed. Also apply half-pixel offset to reproduce Direct3D
|
||||
// 9 rasterization rules - must be done before clipping, not through the
|
||||
// shaders (for rectangle list drawing, for instance) to the viewport of the
|
||||
// largest possible render target size that is used to emulate unnormalized
|
||||
// coordinates. Z scale/offset is to convert from OpenGL NDC to Direct3D NDC
|
||||
// if needed. Also apply half-pixel offset to reproduce Direct3D 9
|
||||
// rasterization rules - must be done before clipping, not through the
|
||||
// viewport, for SSAA and resolution scale to work correctly.
|
||||
float viewport_scale_x = regs[XE_GPU_REG_PA_CL_VPORT_XSCALE].f32;
|
||||
float viewport_scale_y = regs[XE_GPU_REG_PA_CL_VPORT_YSCALE].f32;
|
||||
@@ -3116,14 +3116,14 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
||||
ndc_offset_x += 0.5f / viewport_scale_x;
|
||||
}
|
||||
} else {
|
||||
ndc_offset_x += 1.0f / 8192.0f;
|
||||
ndc_offset_x += 1.0f / xenos::kTexture2DCubeMaxWidthHeight;
|
||||
}
|
||||
if (pa_cl_vte_cntl.vport_y_scale_ena) {
|
||||
if (viewport_scale_y != 0.0f) {
|
||||
ndc_offset_y += 0.5f / viewport_scale_y;
|
||||
}
|
||||
} else {
|
||||
ndc_offset_y -= 1.0f / 8192.0f;
|
||||
ndc_offset_y -= 1.0f / xenos::kTexture2DCubeMaxWidthHeight;
|
||||
}
|
||||
}
|
||||
dirty |= system_constants_.ndc_scale[0] != ndc_scale_x;
|
||||
@@ -3158,13 +3158,13 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
||||
point_screen_to_ndc_x =
|
||||
(viewport_scale_x != 0.0f) ? (0.5f / viewport_scale_x) : 0.0f;
|
||||
} else {
|
||||
point_screen_to_ndc_x = 1.0f / 8192.0f;
|
||||
point_screen_to_ndc_x = 1.0f / xenos::kTexture2DCubeMaxWidthHeight;
|
||||
}
|
||||
if (pa_cl_vte_cntl.vport_y_scale_ena) {
|
||||
point_screen_to_ndc_y =
|
||||
(viewport_scale_y != 0.0f) ? (-0.5f / viewport_scale_y) : 0.0f;
|
||||
} else {
|
||||
point_screen_to_ndc_y = -1.0f / 8192.0f;
|
||||
point_screen_to_ndc_y = -1.0f / xenos::kTexture2DCubeMaxWidthHeight;
|
||||
}
|
||||
dirty |= system_constants_.point_screen_to_ndc[0] != point_screen_to_ndc_x;
|
||||
dirty |= system_constants_.point_screen_to_ndc[1] != point_screen_to_ndc_y;
|
||||
|
||||
Reference in New Issue
Block a user