summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-07-22 10:50:50 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-07-22 10:50:50 +0000
commit9130ec005fbc78a62420643414d8354d0929ca50 (patch)
tree6762777acdd2d4eee17ef87290e80dc7afe2b73d /lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c
parentca11beabae33eb59fb981b8adf50b1d47a2a98f0 (diff)
Merge Mesa 21.1.5
Diffstat (limited to 'lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c')
-rw-r--r--lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c b/lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c
index d889d4a13..a756509ce 100644
--- a/lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/lib/mesa/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -80,7 +80,6 @@ intra_surface_copy(struct svga_context *svga, struct pipe_resource *tex,
unsigned dst_x, unsigned dst_y, unsigned dst_z,
unsigned width, unsigned height, unsigned depth)
{
- enum pipe_error ret;
SVGA3dCopyBox box;
struct svga_texture *stex;
@@ -102,15 +101,8 @@ intra_surface_copy(struct svga_context *svga, struct pipe_resource *tex,
box.srcy = src_y;
box.srcz = src_z;
- ret = SVGA3D_vgpu10_IntraSurfaceCopy(svga->swc,
- stex->handle, level, layer_face, &box);
- if (ret != PIPE_OK) {
- svga_context_flush(svga, NULL);
- ret = SVGA3D_vgpu10_IntraSurfaceCopy(svga->swc,
- stex->handle, level, layer_face, &box);
- assert(ret == PIPE_OK);
- }
-
+ SVGA_RETRY(svga, SVGA3D_vgpu10_IntraSurfaceCopy(svga->swc, stex->handle,
+ level, layer_face, &box));
/* Mark the texture subresource as rendered-to. */
svga_set_texture_rendered_to(stex, layer_face, level);
}
@@ -382,7 +374,7 @@ can_blit_via_intra_surface_copy(struct svga_context *svga,
/**
- * The state tracker implements some resource copies with blits (for
+ * the gallium frontend implements some resource copies with blits (for
* GL_ARB_copy_image). This function checks if we should really do the blit
* with a VGPU10 CopyRegion command or software fallback (for incompatible
* src/dst formats).
@@ -630,11 +622,13 @@ try_blit(struct svga_context *svga, const struct pipe_blit_info *blit_info)
util_blitter_save_vertex_elements(svga->blitter, (void*)svga->curr.velems);
util_blitter_save_vertex_shader(svga->blitter, svga->curr.vs);
util_blitter_save_geometry_shader(svga->blitter, svga->curr.user_gs);
+ util_blitter_save_tessctrl_shader(svga->blitter, svga->curr.tcs);
+ util_blitter_save_tesseval_shader(svga->blitter, svga->curr.tes);
util_blitter_save_so_targets(svga->blitter, svga->num_so_targets,
(struct pipe_stream_output_target**)svga->so_targets);
util_blitter_save_rasterizer(svga->blitter, (void*)svga->curr.rast);
- util_blitter_save_viewport(svga->blitter, &svga->curr.viewport);
- util_blitter_save_scissor(svga->blitter, &svga->curr.scissor);
+ util_blitter_save_viewport(svga->blitter, &svga->curr.viewport[0]);
+ util_blitter_save_scissor(svga->blitter, &svga->curr.scissor[0]);
util_blitter_save_fragment_shader(svga->blitter, svga->curr.fs);
util_blitter_save_blend(svga->blitter, (void*)svga->curr.blend);
util_blitter_save_depth_stencil_alpha(svga->blitter,
@@ -835,7 +829,6 @@ svga_resource_copy_region(struct pipe_context *pipe,
if (dst_tex->target == PIPE_BUFFER && src_tex->target == PIPE_BUFFER) {
/* can't copy within the same buffer, unfortunately */
if (svga_have_vgpu10(svga) && src_tex != dst_tex) {
- enum pipe_error ret;
struct svga_winsys_surface *src_surf;
struct svga_winsys_surface *dst_surf;
struct svga_buffer *dbuffer = svga_buffer(dst_tex);
@@ -844,15 +837,9 @@ svga_resource_copy_region(struct pipe_context *pipe,
src_surf = svga_buffer_handle(svga, src_tex, sbuffer->bind_flags);
dst_surf = svga_buffer_handle(svga, dst_tex, dbuffer->bind_flags);
- ret = SVGA3D_vgpu10_BufferCopy(svga->swc, src_surf, dst_surf,
- src_box->x, dstx, src_box->width);
- if (ret != PIPE_OK) {
- svga_context_flush(svga, NULL);
- ret = SVGA3D_vgpu10_BufferCopy(svga->swc, src_surf, dst_surf,
- src_box->x, dstx, src_box->width);
- assert(ret == PIPE_OK);
- }
-
+ SVGA_RETRY(svga, SVGA3D_vgpu10_BufferCopy(svga->swc, src_surf,
+ dst_surf, src_box->x, dstx,
+ src_box->width));
dbuffer->dirty = TRUE;
}
else {