diff options
author | Charmaine Lee <[email protected]> | 2017-05-05 12:16:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-09-05 11:22:42 -0600 |
commit | af104ad79984c96df846ad9ac8d10b0ba67c0a36 (patch) | |
tree | c8be563048eff88866028dd0c5aefd88dcc7e8b6 /src/gallium/drivers | |
parent | e334e104d0fe8a9704a51ad897cdae34006273da (diff) |
svga: rename face to layer_face
Reviewed-by: Neha Bhende <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_blit.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index 42378605565..9ab51831492 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -77,7 +77,7 @@ build_blit_info(struct pipe_resource *dst_tex, static void intra_surface_copy(struct svga_context *svga, struct pipe_resource *tex, unsigned src_x, unsigned src_y, unsigned src_z, - unsigned level, unsigned face, + unsigned level, unsigned layer_face, unsigned dst_x, unsigned dst_y, unsigned dst_z, unsigned width, unsigned height, unsigned depth) { @@ -98,16 +98,16 @@ intra_surface_copy(struct svga_context *svga, struct pipe_resource *tex, box.srcz = src_z; ret = SVGA3D_vgpu10_IntraSurfaceCopy(svga->swc, - stex->handle, level, face, &box); + stex->handle, level, layer_face, &box); if (ret != PIPE_OK) { svga_context_flush(svga, NULL); ret = SVGA3D_vgpu10_IntraSurfaceCopy(svga->swc, - stex->handle, level, face, &box); + stex->handle, level, layer_face, &box); assert(ret == PIPE_OK); } /* Mark the texture subresource as rendered-to. */ - svga_set_texture_rendered_to(stex, face, level); + svga_set_texture_rendered_to(stex, layer_face, level); } /** @@ -116,10 +116,10 @@ intra_surface_copy(struct svga_context *svga, struct pipe_resource *tex, static void copy_region_vgpu10(struct svga_context *svga, struct pipe_resource *src_tex, unsigned src_x, unsigned src_y, unsigned src_z, - unsigned src_level, unsigned src_face, + unsigned src_level, unsigned src_layer_face, struct pipe_resource *dst_tex, unsigned dst_x, unsigned dst_y, unsigned dst_z, - unsigned dst_level, unsigned dst_face, + unsigned dst_level, unsigned dst_layer_face, unsigned width, unsigned height, unsigned depth) { enum pipe_error ret; @@ -142,8 +142,8 @@ copy_region_vgpu10(struct svga_context *svga, struct pipe_resource *src_tex, box.srcy = src_y; box.srcz = src_z; - srcSubResource = src_face * (src_tex->last_level + 1) + src_level; - dstSubResource = dst_face * (dst_tex->last_level + 1) + dst_level; + srcSubResource = src_layer_face * (src_tex->last_level + 1) + src_level; + dstSubResource = dst_layer_face * (dst_tex->last_level + 1) + dst_level; ret = SVGA3D_vgpu10_PredCopyRegion(svga->swc, dtex->handle, dstSubResource, @@ -157,10 +157,10 @@ copy_region_vgpu10(struct svga_context *svga, struct pipe_resource *src_tex, } /* Mark the texture subresource as defined. */ - svga_define_texture_level(dtex, dst_face, dst_level); + svga_define_texture_level(dtex, dst_layer_face, dst_level); /* Mark the texture subresource as rendered-to. */ - svga_set_texture_rendered_to(dtex, dst_face, dst_level); + svga_set_texture_rendered_to(dtex, dst_layer_face, dst_level); } @@ -184,8 +184,11 @@ copy_region_fallback(struct svga_context *svga, } +/** + * Whether the layer_face index is given by the Z coordinate. + */ static bool -has_face_index_in_z(enum pipe_texture_target target) +has_layer_face_index_in_z(enum pipe_texture_target target) { if (target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_2D_ARRAY || @@ -373,7 +376,7 @@ can_blit_via_intra_surface_copy(struct svga_context *svga, if (blit_info->src.level != blit_info->dst.level) return false; - if (has_face_index_in_z(blit_info->src.resource->target)){ + if (has_layer_face_index_in_z(blit_info->src.resource->target)){ if (blit_info->src.box.z != blit_info->dst.box.z) return false; } @@ -485,16 +488,16 @@ static bool try_copy_region(struct svga_context *svga, const struct pipe_blit_info *blit) { - unsigned src_face, src_z, dst_face, dst_z; + unsigned src_layer_face, src_z, dst_layer_face, dst_z; if (!can_blit_via_svga_copy_region(svga, blit)) return false; adjust_z_layer(blit->src.resource->target, blit->src.box.z, - &src_face, &src_z); + &src_layer_face, &src_z); adjust_z_layer(blit->dst.resource->target, blit->dst.box.z, - &dst_face, &dst_z); + &dst_layer_face, &dst_z); if (can_blit_via_copy_region_vgpu10(svga, blit)) { svga_toggle_render_condition(svga, blit->render_condition_enable, FALSE); @@ -502,10 +505,10 @@ try_copy_region(struct svga_context *svga, copy_region_vgpu10(svga, blit->src.resource, blit->src.box.x, blit->src.box.y, src_z, - blit->src.level, src_face, + blit->src.level, src_layer_face, blit->dst.resource, blit->dst.box.x, blit->dst.box.y, dst_z, - blit->dst.level, dst_face, + blit->dst.level, dst_layer_face, blit->src.box.width, blit->src.box.height, blit->src.box.depth); @@ -523,15 +526,15 @@ try_copy_region(struct svga_context *svga, svga_texture_copy_handle(svga, stex->handle, blit->src.box.x, blit->src.box.y, src_z, - blit->src.level, src_face, + blit->src.level, src_layer_face, dtex->handle, blit->dst.box.x, blit->dst.box.y, dst_z, - blit->dst.level, dst_face, + blit->dst.level, dst_layer_face, blit->src.box.width, blit->src.box.height, blit->src.box.depth); - svga_define_texture_level(dtex, dst_face, blit->dst.level); - svga_set_texture_rendered_to(dtex, dst_face, blit->dst.level); + svga_define_texture_level(dtex, dst_layer_face, blit->dst.level); + svga_set_texture_rendered_to(dtex, dst_layer_face, blit->dst.level); return true; } @@ -539,7 +542,7 @@ try_copy_region(struct svga_context *svga, intra_surface_copy(svga, blit->src.resource, blit->src.box.x, blit->src.box.y, src_z, - blit->src.level, src_face, + blit->src.level, src_layer_face, blit->dst.box.x, blit->dst.box.y, dst_z, blit->src.box.width, blit->src.box.height, blit->src.box.depth); |