summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-03-28 19:03:47 +0100
committerErik Faye-Lund <[email protected]>2019-04-02 07:48:46 +0000
commit4f153fcd5cee9d3ffeb45488a0ea83e0a2ff5658 (patch)
tree57c873ce1379e1c6de0cda6b59f7cecbf92ab9b3 /src/gallium/drivers
parentf53001324f0745c561f55cbabf5b32f63a4617e1 (diff)
virgl: stricter usage of compressed 3d textures
Using RGTC, ETC1, ETC2 or S3TC for 3D-textures isn't alowed by any of OpenGL 4.6, OpenGL ES 3.2, ARB_texture_compression_rgtc, EXT_texture_compression_rgtc, OES_compressed_ETC1_RGB8_texture, S3_s3tc or EXT_texture_compression_s3tc specifications. So let's not allow any of those compressed 3d-textures at all. It's not going to work once it hits the OpenGL driver in virglrenderer. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index e2b2712d942..651b73b0eb0 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -625,6 +625,12 @@ virgl_is_format_supported( struct pipe_screen *screen,
target != PIPE_BUFFER)
return FALSE;
+ if ((format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC ||
+ format_desc->layout == UTIL_FORMAT_LAYOUT_ETC ||
+ format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) &&
+ target == PIPE_TEXTURE_3D)
+ return FALSE;
+
if (bind & PIPE_BIND_RENDER_TARGET) {
/* For ARB_framebuffer_no_attachments. */
if (format == PIPE_FORMAT_NONE)