Mesa (master): nv30: disable rendering to 3D textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 1 20:12:27 UTC 2019


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

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Jan  1 15:06:34 2019 -0500

nv30: disable rendering to 3D textures

There's no way to tell the 3D engine about swizzling on such textures.
While rendering to NPOT ones may be possible, there's no great way to
expose that in gallium, nor would there be any practical benefit.

Fixes the non-compressed-format "copyteximage 3D" failures. Something
odd going on with the compressed formats.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nv30/nv30_screen.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index d7563f4a60..2b69a8f696 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -435,6 +435,12 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
    if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
       return false;
 
+   /* No way to render to a swizzled 3d texture. We don't necessarily know if
+    * it's swizzled or not here, but we have to assume anyways.
+    */
+   if (target == PIPE_TEXTURE_3D && (bindings & PIPE_BIND_RENDER_TARGET))
+      return false;
+
    /* shared is always supported */
    bindings &= ~PIPE_BIND_SHARED;
 




More information about the mesa-commit mailing list