d3d12: Don't multiply cube array sizes by 6

Gallium already does this for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19357>
This commit is contained in:
Jesse Natalie
2022-10-27 12:49:04 -07:00
committed by Marge Bot
parent e2934435f8
commit 7118b2136e
3 changed files with 3 additions and 22 deletions

View File

@@ -120,7 +120,6 @@ spec/!opengl 1.1/draw-pixels samples=32: skip
spec/!opengl 1.1/draw-pixels samples=4: skip
spec/!opengl 1.1/draw-pixels samples=6: skip
spec/!opengl 1.1/draw-pixels samples=8: skip
spec/!opengl 1.1/getteximage-depth/gl_texture_cube_map-gl_stencil_index8: fail
spec/!opengl 1.1/linestipple/factor 2x: fail
spec/!opengl 1.1/linestipple/factor 3x: fail
spec/!opengl 1.1/linestipple/line loop: fail
@@ -3520,8 +3519,8 @@ wgl/wgl-sanity: skip
summary:
name: results
---- --------
pass: 17864
fail: 2044
pass: 17865
fail: 2043
crash: 11
skip: 1445
timeout: 0

View File

@@ -281,12 +281,6 @@ copy_subregion_no_barriers(struct d3d12_context *ctx,
int src_array_size = src->base.b.array_size;
int dst_array_size = dst->base.b.array_size;
if (dst->base.b.target == PIPE_TEXTURE_CUBE)
dst_array_size *= 6;
if (src->base.b.target == PIPE_TEXTURE_CUBE)
src_array_size *= 6;
int stencil_src_res_offset = 1;
int stencil_dst_res_offset = 1;

View File

@@ -222,8 +222,6 @@ init_texture(struct d3d12_screen *screen,
case PIPE_TEXTURE_CUBE:
case PIPE_TEXTURE_CUBE_ARRAY:
desc.DepthOrArraySize *= 6;
FALLTHROUGH;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_RECT:
@@ -990,17 +988,7 @@ unsigned int
get_subresource_id(struct d3d12_resource *res, unsigned resid,
unsigned z, unsigned base_level)
{
unsigned resource_stride = res->base.b.last_level + 1;
if (res->base.b.target == PIPE_TEXTURE_1D_ARRAY ||
res->base.b.target == PIPE_TEXTURE_2D_ARRAY)
resource_stride *= res->base.b.array_size;
if (res->base.b.target == PIPE_TEXTURE_CUBE)
resource_stride *= 6;
if (res->base.b.target == PIPE_TEXTURE_CUBE_ARRAY)
resource_stride *= 6 * res->base.b.array_size;
unsigned resource_stride = (res->base.b.last_level + 1) * res->base.b.array_size;
unsigned layer_stride = res->base.b.last_level + 1;
return resid * resource_stride + z * layer_stride +