freedreno/ir3+a6xx: same VBO state for draw/binning
[mesa.git] / src / gallium / drivers / freedreno / a6xx / fd6_texture.c
index 80eb9906ebea393b8566dab053d0276c23fc6abf..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;
@@ -396,6 +399,7 @@ fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type,
                needs_border |= sampler->needs_border;
        }
 
+       key.type = type;
        key.bcolor_offset = fd6_border_color_offset(ctx, type, tex);
 
        uint32_t hash = key_hash(&key);