[GPU] Use UNorm not signed EDRAM encoding in k_16_16 resolve packing.

The original commit (2eea146b) correctly added kXenosFormat_16_16_EDRAM
case labels and fixed the unpack clamp from -1.0 to -32.0, but
incorrectly changed the resolve pack functions from UNorm to signed EDRAM
encoding. The resolve destination is a regular texture sampled as UNorm
[0,1], not EDRAM. Using EDRAM packing double-encodes the [-32,32]
scaling, crushing all values by ~64x and caused visual issues
particularly in UE3 titles.

The bytecode submitted with the change was actually correct, but the
source had additional incorrect pieces that only manifested when shaders
were rebuilt.
This commit is contained in:
Herman S.
2026-03-05 15:11:22 +09:00
parent 545b8bb8e9
commit 16d2cc05c5

View File

@@ -243,10 +243,10 @@ uint4_xe XePack32bpp4Pixels(float4_xe pixel_0, float4_xe pixel_1,
break;
case kXenosFormat_16_16_EDRAM:
case kXenosFormat_16_16:
packed.x = XePackR16G16Edram(pixel_0.rg);
packed.y = XePackR16G16Edram(pixel_1.rg);
packed.z = XePackR16G16Edram(pixel_2.rg);
packed.w = XePackR16G16Edram(pixel_3.rg);
packed.x = XePackR16G16UNorm(pixel_0.rg);
packed.y = XePackR16G16UNorm(pixel_1.rg);
packed.z = XePackR16G16UNorm(pixel_2.rg);
packed.w = XePackR16G16UNorm(pixel_3.rg);
break;
case kXenosFormat_16_16_FLOAT:
packed.x = pack_half_2x16_xe(float2_xe(pixel_0.r, pixel_0.g));
@@ -272,10 +272,10 @@ void XePack64bpp4Pixels(float4_xe pixel_0, float4_xe pixel_1,
switch (format) {
case kXenosFormat_16_16_16_16_EDRAM:
case kXenosFormat_16_16_16_16:
packed_01.xy = XePackR16G16B16A16Edram(pixel_0);
packed_01.zw = XePackR16G16B16A16Edram(pixel_1);
packed_23.xy = XePackR16G16B16A16Edram(pixel_2);
packed_23.zw = XePackR16G16B16A16Edram(pixel_3);
packed_01.xy = XePackR16G16B16A16UNorm(pixel_0);
packed_01.zw = XePackR16G16B16A16UNorm(pixel_1);
packed_23.xy = XePackR16G16B16A16UNorm(pixel_2);
packed_23.zw = XePackR16G16B16A16UNorm(pixel_3);
break;
case kXenosFormat_16_16_16_16_FLOAT:
packed_01.x = pack_half_2x16_xe(float2_xe(pixel_0.r, pixel_0.g));