summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-10-25 12:51:04 -0700
committerEric Anholt <[email protected]>2017-10-30 13:31:27 -0700
commitfe6fc579cbdc040a9bd62170c3713546dd112ae5 (patch)
tree19b5e796d6bf80f580ff7c7efd00d0fc12f7538b /src
parent0ec4b4178f5df2353e97eb6e414040a46bfc728d (diff)
broadcom/vc5: Use the sampler view's format, not the resource's.
This should help with texture views, though I just noticed this while reading the code.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc5/vc5_resource.c5
-rw-r--r--src/gallium/drivers/vc5/vc5_resource.h2
-rw-r--r--src/gallium/drivers/vc5/vc5_state.c2
3 files changed, 1 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c
index e1ed46039a1..29623d9ba2c 100644
--- a/src/gallium/drivers/vc5/vc5_resource.c
+++ b/src/gallium/drivers/vc5/vc5_resource.c
@@ -574,9 +574,6 @@ vc5_resource_create_with_modifiers(struct pipe_screen *pscreen,
return NULL;
}
- if (tmpl->target != PIPE_BUFFER)
- rsc->tex_format = vc5_get_tex_format(prsc->format);
-
vc5_setup_slices(rsc, "create");
if (!vc5_resource_bo_alloc(rsc))
goto fail;
@@ -649,8 +646,6 @@ vc5_resource_from_handle(struct pipe_screen *pscreen,
vc5_setup_slices(rsc, "import");
- rsc->tex_format = vc5_get_tex_format(prsc->format);
-
DBG(V3D_DEBUG_SURFACE,
"rsc import %p (format %s), %dx%d: "
"level 0 (R) -> stride %d@0x%08x\n",
diff --git a/src/gallium/drivers/vc5/vc5_resource.h b/src/gallium/drivers/vc5/vc5_resource.h
index e65cb8c8fee..7d473679ebe 100644
--- a/src/gallium/drivers/vc5/vc5_resource.h
+++ b/src/gallium/drivers/vc5/vc5_resource.h
@@ -109,8 +109,6 @@ struct vc5_resource {
uint32_t cube_map_stride;
int cpp;
bool tiled;
- /** One of V3D_TEXTURE_DATA_FORMAT_* */
- uint8_t tex_format;
/**
* Number of times the resource has been written to.
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c
index 817b6247d58..1f05576c18b 100644
--- a/src/gallium/drivers/vc5/vc5_state.c
+++ b/src/gallium/drivers/vc5/vc5_state.c
@@ -571,7 +571,7 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
.image_height = prsc->height0 * msaa_scale,
.image_depth = prsc->depth0,
- .texture_type = rsc->tex_format,
+ .texture_type = vc5_get_tex_format(cso->format),
.srgb = util_format_is_srgb(cso->format),
.base_level = cso->u.tex.first_level,