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>
This commit is contained in:
parent
7ed0aaced7
commit
a9e3ddfc63
|
@ -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
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue