[GPU] Texture integer scaling fetches; 8_8_8_8_GAMMA resolve
Integer num_format fetches now get their scale CPU-side instead of trying to guess in the shader. This is authoritative; no cvar. Both translators now use texture_integer_scale_bits after signs/gamma and before exponent bias. This alone fixes black screens and a bunch of rendering bugs across at least several dozen titles. This new information lives in the updated FormatInfo table, including fixed component widths. Resolve also has two new fixes. 8_8_8_8_GAMMA EDRAM sources can now decode through the PWL curve while still in linear space, before MSAA resolve or format conversion, then re-encoded for gamma destinations. This is also now default enabled via gamma_decode_pwl_resolve and has improved blowout in at least 4 titles, with no obvious regressions thus far. Full resolve can also now pack fixed destinations according to copy_dest_number.
This commit is contained in:
committed by
Radosław Gliński
parent
573cce0fe2
commit
d119505289
@@ -16,8 +16,8 @@ namespace gpu {
|
||||
|
||||
using namespace xe::gpu::xenos;
|
||||
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel) \
|
||||
{xenos::TextureFormat::texture_format, FormatType::format, block_width, block_height, bits_per_pixel}
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel, component_bits_0, component_bits_1, component_bits_2, component_bits_3, fixed) \
|
||||
{xenos::TextureFormat::texture_format, FormatType::format, block_width, block_height, bits_per_pixel, {component_bits_0, component_bits_1, component_bits_2, component_bits_3}, fixed}
|
||||
const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
||||
static constexpr FormatInfo format_infos[64] = {
|
||||
#include "texture_info_formats.inl"
|
||||
@@ -43,7 +43,7 @@ constexpr unsigned char GetShift(unsigned pow) {
|
||||
this means we can use a boolean table that also acts as a sparse indexer ( popcnt preceding bits to get index) and shift and mask a 32 bit word to get the shift
|
||||
*/
|
||||
unsigned char FormatInfo::GetWidthShift(uint32_t gpu_format) {
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel) GetShift(block_width)
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel, component_bits_0, component_bits_1, component_bits_2, component_bits_3, fixed) GetShift(block_width)
|
||||
alignas(XE_HOST_CACHE_LINE_SIZE)
|
||||
constexpr unsigned char wshift_table[64] = {
|
||||
#include "texture_info_formats.inl"
|
||||
@@ -53,7 +53,7 @@ unsigned char FormatInfo::GetWidthShift(uint32_t gpu_format) {
|
||||
return wshift_table[gpu_format];
|
||||
}
|
||||
unsigned char FormatInfo::GetHeightShift(uint32_t gpu_format) {
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel) GetShift(block_height)
|
||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel, component_bits_0, component_bits_1, component_bits_2, component_bits_3, fixed) GetShift(block_height)
|
||||
alignas(XE_HOST_CACHE_LINE_SIZE)
|
||||
constexpr unsigned char hshift_table[64] = {
|
||||
#include "texture_info_formats.inl"
|
||||
|
||||
Reference in New Issue
Block a user