vc4: Decide the HW's format before laying out the miptree.
I'm experimenting with a workaround for raster texture misrendering on hardware, and this lets me look at the format chosen when computing strides.
This commit is contained in:
@@ -373,14 +373,14 @@ vc4_resource_create(struct pipe_screen *pscreen,
|
|||||||
rsc->tiled = true;
|
rsc->tiled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tmpl->target != PIPE_BUFFER)
|
||||||
|
rsc->vc4_format = get_resource_texture_format(prsc);
|
||||||
|
|
||||||
vc4_setup_slices(rsc);
|
vc4_setup_slices(rsc);
|
||||||
vc4_resource_bo_alloc(rsc);
|
vc4_resource_bo_alloc(rsc);
|
||||||
if (!rsc->bo)
|
if (!rsc->bo)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (tmpl->target != PIPE_BUFFER)
|
|
||||||
rsc->vc4_format = get_resource_texture_format(prsc);
|
|
||||||
|
|
||||||
return prsc;
|
return prsc;
|
||||||
fail:
|
fail:
|
||||||
vc4_resource_destroy(pscreen, prsc);
|
vc4_resource_destroy(pscreen, prsc);
|
||||||
|
Reference in New Issue
Block a user