Summary: | [HSW] Segmentation Fault in Simple OpenGL 3.3 Application | ||
---|---|---|---|
Product: | Mesa | Reporter: | Philipp Stiegernigg <Philipp.Stiegernigg> |
Component: | Drivers/DRI/i965 | Assignee: | Kenneth Graunke <kenneth> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 10.1 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
TwoTriangles_Shader
apitrace trace --api gl ./TwoTriangles_Shader |
Created attachment 96100 [details]
apitrace trace --api gl ./TwoTriangles_Shader
An simple shader based OpenGL 3.3 example (See attachment) crashes with a segmentation fault in intel-dri. Works perfectly on another machine wih Nvidia proprietary driver. CPU: Intel Core i7 4500U Haswell Mesa: 10.1.0 Intel Video Driver: xf86-video-intel 2.99.910 OS: Arch Linux Linux Kernel: 3.13.6-1-ARCH I've posted a fix for the crash to the mailing list: http://lists.freedesktop.org/archives/mesa-dev/2014-March/056286.html However, this won't fix your application. It's trying to use the default vertex array object (VAO); core profile requires you to create and bind your own. Because of this, you're getting an GL_INVALID_OPERATION from glVertexAttribPointer, and your vertex data is never getting specified. This is easily seen when replaying the apitrace: 0 371 glVertexAttribPointer(index = 0, size = 3, type = GL_FLOAT, normalized = GL_FALSE, stride = 24, pointer = NULL) 371: warning: glGetError(glVertexAttribPointer) = GL_INVALID_OPERATION Crash fixed in master by: commit 1afe3359258a9e89b62c8638761f52d78f6d1cbc Author: Kenneth Graunke <kenneth@whitecape.org> Date: Thu Mar 20 11:53:16 2014 -0700 mesa: In core profile, refuse to draw unless a VAO is bound. Core profile requires a non-default VAO to be bound. Currently, calls to glVertexAttribPointer raise INVALID_OPERATION unless a VAO is bound, and we never actually get any vertex data set. Trying to draw without any vertex data can only cause problems. In i965, it causes a crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76400 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org You'll still need to bind a non-default VAO in order for the application to work. |
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.
Created attachment 96099 [details] TwoTriangles_Shader