Module: Mesa Branch: main Commit: a9e3ddfc63209a1b401e9de4a9de791789040f71 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9e3ddfc63209a1b401e9de4a9de791789040f71
Author: Emma Anholt <[email protected]> Date: Tue Jun 22 13:31:22 2021 -0700 i915g: Fix GL_ARB_copy_buffer assertion fails. The i915_texture() asserts that the resource is not a buffer, so check for the buffer fallback first. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11540> --- src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt | 12 ------------ src/gallium/drivers/i915/i915_surface.c | 12 ++++++------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt index 557c6b191b4..8b2c8413ffe 100644 --- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt @@ -329,14 +329,6 @@ spec@arb_color_buffer_float@gl_rgba8_snorm-render,Crash spec@arb_color_buffer_float@gl_rgba8_snorm-render-fog,Crash spec@arb_color_buffer_float@gl_rgba8_snorm-render-sanity,Crash spec@arb_color_buffer_float@gl_rgba8_snorm-render-sanity-fog,Crash -spec@arb_copy_buffer@copy_buffer_coherency,Crash -spec@arb_copy_buffer@copybuffersubdata,Crash -spec@arb_copy_buffer@data-sync,Crash -spec@arb_copy_buffer@dlist,Crash -spec@arb_copy_buffer@intra-buffer-copy,Crash -spec@arb_copy_buffer@overlap,Crash -spec@arb_copy_buffer@subdata-sync,Crash -spec@arb_copy_buffer@targets,Crash spec@arb_depth_texture@depth-level-clamp,Fail spec@arb_depth_texture@fbo-clear-formats,Fail spec@arb_depth_texture@fbo-clear-formats@GL_DEPTH_COMPONENT,Fail @@ -388,10 +380,6 @@ spec@arb_framebuffer_object@framebuffer-blit-levels draw stencil,Fail spec@arb_framebuffer_object@framebuffer-blit-levels read stencil,Fail spec@arb_framebuffer_object@same-attachment-glframebuffertexture2d-gl_depth_stencil_attachment,Fail spec@arb_internalformat_query2@all internalformat_<x>_type pname checks,Timeout -spec@arb_map_buffer_range@copybuffersubdata decrement-offset,Crash -spec@arb_map_buffer_range@copybuffersubdata increment-offset,Crash -spec@arb_map_buffer_range@copybuffersubdata offset=0,Crash -spec@arb_map_buffer_range@map_buffer_range_test,Crash spec@arb_occlusion_query2@render,Fail spec@arb_occlusion_query@occlusion_query,Fail spec@arb_occlusion_query@occlusion_query_conform,Fail diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c index e43284fa36f..f642c151c47 100644 --- a/src/gallium/drivers/i915/i915_surface.c +++ b/src/gallium/drivers/i915/i915_surface.c @@ -207,12 +207,6 @@ i915_surface_copy_blitter(struct pipe_context *pipe, struct pipe_resource *src, unsigned src_level, const struct pipe_box *src_box) { - struct i915_texture *dst_tex = i915_texture(dst); - struct i915_texture *src_tex = i915_texture(src); - struct pipe_resource *dpt = &dst_tex->b; - struct pipe_resource *spt = &src_tex->b; - unsigned dst_offset, src_offset; /* in bytes */ - /* Fallback for buffers. */ if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) { util_resource_copy_region(pipe, dst, dst_level, dstx, dsty, dstz, @@ -220,6 +214,12 @@ i915_surface_copy_blitter(struct pipe_context *pipe, return; } + struct i915_texture *dst_tex = i915_texture(dst); + struct i915_texture *src_tex = i915_texture(src); + struct pipe_resource *dpt = &dst_tex->b; + struct pipe_resource *spt = &src_tex->b; + unsigned dst_offset, src_offset; /* in bytes */ + /* XXX cannot copy 3d regions at this time */ assert(src_box->depth == 1); if (dst->target != PIPE_TEXTURE_CUBE && _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
