[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;
|
||||
|
||||
@@ -1487,7 +1487,7 @@ bool RenderTargetCache::ResolveCopy(SharedMemory* shared_memory,
|
||||
// of the buffer.
|
||||
root_constants.tile_sample_dest_base -= dest_address & ~0xFFFu;
|
||||
}
|
||||
assert_true(dest_pitch <= 8192);
|
||||
assert_true(dest_pitch <= xenos::kTexture2DCubeMaxWidthHeight);
|
||||
root_constants.tile_sample_dest_info =
|
||||
((dest_pitch + 31) >> 5) |
|
||||
(rb_copy_dest_info.copy_dest_array ? (((dest_height + 31) >> 5) << 9)
|
||||
|
||||
@@ -219,10 +219,10 @@ class D3D12CommandProcessor;
|
||||
// other, and because the height is unknown (and the viewport and scissor are
|
||||
// not always present - D3DPT_RECTLIST is used very commonly, especially for
|
||||
// clearing (Direct3D 9 Clear is implemented this way on the Xbox 360) and
|
||||
// copying, and it's usually drawn without a viewport and with 8192x8192
|
||||
// scissor), there may be cases of simultaneously bound render targets
|
||||
// overlapping each other in the EDRAM in a way that is difficult to resolve,
|
||||
// and stores/loads may destroy data.
|
||||
// copying, and it's usually drawn without a viewport and with the scissor of
|
||||
// the maximum possible size), there may be cases of simultaneously bound
|
||||
// render targets overlapping each other in the EDRAM in a way that is
|
||||
// difficult to resolve, and stores/loads may destroy data.
|
||||
//
|
||||
// =============================================================================
|
||||
// 2x width and height scaling implementation:
|
||||
|
||||
@@ -2189,7 +2189,9 @@ void TextureCache::BindingInfoFromFetchConstant(
|
||||
// No texture data at all.
|
||||
return;
|
||||
}
|
||||
if (fetch.dimension == xenos::DataDimension::k1D && width > 8192) {
|
||||
// TODO(Triang3l): Support long 1D textures.
|
||||
if (fetch.dimension == xenos::DataDimension::k1D &&
|
||||
width > xenos::kTexture2DCubeMaxWidthHeight) {
|
||||
XELOGE(
|
||||
"1D texture is too wide ({}) - ignoring! "
|
||||
"Report the game to Xenia developers",
|
||||
|
||||
Reference in New Issue
Block a user