mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
freedreno/a6xx: set chroma offsets to MIDPOINT
Vulkan has VkChromaLocation and all drivers suggest VK_CHROMA_LOCATION_MIDPOINT on Android. The blob also uses MIDPOINT. Based on my limited tests, the image quality is higher with MIDPOINT. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19514>
This commit is contained in:
parent
cbf68450f8
commit
10b0a5dc34
1 changed files with 6 additions and 0 deletions
|
|
@ -429,6 +429,12 @@ fd6_sampler_view_update(struct fd_context *ctx,
|
|||
.chroma_offsets = {FDL_CHROMA_LOCATION_COSITED_EVEN,
|
||||
FDL_CHROMA_LOCATION_COSITED_EVEN},
|
||||
};
|
||||
|
||||
if (rsc->b.b.format == PIPE_FORMAT_R8_G8B8_420_UNORM) {
|
||||
args.chroma_offsets[0] = FDL_CHROMA_LOCATION_MIDPOINT;
|
||||
args.chroma_offsets[1] = FDL_CHROMA_LOCATION_MIDPOINT;
|
||||
}
|
||||
|
||||
struct fd_resource *plane1 = fd_resource(rsc->b.b.next);
|
||||
struct fd_resource *plane2 =
|
||||
plane1 ? fd_resource(plane1->b.b.next) : NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue