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.
This commit is contained in:
parent
0ec4b4178f
commit
fe6fc579cb
|
@ -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",
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue