diff options
author | Roland Scheidegger <[email protected]> | 2010-05-21 20:02:22 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-21 20:02:22 +0200 |
commit | 3293bcdc80cdfa20a2381aae2b94505bdf95d857 (patch) | |
tree | 16ab1ae66010f6d8b1325dbfa9006126a8e95771 /src/gallium/drivers/i915/i915_screen.c | |
parent | 8504c5d931e47765a15fdaec2df2cb6502a1bd5c (diff) | |
parent | ce65caba846b03b5ef4144e311b85cfd48ab9bbb (diff) |
Merge branch 'gallium-msaa'
Conflicts:
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c
Diffstat (limited to 'src/gallium/drivers/i915/i915_screen.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 19 |
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 7cf627d975b..0897a863dbd 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -161,9 +161,10 @@ i915_get_paramf(struct pipe_screen *screen, enum pipe_cap 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[] = { @@ -183,17 +184,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; |