mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 15:00:36 +01:00
i965: Don't allow rendering to non-GL_RED/RG/RGBA integer textures.
Fixes piglit EXT_texture_integer/fbo-blending.
(cherry picked from commit 3a8cf3357a)
This commit is contained in:
parent
0749290d69
commit
80cd02f517
1 changed files with 11 additions and 0 deletions
|
|
@ -563,6 +563,17 @@ brw_render_target_supported(struct intel_context *intel,
|
|||
struct brw_context *brw = brw_context(&intel->ctx);
|
||||
gl_format format = rb->Format;
|
||||
|
||||
/* Many integer formats are promoted to RGBA (like XRGB8888 is), which means
|
||||
* we would consider them renderable even though we don't have surface
|
||||
* support for their alpha behavior and don't have the blending unit
|
||||
* available to fake it like we do for XRGB8888. Force them to being
|
||||
* unsupported.
|
||||
*/
|
||||
if ((rb->_BaseFormat != GL_RGBA &&
|
||||
rb->_BaseFormat != GL_RG &&
|
||||
rb->_BaseFormat != GL_RED) && _mesa_is_format_integer_color(format))
|
||||
return false;
|
||||
|
||||
return brw->format_supported_as_render_target[format];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue