st/mesa: Add NV12 lowering to PIPE_FORMAT_R8_G8B8_420_UNORM
Some GPUs can sample biplanar formats like NV12 natively, returning the YUV values. Add a lowering type that uses that for sampling and relies on existing colorspace conversions. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693>
This commit is contained in:

committed by
Marge Bot

parent
e23bcb69c3
commit
826a10255f
@@ -315,6 +315,10 @@ update_shader_samplers(struct st_context *st,
|
||||
|
||||
switch (st_get_view_format(stObj)) {
|
||||
case PIPE_FORMAT_NV12:
|
||||
if (stObj->pt->format == PIPE_FORMAT_R8_G8B8_420_UNORM)
|
||||
/* no additional views needed */
|
||||
break;
|
||||
/* fallthrough */
|
||||
case PIPE_FORMAT_P010:
|
||||
case PIPE_FORMAT_P012:
|
||||
case PIPE_FORMAT_P016:
|
||||
|
Reference in New Issue
Block a user