Mesa (master): iris: Increase use of pipe_resources in iris_blit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 7 23:08:46 UTC 2021


Module: Mesa
Branch: master
Commit: 776074d66c88d3c2a6fc8e6b37286e8a4a61aae5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=776074d66c88d3c2a6fc8e6b37286e8a4a61aae5

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Mon Jan  4 09:55:02 2021 -0800

iris: Increase use of pipe_resources in iris_blit

Allows the affected code to avoid being moved into a while loop later
on.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8340>

---

 src/gallium/drivers/iris/iris_blit.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c
index e3c12f0c6c0..057b41f7147 100644
--- a/src/gallium/drivers/iris/iris_blit.c
+++ b/src/gallium/drivers/iris/iris_blit.c
@@ -436,7 +436,8 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
 
    if (abs(info->dst.box.width) == abs(info->src.box.width) &&
        abs(info->dst.box.height) == abs(info->src.box.height)) {
-      if (src_surf.surf->samples > 1 && dst_surf.surf->samples <= 1) {
+      if (info->src.resource->nr_samples > 1 &&
+          info->dst.resource->nr_samples <= 1) {
          /* The OpenGL ES 3.2 specification, section 16.2.1, says:
           *
           *    "If the read framebuffer is multisampled (its effective
@@ -501,7 +502,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
     * add the 0.5 offset ourselves here.
     */
    float depth_center_offset = 0;
-   if (src_res->surf.dim == ISL_SURF_DIM_3D)
+   if (info->src.resource->target == PIPE_TEXTURE_3D)
       depth_center_offset = 0.5 / info->dst.box.depth * info->src.box.depth;
 
    if (info->mask & main_mask) {



More information about the mesa-commit mailing list