nv50,nvc0: fix multisample format hack
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 30 Aug 2011 21:44:27 +0000 (23:44 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 30 Aug 2011 22:06:22 +0000 (00:06 +0200)
Advertising different format support based on sample count was a
bad idea, it made resolve to window work, but resolve to anything
else would fail.

See 9f4998639c3c47f0b7ee3e2a29b7f3609d3f7796.

src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nvc0/nvc0_screen.c

index b1d0b1c54a5cddfd224d366a72486a50941f2197..235cd82c6433b4c784a8ed2cda6136d43412b089 100644 (file)
@@ -59,7 +59,7 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
    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)
+      if (bindings & PIPE_BIND_RENDER_TARGET)
          return FALSE;
    default:
       break;
index 204887d2e8bc6992951627443c0c90fc7fa1b0b5..d3027de156ca92dd661607dd95ba69b14f13c1e1 100644 (file)
@@ -50,7 +50,7 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
    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)
+      if (bindings & PIPE_BIND_RENDER_TARGET)
          return FALSE;
    default:
       break;