mirror of
https://github.com/izzy2lost/xenia-edge.git
synced 2026-07-06 00:20:26 -07:00
[GPU] Only apply exp_bias to RGB not alpha for k_2_10_10_10_FLOAT
k_2_10_10_10_FLOAT has 7e3 float RGB but 2-bit fixed-point alpha [0, 1], exp_bias (exponent adjustment) should only apply to the floating-point RGB, not the fixed-point alpha
This commit is contained in:
+505
-482
File diff suppressed because it is too large
Load Diff
+491
-479
File diff suppressed because it is too large
Load Diff
+1298
-1256
File diff suppressed because it is too large
Load Diff
+1377
-1335
File diff suppressed because it is too large
Load Diff
+1560
-1533
File diff suppressed because it is too large
Load Diff
+801
-782
File diff suppressed because it is too large
Load Diff
+1118
-1092
File diff suppressed because it is too large
Load Diff
+1130
-1107
File diff suppressed because it is too large
Load Diff
+1240
-1178
File diff suppressed because it is too large
Load Diff
+1286
-1224
File diff suppressed because it is too large
Load Diff
+2375
-2277
File diff suppressed because it is too large
Load Diff
+2427
-2329
File diff suppressed because it is too large
Load Diff
+2371
-2273
File diff suppressed because it is too large
Load Diff
+2418
-2320
File diff suppressed because it is too large
Load Diff
+2194
-2096
File diff suppressed because it is too large
Load Diff
+2280
-2183
File diff suppressed because it is too large
Load Diff
@@ -613,8 +613,18 @@ uint XeResolveEdramPixelStrideInts(XeResolveInfo resolve_info) {
|
||||
pixel_1 += msaa_resolve_pixel_1;
|
||||
}
|
||||
}
|
||||
pixel_0 *= exp_bias;
|
||||
pixel_1 *= exp_bias;
|
||||
// For k_2_10_10_10_FLOAT, only apply exp_bias to RGB (7e3 float), not
|
||||
// alpha (2-bit fixed-point [0, 1]).
|
||||
dont_flatten_xe if (resolve_info.edram_format ==
|
||||
kXenosColorRenderTargetFormat_2_10_10_10_FLOAT ||
|
||||
resolve_info.edram_format ==
|
||||
kXenosColorRenderTargetFormat_2_10_10_10_FLOAT_AS_16_16_16_16) {
|
||||
pixel_0.xyz *= exp_bias;
|
||||
pixel_1.xyz *= exp_bias;
|
||||
} else {
|
||||
pixel_0 *= exp_bias;
|
||||
pixel_1 *= exp_bias;
|
||||
}
|
||||
dont_flatten_xe if (resolve_info.dest_swap) {
|
||||
pixel_0 = pixel_0.bgra;
|
||||
pixel_1 = pixel_1.bgra;
|
||||
@@ -682,10 +692,22 @@ uint XeResolveEdramPixelStrideInts(XeResolveInfo resolve_info) {
|
||||
pixel_3 += msaa_resolve_pixel_3;
|
||||
}
|
||||
}
|
||||
pixel_0 *= exp_bias;
|
||||
pixel_1 *= exp_bias;
|
||||
pixel_2 *= exp_bias;
|
||||
pixel_3 *= exp_bias;
|
||||
// For k_2_10_10_10_FLOAT, only apply exp_bias to RGB (7e3 float), not
|
||||
// alpha (2-bit fixed-point [0, 1]).
|
||||
dont_flatten_xe if (resolve_info.edram_format ==
|
||||
kXenosColorRenderTargetFormat_2_10_10_10_FLOAT ||
|
||||
resolve_info.edram_format ==
|
||||
kXenosColorRenderTargetFormat_2_10_10_10_FLOAT_AS_16_16_16_16) {
|
||||
pixel_0.xyz *= exp_bias;
|
||||
pixel_1.xyz *= exp_bias;
|
||||
pixel_2.xyz *= exp_bias;
|
||||
pixel_3.xyz *= exp_bias;
|
||||
} else {
|
||||
pixel_0 *= exp_bias;
|
||||
pixel_1 *= exp_bias;
|
||||
pixel_2 *= exp_bias;
|
||||
pixel_3 *= exp_bias;
|
||||
}
|
||||
dont_flatten_xe if (resolve_info.dest_swap) {
|
||||
pixel_0 = pixel_0.bgra;
|
||||
pixel_1 = pixel_1.bgra;
|
||||
|
||||
Reference in New Issue
Block a user