mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
r600: fallback to util_blitter_draw_rectangle when required
This is the backport of dc293ffe50 ("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>
This commit is contained in:
parent
9b95e4181e
commit
4d17f8d10a
1 changed files with 15 additions and 2 deletions
|
|
@ -115,13 +115,26 @@ void r600_draw_rectangle(struct blitter_context *blitter,
|
|||
enum blitter_attrib_type type,
|
||||
const struct 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