diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-04-16 14:05:47 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-04-22 01:30:39 +0200 |
commit | fb523cb6ad3ffef22ab4b9cce9e53859c17c5739 (patch) | |
tree | 45b67da368c4c387329e5887ab6d49d61f0b85a9 /src/gallium/state_trackers/vdpau | |
parent | ed23335a313dfc9cec26999c0adffe3ab3a73a58 (diff) | |
download | external_mesa3d-fb523cb6ad3ffef22ab4b9cce9e53859c17c5739.zip external_mesa3d-fb523cb6ad3ffef22ab4b9cce9e53859c17c5739.tar.gz external_mesa3d-fb523cb6ad3ffef22ab4b9cce9e53859c17c5739.tar.bz2 |
gallium: merge PIPE_SWIZZLE_* and UTIL_FORMAT_SWIZZLE_*
Use PIPE_SWIZZLE_* everywhere.
Use X/Y/Z/W/0/1 instead of RED, GREEN, BLUE, ALPHA, ZERO, ONE.
The new enum is called pipe_swizzle.
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index c70cc6e..de7e951 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -106,10 +106,10 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, memset(&sv_tmpl, 0, sizeof(sv_tmpl)); u_sampler_view_default_template(&sv_tmpl, res, res->format); - sv_tmpl.swizzle_r = PIPE_SWIZZLE_ONE; - sv_tmpl.swizzle_g = PIPE_SWIZZLE_ONE; - sv_tmpl.swizzle_b = PIPE_SWIZZLE_ONE; - sv_tmpl.swizzle_a = PIPE_SWIZZLE_ONE; + sv_tmpl.swizzle_r = PIPE_SWIZZLE_1; + sv_tmpl.swizzle_g = PIPE_SWIZZLE_1; + sv_tmpl.swizzle_b = PIPE_SWIZZLE_1; + sv_tmpl.swizzle_a = PIPE_SWIZZLE_1; dev->dummy_sv = dev->context->create_sampler_view(dev->context, res, &sv_tmpl); pipe_resource_reference(&res, NULL); @@ -308,14 +308,14 @@ vlVdpDefaultSamplerViewTemplate(struct pipe_sampler_view *templ, struct pipe_res u_sampler_view_default_template(templ, res, res->format); desc = util_format_description(res->format); - if (desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_0) - templ->swizzle_r = PIPE_SWIZZLE_ONE; - if (desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_0) - templ->swizzle_g = PIPE_SWIZZLE_ONE; - if (desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_0) - templ->swizzle_b = PIPE_SWIZZLE_ONE; - if (desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_0) - templ->swizzle_a = PIPE_SWIZZLE_ONE; + if (desc->swizzle[0] == PIPE_SWIZZLE_0) + templ->swizzle_r = PIPE_SWIZZLE_1; + if (desc->swizzle[1] == PIPE_SWIZZLE_0) + templ->swizzle_g = PIPE_SWIZZLE_1; + if (desc->swizzle[2] == PIPE_SWIZZLE_0) + templ->swizzle_b = PIPE_SWIZZLE_1; + if (desc->swizzle[3] == PIPE_SWIZZLE_0) + templ->swizzle_a = PIPE_SWIZZLE_1; } void |