return false;
} else {
if (util_format_get_mask(info->dst.format) != info->mask ||
- util_format_get_mask(info->src.format) != info->mask)
+ util_format_get_mask(info->src.format) != info->mask ||
+ util_format_has_alpha1(info->src.format))
return false;
}
clear_color[c] = color->f[c];
}
+ if (!(util_format_colormask(util_format_description(psurf->texture->format)) &
+ PIPE_MASK_A))
+ clear_color[3] = 1.0f;
+
D3D12_RECT rect = { (int)dstx, (int)dsty,
(int)dstx + (int)width,
(int)dsty + (int)height };
MAP_FORMAT_INT(R8G8B8A8)
MAP_FORMAT_SRGB(R8G8B8A8)
+ /* Since we report PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND and other caps,
+ * we can rely on st/mesa to force the alpha to 1 for these, so we can
+ * just use RGBA. This is needed to support RGB configs, since some apps
+ * will only choose RGB (not RGBA) configs.
+ */
+ [PIPE_FORMAT_R8G8B8X8_UNORM] = DXGI_FORMAT_R8G8B8A8_UNORM,
+ [PIPE_FORMAT_R8G8B8X8_SNORM] = DXGI_FORMAT_R8G8B8A8_SNORM,
+ [PIPE_FORMAT_R8G8B8X8_UINT] = DXGI_FORMAT_R8G8B8A8_UINT,
+ [PIPE_FORMAT_R8G8B8X8_SINT] = DXGI_FORMAT_R8G8B8A8_SINT,
+
[PIPE_FORMAT_B8G8R8X8_UNORM] = DXGI_FORMAT_B8G8R8X8_UNORM,
[PIPE_FORMAT_B8G8R8A8_UNORM] = DXGI_FORMAT_B8G8R8A8_UNORM,
* but the shader will read the x component so we need to adjust the swizzle. */
plane_slice = 1;
swizzle = STENCIL_SWIZZLE;
+ } else if (util_format_has_alpha1(pformat)) {
+ swizzle = RGB1_SWIZZLE;
}
}