summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_screen.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-05-17 21:24:04 +0200
committerRoland Scheidegger <[email protected]>2010-05-17 21:24:04 +0200
commitbccf31bf5f2d6c9516a4c073d735b5056ff1d608 (patch)
tree22e7c60bc0c16036904f32cb9de10e7350f0ca15 /src/gallium/drivers/i915/i915_screen.c
parent6c32670706e8ed3855ff2187f0eadee43b5b8742 (diff)
i915g: adapt to interface changes
Diffstat (limited to 'src/gallium/drivers/i915/i915_screen.c')
-rw-r--r--src/gallium/drivers/i915/i915_screen.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 9086f9fc3b1..c10ba25d2d5 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -159,9 +159,10 @@ i915_get_paramf(struct pipe_screen *screen, int param)
static boolean
i915_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
+ enum pipe_format format,
enum pipe_texture_target target,
- unsigned tex_usage,
+ unsigned sample_count,
+ unsigned tex_usage,
unsigned geom_flags)
{
static const enum pipe_format tex_supported[] = {
@@ -181,17 +182,25 @@ i915_is_format_supported(struct pipe_screen *screen,
PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_FORMAT_NONE /* list terminator */
};
- static const enum pipe_format surface_supported[] = {
+ static const enum pipe_format render_supported[] = {
PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_FORMAT_B5G6R5_UNORM,
+ PIPE_FORMAT_NONE /* list terminator */
+ };
+ static const enum pipe_format depth_supported[] = {
PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_FORMAT_NONE /* list terminator */
};
const enum pipe_format *list;
uint i;
- if(tex_usage & PIPE_BIND_RENDER_TARGET)
- list = surface_supported;
+ if (sample_count > 1)
+ return FALSE;
+
+ if(tex_usage & PIPE_BIND_DEPTH_STENCIL)
+ list = depth_supported;
+ else if (tex_usage & PIPE_BIND_RENDER_TARGET)
+ list = render_supported;
else
list = tex_supported;