aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_sampler.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <[email protected]>2019-05-29 17:14:32 -0400
committerKenneth Graunke <[email protected]>2019-07-31 09:50:06 -0700
commit7404833c2e3227b61f53ad93b0e3a1a4d545c05f (patch)
tree05ca13aada923987187442d9137b62d2b4b747f7 /src/mesa/state_tracker/st_atom_sampler.c
parent338a29b08fe69aa91ad0318d54da1670f40307f0 (diff)
gallium: add handling for YUV planar surfaces
st/dri: this adds a table (similar to the one in i965) which provides mappings for turning various planar formats into multiple sampler views. whereas only NV12 and IYUV were supported, now many more formats are supported here: * P0XX * YUV4XX * YVU4XX * AYUV * XYUV * YUYV * UYVY the table is used directly to handle image creation, simplifying a lot of code and resolving related TODO/FIXME items where workarounds were previously in place to manage NV12 and IYUV formats exclusively st/mesa: the changes here relate to setting up samplers for the planar formats. this requires: * checking for driver support for all the sampler formats * creating the samplers with the corresponding formats and swizzling * running nir_lower_tex with the appropriate options to trigger the lowering for each plane->sampler fixes kwg/mesa#36 Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 27e4da31581..758ace10b8a 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -309,6 +309,9 @@ update_shader_samplers(struct st_context *st,
switch (st_get_view_format(stObj)) {
case PIPE_FORMAT_NV12:
+ case PIPE_FORMAT_P016:
+ case PIPE_FORMAT_YUYV:
+ case PIPE_FORMAT_UYVY:
/* we need one additional sampler: */
extra = u_bit_scan(&free_slots);
states[extra] = sampler;