summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple/i915_screen.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-07-23 14:05:22 +1000
committerBen Skeggs <[email protected]>2008-07-23 14:05:22 +1000
commit704dca40c4e0e983c07d84c3a32f8f9dc78a5543 (patch)
treebdcc585315d88274ec795b7206a143d562f54a76 /src/gallium/drivers/i915simple/i915_screen.c
parent0c25ac52425e6d6eb037b99ab90f41b47e3f4491 (diff)
parent7f3d6e74817e8880a0712c85f2b41fd88cf6a347 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_screen.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_screen.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
index ba8f183bdf0..4b1b8af7da8 100644
--- a/src/gallium/drivers/i915simple/i915_screen.c
+++ b/src/gallium/drivers/i915simple/i915_screen.c
@@ -148,7 +148,10 @@ i915_get_paramf(struct pipe_screen *screen, int param)
static boolean
i915_is_format_supported( struct pipe_screen *screen,
- enum pipe_format format, uint type )
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned tex_usage,
+ unsigned geom_flags )
{
static const enum pipe_format tex_supported[] = {
PIPE_FORMAT_R8G8B8A8_UNORM,
@@ -173,17 +176,10 @@ i915_is_format_supported( struct pipe_screen *screen,
const enum pipe_format *list;
uint i;
- switch (type) {
- case PIPE_TEXTURE:
- list = tex_supported;
- break;
- case PIPE_SURFACE:
+ if(tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET)
list = surface_supported;
- break;
- default:
- assert(0);
- return FALSE;
- }
+ else
+ list = tex_supported;
for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) {
if (list[i] == format)