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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user