Skip to content
Snippets Groups Projects
Commit dafae910 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

i915: Accept GL_DEPTH_STENCIL GL_DEPTH_COMPONENT formats for renderbuffers


Gen2 doesn't support depth/stencil textures, and since

 commit c1d4d499
 Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
 Date:   Thu Apr 24 14:11:43 2014 +0300

    i915: Don't advertise Z formats in TextureFormatSupported on gen2

depth/stencil formats are no longer accepted as texture formats.
However we still want depth/stencil renderbuffers, so add explicit
format checks to intel_alloc_renderbuffer_storage() to allow such
things.

Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent a0714258
No related branches found
No related tags found
Loading
......@@ -180,6 +180,15 @@ intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
return intel->ctx.Driver.ChooseTextureFormat(ctx, GL_TEXTURE_2D,
internalFormat,
GL_NONE, GL_NONE);
case GL_DEPTH_COMPONENT16:
return MESA_FORMAT_Z_UNORM16;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
return MESA_FORMAT_Z24_UNORM_X8_UINT;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
case GL_STENCIL_INDEX4_EXT:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment