The window system buffer will be BGRA and applications will try to
directly resolve to it, which would trigger an INVALID_OPERATION in
BlitFramebuffer if the multisample renderbuffer is RGBA.
unsigned sample_count,
unsigned bindings)
{
- if (sample_count > 2 && sample_count != 4 && sample_count != 8)
+ if (!(0x117 & (1 << sample_count))) /* 0, 1, 2, 4 or 8 */
return FALSE;
if (sample_count == 8 && util_format_get_blocksizebits(format) >= 128)
return FALSE;
if (nv50_screen(pscreen)->tesla->grclass < NVA0_3D)
return FALSE;
break;
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8G8B8X8_UNORM:
+ /* HACK: GL requires equal formats for MS resolve and window is BGRA */
+ if (sample_count > 1)
+ return FALSE;
default:
break;
}
unsigned sample_count,
unsigned bindings)
{
- if (sample_count > 2 && sample_count != 4 && sample_count != 8)
+ if (!(0x117 & (1 << sample_count))) /* 0, 1, 2, 4 or 8 */
return FALSE;
if (!util_format_is_supported(format, bindings))
return FALSE;
+ switch (format) {
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8G8B8X8_UNORM:
+ /* HACK: GL requires equal formats for MS resolve and window is BGRA */
+ if (sample_count > 1)
+ return FALSE;
+ default:
+ break;
+ }
+
/* transfers & shared are always supported */
bindings &= ~(PIPE_BIND_TRANSFER_READ |
PIPE_BIND_TRANSFER_WRITE |