mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
r600: fix pa_su_vtx_cntl rounding mode
This is the backport of9c49550163. This rounding functionality is available on all the gpus of the r600 family. This change was tested on rv770, palm and cayman. This change fixes at least the "turn-on-off" tests on all these gpus and it does not add any regression. Here are the tests fixed on palm: spec/ext_framebuffer_multisample/interpolation 6 centroid-edges: fail pass spec/ext_framebuffer_multisample/interpolation 8 centroid-edges: fail pass spec/ext_framebuffer_multisample/turn-on-off 2: fail pass spec/ext_framebuffer_multisample/turn-on-off 4: fail pass spec/ext_framebuffer_multisample/turn-on-off 6: fail pass spec/ext_framebuffer_multisample/turn-on-off 8: fail pass Cc: mesa-stable Signed-off-by: Patrick Lerda <patrick9876@free.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403> (cherry picked from commit8fc01db1ac)
This commit is contained in:
parent
17a744e8e1
commit
76c1b49b18
7 changed files with 16 additions and 13 deletions
|
|
@ -1004,7 +1004,7 @@
|
|||
"description": "r600: fix pa_su_vtx_cntl rounding mode",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -825,10 +825,6 @@ spec@ext_framebuffer_multisample@no-color 8 depth-computed combined,Fail
|
|||
spec@ext_framebuffer_multisample@no-color 8 depth-computed single,Fail
|
||||
spec@ext_framebuffer_multisample@no-color 8 stencil combined,Fail
|
||||
spec@ext_framebuffer_multisample@no-color 8 stencil single,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 2,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 4,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 6,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 8,Fail
|
||||
|
||||
spec@ext_framebuffer_object@fbo-blending-formats,Fail
|
||||
spec@ext_framebuffer_object@fbo-blending-formats@3,Fail
|
||||
|
|
|
|||
|
|
@ -1277,14 +1277,6 @@ spec@ext_framebuffer_multisample@accuracy all_samples stencil_resolve small dept
|
|||
|
||||
spec@ext_framebuffer_multisample@blit-mismatched-formats,Fail
|
||||
|
||||
spec@ext_framebuffer_multisample@interpolation 6 centroid-edges,Fail
|
||||
spec@ext_framebuffer_multisample@interpolation 8 centroid-edges,Fail
|
||||
|
||||
spec@ext_framebuffer_multisample@turn-on-off 2,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 4,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 6,Fail
|
||||
spec@ext_framebuffer_multisample@turn-on-off 8,Fail
|
||||
|
||||
spec@ext_framebuffer_object@fbo-blending-formats,Fail
|
||||
spec@ext_framebuffer_object@fbo-blending-formats@3,Fail
|
||||
spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB,Fail
|
||||
|
|
|
|||
|
|
@ -552,10 +552,12 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
|
|||
if (rctx->b.gfx_level == CAYMAN) {
|
||||
r600_store_context_reg(&rs->buffer, CM_R_028BE4_PA_SU_VTX_CNTL,
|
||||
S_028C08_PIX_CENTER_HALF(state->half_pixel_center) |
|
||||
S_028C08_ROUND_MODE(V_028C08_X_ROUND_TO_EVEN) |
|
||||
S_028C08_QUANT_MODE(V_028C08_X_1_256TH));
|
||||
} else {
|
||||
r600_store_context_reg(&rs->buffer, R_028C08_PA_SU_VTX_CNTL,
|
||||
S_028C08_PIX_CENTER_HALF(state->half_pixel_center) |
|
||||
S_028C08_ROUND_MODE(V_028C08_X_ROUND_TO_EVEN) |
|
||||
S_028C08_QUANT_MODE(V_028C08_X_1_256TH));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2402,6 +2402,12 @@
|
|||
#define S_028C08_PIX_CENTER_HALF(x) (((unsigned)(x) & 0x1) << 0)
|
||||
#define G_028C08_PIX_CENTER_HALF(x) (((x) >> 0) & 0x1)
|
||||
#define C_028C08_PIX_CENTER_HALF 0xFFFFFFFE
|
||||
#define S_028C08_ROUND_MODE(x) (((unsigned)(x) & 0x03) << 1)
|
||||
#define G_028C08_ROUND_MODE(x) (((x) >> 1) & 0x03)
|
||||
#define V_028C08_X_TRUNCATE 0x00
|
||||
#define V_028C08_X_ROUND 0x01
|
||||
#define V_028C08_X_ROUND_TO_EVEN 0x02
|
||||
#define V_028C08_X_ROUND_TO_ODD 0x03
|
||||
#define S_028C08_QUANT_MODE(x) (((unsigned)(x) & 0x7) << 3)
|
||||
#define G_028C08_QUANT_MODE(x) (((x) >> 3) & 0x7)
|
||||
#define C_028C08_QUANT_MODE 0xFFFFFFC7
|
||||
|
|
|
|||
|
|
@ -539,6 +539,7 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
|
|||
r600_store_context_reg(&rs->buffer, R_028A4C_PA_SC_MODE_CNTL, sc_mode_cntl);
|
||||
r600_store_context_reg(&rs->buffer, R_028C08_PA_SU_VTX_CNTL,
|
||||
S_028C08_PIX_CENTER_HALF(state->half_pixel_center) |
|
||||
S_028C08_ROUND_MODE(V_028C08_X_ROUND_TO_EVEN) |
|
||||
S_028C08_QUANT_MODE(V_028C08_X_1_256TH));
|
||||
r600_store_context_reg(&rs->buffer, R_028DFC_PA_SU_POLY_OFFSET_CLAMP, fui(state->offset_clamp));
|
||||
|
||||
|
|
|
|||
|
|
@ -2279,6 +2279,12 @@
|
|||
#define S_028C08_PIX_CENTER_HALF(x) (((unsigned)(x) & 0x1) << 0)
|
||||
#define G_028C08_PIX_CENTER_HALF(x) (((x) >> 0) & 0x1)
|
||||
#define C_028C08_PIX_CENTER_HALF 0xFFFFFFFE
|
||||
#define S_028C08_ROUND_MODE(x) (((unsigned)(x) & 0x03) << 1)
|
||||
#define G_028C08_ROUND_MODE(x) (((x) >> 1) & 0x03)
|
||||
#define V_028C08_X_TRUNCATE 0x00
|
||||
#define V_028C08_X_ROUND 0x01
|
||||
#define V_028C08_X_ROUND_TO_EVEN 0x02
|
||||
#define V_028C08_X_ROUND_TO_ODD 0x03
|
||||
#define S_028C08_QUANT_MODE(x) (((unsigned)(x) & 0x7) << 3)
|
||||
#define G_028C08_QUANT_MODE(x) (((x) >> 3) & 0x7)
|
||||
#define C_028C08_QUANT_MODE 0xFFFFFFC7
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue