mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
svga: adjust sampler view format for RGBX
We previously handled the case of a RGBX sampler view of a RGBA surface. Add the reverse case too. For GL_ARB_copy_image. Acked-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
1049002eae
commit
68388043f3
1 changed files with 5 additions and 1 deletions
|
|
@ -106,12 +106,16 @@ svga_validate_pipe_sampler_view(struct svga_context *svga,
|
|||
enum pipe_format pformat = sv->base.format;
|
||||
|
||||
/* vgpu10 cannot create a BGRX view for a BGRA resource, so force it to
|
||||
* create a BGRA view.
|
||||
* create a BGRA view (and vice versa).
|
||||
*/
|
||||
if (pformat == PIPE_FORMAT_B8G8R8X8_UNORM &&
|
||||
sv->base.texture->format == PIPE_FORMAT_B8G8R8A8_UNORM) {
|
||||
pformat = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
}
|
||||
else if (pformat == PIPE_FORMAT_B8G8R8A8_UNORM &&
|
||||
sv->base.texture->format == PIPE_FORMAT_B8G8R8X8_UNORM) {
|
||||
pformat = PIPE_FORMAT_B8G8R8X8_UNORM;
|
||||
}
|
||||
|
||||
format = svga_translate_format(ss, pformat,
|
||||
PIPE_BIND_SAMPLER_VIEW);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue