Bug 32520

Summary: [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM
Product: Mesa Reporter: Hai <hai.lan>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: VERIFIED FIXED QA Contact: Hai <hai.lan>
Severity: normal    
Priority: medium CC: idr, kenneth
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: glBlendFunc(GL_ZERO, GL_DST_COLOR)

Description Hai 2010-12-20 02:17:53 UTC
System Environment:
--------------------------
Libdrm:        (master)2.4.22-21-g537703fd4805e9cd352965fce642670986822d22
Mesa:        (master)c64447f47de168e82086bc2fb483817b82e59cab
Xserver:       
(master)xorg-server-1.9.99.901-1-g780754050bc9cb1489f92a2a890ab5665e3e6358
Xf86_video_intel:       
(master)2.13.901-25-g9b967807c2d240488a715509649663aac3583532
Cairo:        (master)d3accefd3b9a4db5f07fb1f7bb05fb4238bf36c1
Kernel:    (drm-intel-fixes) 1b39d6f37622f1da70aa2cfd38bfff9a52c13e05
CPU: Ironlake core i5 650
OS: Fedora 13(32 bits)

Bug detailed description:
-------------------------
glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM
glBlendFuncSeparate(GL_ZERO, GL_ZERO, GL_DST_COLOR,GL_DST_COLOR) will also result in GL_INVALID_ENUM. If we use GL_ONE or GL_ONE_MINUS_DST_COLOR as the glBlendFunc or glBlendFuncSeparate parameters, it will aslo result in GL_INVALID_ENUM.

Reproduce steps:
-------------------------
build the attachment and run it.
Comment 1 Hai 2010-12-20 02:19:41 UTC
Created attachment 41282 [details]
glBlendFunc(GL_ZERO, GL_DST_COLOR)
Comment 2 Kenneth Graunke 2010-12-27 15:47:55 UTC
The following commit should fix this.  If it doesn't, please reopen.

commit 6bb1e4541eb707d525163987b167bd974c87067e
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Mon Dec 27 15:44:52 2010 -0800

    i965: Internally enable GL_NV_blend_square on ES2.
    
    Hopefully should fix bug #32520.
Comment 3 Hai 2010-12-28 22:33:28 UTC
I have verified this issue. It has been fixed.
Following is the verification environment:

Libdrm:		(master)2.4.23-4-gbad5242a59aa8e31cf10749e2ac69b3c66ef7da0
Mesa:		(master)f3319561a476bd806005551251dbc6a37f266e03
Xserver:		(master)xorg-server-1.9.99.901-49-gefcb63d0ce43f96d0ac02b6f4a480dfd2374fc84
Xf86_video_intel:		(master)2.13.902-11-g7667ad8432c032aec3a2aa004fc4dfc1877971b3
Cairo:		(master)a4ae7d59be2e545afc30c35b2235b89860e2003a
kernel:(drm-intel-fixes) 63abf3edaf42d0b9f278df90fe41c7ed4796b6b1

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.