search for: validate_format_bpp

Displaying 2 results from an estimated 2 matches for "validate_format_bpp".

2014 Jan 15
1
[PATCH v2] nouveau: add framebuffer validation callback
...vers/dri/nouveau/nouveau_fbo.c index 25543e4..427eb00 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -268,6 +268,57 @@ nouveau_finish_render_texture(struct gl_context *ctx, texture_dirty(rb->TexImage->TexObject); } +static int +validate_format_bpp(gl_format format) +{ + switch (format) { + case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_Z24_S8: + return 32; + case MESA_FORMAT_RGB565: + case MESA_FORMAT_Z16: + return 16; + default: + return 0; + } +} + +static void +nouveau_check_framebuffer_complete(struct gl_co...
2014 Jan 10
2
[PATCH] nouveau: add framebuffer validation callback
Fixes assertions when trying to attach textures to fbs with formats not supported by the render engines. See https://bugs.freedesktop.org/show_bug.cgi?id=73459 Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- In a perfect world I'd have separate callbacks for depth and color, but given the list of supported values, I don't think this matters. Also I used