mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
amd: improve RB+ blending precision
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041>
This commit is contained in:
parent
a9e9c4650d
commit
2fc03e479b
2 changed files with 8 additions and 8 deletions
|
|
@ -1717,21 +1717,21 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
case V_028C70_COLOR_5_6_5:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_5_6_5 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_6BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_6BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case V_028C70_COLOR_1_5_5_5:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_1_5_5_5 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_5BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_5BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case V_028C70_COLOR_4_4_4_4:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_4_4_4_4 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_4BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_4BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1764,7 +1764,7 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
case V_028C70_COLOR_2_10_10_10:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_2_10_10_10 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_10BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_10BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
case V_028C70_COLOR_5_9_9_9:
|
||||
|
|
|
|||
|
|
@ -201,21 +201,21 @@ static void si_emit_cb_render_state(struct si_context *sctx)
|
|||
case V_028C70_COLOR_5_6_5:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_5_6_5 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_6BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_6BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case V_028C70_COLOR_1_5_5_5:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_1_5_5_5 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_5BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_5BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case V_028C70_COLOR_4_4_4_4:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_4_4_4_4 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_4BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_4BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ static void si_emit_cb_render_state(struct si_context *sctx)
|
|||
case V_028C70_COLOR_10_10_10_2:
|
||||
if (spi_format == V_028714_SPI_SHADER_FP16_ABGR) {
|
||||
sx_ps_downconvert |= V_028754_SX_RT_EXPORT_2_10_10_10 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_10BIT_FORMAT_0_75 << (i * 4);
|
||||
sx_blend_opt_epsilon |= V_028758_10BIT_FORMAT_0_5 << (i * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue