[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
@@ -34,7 +34,7 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
// TODO(Triang3l): Change to 0xYYYYMMDD once it's out of the rapid
|
||||
// prototyping stage (easier to do small granular updates with an
|
||||
// incremental counter).
|
||||
static constexpr uint32_t kVersion = 8;
|
||||
static constexpr uint32_t kVersion = 9;
|
||||
|
||||
enum class DepthStencilMode : uint32_t {
|
||||
kNoModifiers,
|
||||
@@ -275,6 +275,13 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
|
||||
// The constant blend factor for the respective modes.
|
||||
float edram_blend_constant[4];
|
||||
|
||||
// Integer num_format on fixed textures. Each dword packs the scale needed
|
||||
// to turn normalized host samples back into guest integer values.
|
||||
// bits 0:3 = component_bits - 1
|
||||
// bit 4 = signed.
|
||||
// Zero means no scale.
|
||||
uint32_t texture_integer_scale_bits[32];
|
||||
};
|
||||
|
||||
// Separate constant buffer for user clip planes
|
||||
@@ -905,6 +912,7 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
kSystemConstantEdramRTKeepMask,
|
||||
kSystemConstantEdramRTClamp,
|
||||
kSystemConstantEdramBlendConstant,
|
||||
kSystemConstantTextureIntegerScaleBits,
|
||||
};
|
||||
spv::Id uniform_system_constants_;
|
||||
spv::Id uniform_clip_plane_constants_;
|
||||
|
||||
Reference in New Issue
Block a user