mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 23:50:11 +01:00
r600: fallback to util_blitter_draw_rectangle when required
This is the backport ofdc293ffe50("radeonsi: fallback to util_blitter_draw_rectangle"). This change was tested on rv770, palm and cayman. Here is the test fixed: spec/ext_framebuffer_blit/fbo-blit-check-limits: 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 commit4d17f8d10a)
This commit is contained in:
parent
7e787e683a
commit
17a744e8e1
2 changed files with 16 additions and 3 deletions
|
|
@ -1014,7 +1014,7 @@
|
|||
"description": "r600: fallback to util_blitter_draw_rectangle when required",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -115,13 +115,26 @@ void r600_draw_rectangle(struct blitter_context *blitter,
|
|||
enum blitter_attrib_type type,
|
||||
const union blitter_attrib *attrib)
|
||||
{
|
||||
struct r600_common_context *rctx =
|
||||
(struct r600_common_context*)util_blitter_get_pipe(blitter);
|
||||
struct r600_context *cctx =
|
||||
(struct r600_context*)util_blitter_get_pipe(blitter);
|
||||
struct r600_common_context *rctx = &cctx->b;
|
||||
struct pipe_viewport_state viewport;
|
||||
struct pipe_resource *buf = NULL;
|
||||
unsigned offset = 0;
|
||||
float *vb;
|
||||
|
||||
if (unlikely(MAX2(abs(x1), abs(x2)) > INT16_MAX ||
|
||||
MAX2(abs(y1), abs(y2)) > INT16_MAX)) {
|
||||
/* Fallback when coordinates can't fit in int16. */
|
||||
util_blitter_save_vertex_elements(cctx->blitter,
|
||||
cctx->vertex_fetch_shader.cso);
|
||||
util_blitter_draw_rectangle(blitter, vertex_elements_cso, get_vs,
|
||||
x1, y1, x2, y2,
|
||||
depth, num_instances,
|
||||
type, attrib);
|
||||
return;
|
||||
}
|
||||
|
||||
rctx->b.bind_vertex_elements_state(&rctx->b, vertex_elements_cso);
|
||||
rctx->b.bind_vs_state(&rctx->b, get_vs(blitter));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue