diff options
author | Ville Syrjälä <[email protected]> | 2014-07-03 15:38:07 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2014-11-13 19:13:27 +0200 |
commit | dafae910d4fc791ba49f20e937cb918669f42944 (patch) | |
tree | 4437200c9183b77673d88c5ca63380a89c827196 /src/mesa/drivers/dri | |
parent | a071425817f8ea79336c08f0c4bf1576e0726b68 (diff) |
i915: Accept GL_DEPTH_STENCIL GL_DEPTH_COMPONENT formats for renderbuffers
Gen2 doesn't support depth/stencil textures, and since
commit c1d4d4999303f9167b20f4e0674b9436e6295cf7
Author: Ville Syrjälä <[email protected]>
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: Eric Anholt <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_fbo.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c index a77c3d6064b..b260d16ad49 100644 --- a/src/mesa/drivers/dri/i915/intel_fbo.c +++ b/src/mesa/drivers/dri/i915/intel_fbo.c @@ -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: |