GS: Separate shader convert for float -> 16/32bit int

This commit is contained in:
Connor McLaughlin 2021-12-19 17:07:40 +10:00 committed by refractionpcsx2
parent 8e920d727f
commit b355efd73a
3 changed files with 7 additions and 5 deletions

View File

@ -32,6 +32,7 @@ const char* shaderName(ShaderConvert value)
case ShaderConvert::TRANSPARENCY_FILTER: return "ps_filter_transparency";
case ShaderConvert::TRIANGULAR_FILTER: return "ps_filter_triangular";
case ShaderConvert::COMPLEX_FILTER: return "ps_filter_complex";
case ShaderConvert::FLOAT32_TO_16_BITS: return "ps_convert_float32_32bits";
case ShaderConvert::FLOAT32_TO_32_BITS: return "ps_convert_float32_32bits";
case ShaderConvert::FLOAT32_TO_RGBA8: return "ps_convert_float32_rgba8";
case ShaderConvert::FLOAT16_TO_RGB5A1: return "ps_convert_float16_rgb5a1";

View File

@ -35,19 +35,20 @@ enum class ShaderConvert
DATM_1,
DATM_0,
MOD_256,
SCANLINE = 5,
SCANLINE,
DIAGONAL_FILTER,
TRANSPARENCY_FILTER,
TRIANGULAR_FILTER,
COMPLEX_FILTER,
FLOAT32_TO_32_BITS = 10,
FLOAT32_TO_16_BITS,
FLOAT32_TO_32_BITS,
FLOAT32_TO_RGBA8,
FLOAT16_TO_RGB5A1,
RGBA8_TO_FLOAT32 = 13,
RGBA8_TO_FLOAT32,
RGBA8_TO_FLOAT24,
RGBA8_TO_FLOAT16,
RGB5A1_TO_FLOAT16,
RGBA_TO_8I = 17,
RGBA_TO_8I,
YUV,
Count
};

View File

@ -1687,7 +1687,7 @@ void GSTextureCache::Read(Target* t, const GSVector4i& r)
case PSM_PSMZ16:
case PSM_PSMZ16S:
fmt = GSTexture::Format::UInt16;
ps_shader = ShaderConvert::FLOAT32_TO_32_BITS;
ps_shader = ShaderConvert::FLOAT32_TO_16_BITS;
break;
default: