Currently we adjust the view format when we are asked to create a
BGRA render target view for BGRX surface. But we only look for
SVGA3D_B8G8R8X8_TYPELESS surface format.
With this patch, we will also check for SVGA3D_B8G8R8X8_UNORM surface format,
and use SVGA3D_B8G8R8X8_UNORM as the view format for that case.
Reviewed-by: Brian Paul <brianp@vmware.com>
* svga_validate_pipe_sampler_view().
*/
if (view_format == SVGA3D_B8G8R8A8_UNORM &&
- stex->key.format == SVGA3D_B8G8R8X8_TYPELESS) {
+ (stex->key.format == SVGA3D_B8G8R8X8_UNORM ||
+ stex->key.format == SVGA3D_B8G8R8X8_TYPELESS)) {
view_format = SVGA3D_B8G8R8X8_UNORM;
}