mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
i965: Avoid segfault in gen6_upload_state
This fixes a bug introduced in commit258453716fand triggered whenever "rb" is NULL. Fixes at least one cause bug #59445: [SNB/IVB/HSW Bisected]Oglc draw-buffers2(advanced.blending.none) segfault https://bugs.freedesktop.org/show_bug.cgi?id=59445 (Though segfaults are still possible in that test case, but they have been present since before commit258453716fwhich is what's being fixed here.) Reviewed-by: Eric Anholt <eric@anholt.net> [jordan.l.justen@intel.com: fixes Anomaly Warzone Earth crash at title screen] Tested-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
39bb794aba
commit
4f44146226
1 changed files with 1 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ gen6_upload_blend_state(struct brw_context *brw)
|
|||
* not read the alpha channel, but will instead use the correct
|
||||
* implicit value for alpha.
|
||||
*/
|
||||
if (!_mesa_base_format_has_channel(rb->_BaseFormat, GL_TEXTURE_ALPHA_TYPE))
|
||||
if (rb && !_mesa_base_format_has_channel(rb->_BaseFormat, GL_TEXTURE_ALPHA_TYPE))
|
||||
{
|
||||
srcRGB = brw_fix_xRGB_alpha(srcRGB);
|
||||
srcA = brw_fix_xRGB_alpha(srcA);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue