vrend: specify destination z in resource copy fallback path

We don't always start at a z-offset of zero. For example, when
Gallium copies a temporary depth texture to the final depth texture
[i.e, the one finalized in st_finalize_texture(..)], it sends the
copy commands one slice at a time.

Fixes:
dEQP-GLES3.functional.texture.specification.teximage3d_depth.depth_component32f_2d_array
dEQP-GLES3.functional.texture.specification.teximage3d_depth.depth_component24_2d_array
macos/master
Gurchetan Singh 7 years ago committed by Dave Airlie
parent b75e0a1dab
commit be996c7dde
  1. 2
      src/vrend_renderer.c

@ -5756,7 +5756,7 @@ static void vrend_resource_copy_fallback(struct vrend_context *ctx,
} else if (ctarget == GL_TEXTURE_3D || } else if (ctarget == GL_TEXTURE_3D ||
ctarget == GL_TEXTURE_2D_ARRAY || ctarget == GL_TEXTURE_2D_ARRAY ||
ctarget == GL_TEXTURE_CUBE_MAP_ARRAY) { ctarget == GL_TEXTURE_CUBE_MAP_ARRAY) {
glTexSubImage3D(ctarget, dst_level, dstx, dsty, 0,src_box->width, src_box->height, src_box->depth, glformat, gltype, tptr + slice_offset); glTexSubImage3D(ctarget, dst_level, dstx, dsty, dstz, src_box->width, src_box->height, src_box->depth, glformat, gltype, tptr + slice_offset);
} else { } else {
glTexSubImage2D(ctarget, dst_level, dstx, dsty, src_box->width, src_box->height, glformat, gltype, tptr + slice_offset); glTexSubImage2D(ctarget, dst_level, dstx, dsty, src_box->width, src_box->height, glformat, gltype, tptr + slice_offset);
} }

Loading…
Cancel
Save