diff options
author | Brian Paul <brianp@vmware.com> | 2009-10-29 19:12:50 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-10-29 19:12:50 -0600 |
commit | 4a253431abf43a0638afb43605b44a8742b72a60 (patch) | |
tree | becebaeac66a2b5d5e0932254f712046ff862edd /src/mesa/drivers/dri/i965 | |
parent | f920d496e1b5b01a3ba9bcd7dcff5c19bc109da2 (diff) |
intel: update intel_create_renderbuffer(format), add XRGB support
Pass a gl_format to intel_create_renderbuffer() instead of GLenum.
Add cases for MESA_FORMAT_XRGB8888 textures and renderbuffers.
However, we don't yet create any renderbuffers or textures with that
format. It seems the default alpha value is zero instead of one.
Need to investigate that first.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 3b2c6a25be..0bf735c0f2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -96,7 +96,11 @@ static GLuint translate_tex_format( gl_format mesa_format, else return BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + case MESA_FORMAT_XRGB8888: + return BRW_SURFACEFORMAT_B8G8R8X8_UNORM; + case MESA_FORMAT_RGBA8888_REV: + _mesa_problem(NULL, "unexpected format in i965:translate_tex_format()"); if (internal_format == GL_RGB) return BRW_SURFACEFORMAT_R8G8B8X8_UNORM; else @@ -531,6 +535,9 @@ brw_update_renderbuffer_surface(struct brw_context *brw, case MESA_FORMAT_ARGB8888: key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break; + case MESA_FORMAT_XRGB8888: + key.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM; + break; case MESA_FORMAT_RGB565: key.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; break; |