freedreno/a6xx: handle non-UBWC-compatible texture views
[mesa.git] / src / gallium / drivers / freedreno / a6xx / fd6_texture.c
index 608aa08833e3fcd32bd1c9793953471b3e8e92c1..2cb69e01a2ee384cfadaeb30c69b330b29719818 100644 (file)
@@ -33,6 +33,7 @@
 #include "util/hash_table.h"
 
 #include "fd6_texture.h"
+#include "fd6_resource.h"
 #include "fd6_format.h"
 #include "fd6_emit.h"
 
@@ -225,6 +226,8 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
        if (!so)
                return NULL;
 
+       fd6_validate_format(fd_context(pctx), rsc, format);
+
        if (format == PIPE_FORMAT_X32_S8X24_UINT) {
                rsc = rsc->stencil;
                format = rsc->base.format;