Discussion:
[PATCH] radeonsi: don't enable surf index on shareable images.
(too old to reply)
Dave Airlie
2017-08-11 04:35:04 UTC
Permalink
Raw Message
From: Dave Airlie <***@redhat.com>

This fixes the SteamVR menus, which were broken by this feature.

Signed-off-by: Dave Airlie <***@redhat.com>
---
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
index 99e4d77..2cbff58 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
@@ -97,12 +97,15 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
* always use consecutive surface indices when FMASK is allocated between
* them.
*/
- if (flags & RADEON_SURF_FMASK)
- config.info.surf_index = &ws->surf_index_fmask;
- else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
- config.info.surf_index = &ws->surf_index_color;
- else
- config.info.surf_index = NULL;
+ if (!(flags & RADEON_SURF_SHAREABLE)) {
+ if (flags & RADEON_SURF_FMASK)
+ config.info.surf_index = &ws->surf_index_fmask;
+ else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
+ config.info.surf_index = &ws->surf_index_color;
+ else
+ config.info.surf_index = NULL;
+ } else
+ config.info.surf_index = NULL;

return ac_compute_surface(ws->addrlib, &ws->info, &config, mode, surf);
}
--
2.9.4
Marek Olšák
2017-08-11 18:18:39 UTC
Permalink
Raw Message
Post by Dave Airlie
This fixes the SteamVR menus, which were broken by this feature.
That's impossible. RADEON_SURF_SHAREABLE is already checked by
ac_surface.c. This patch is a no-op change.

Marek
Post by Dave Airlie
---
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
index 99e4d77..2cbff58 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
@@ -97,12 +97,15 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
* always use consecutive surface indices when FMASK is allocated between
* them.
*/
- if (flags & RADEON_SURF_FMASK)
- config.info.surf_index = &ws->surf_index_fmask;
- else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
- config.info.surf_index = &ws->surf_index_color;
- else
- config.info.surf_index = NULL;
+ if (!(flags & RADEON_SURF_SHAREABLE)) {
+ if (flags & RADEON_SURF_FMASK)
+ config.info.surf_index = &ws->surf_index_fmask;
+ else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
+ config.info.surf_index = &ws->surf_index_color;
+ else
+ config.info.surf_index = NULL;
+ } else
+ config.info.surf_index = NULL;
return ac_compute_surface(ws->addrlib, &ws->info, &config, mode, surf);
}
--
2.9.4
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Loading...