Bug 32199 - 3D textures don't work on GLES2
Summary: 3D textures don't work on GLES2
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium enhancement
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 13:40 UTC by Neil Roberts
Modified: 2011-03-01 21:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Example (3.00 KB, text/x-c)
2010-12-07 13:40 UTC, Neil Roberts
Details
Patch to enable OES_texture_3D in the compiler. (7.54 KB, patch)
2011-02-25 23:46 UTC, Kenneth Graunke
Details | Splinter Review

Description Neil Roberts 2010-12-07 13:40:35 UTC
Created attachment 40883 [details]
Example

GLES2 on Mesa is advertising the GL_OES_texture_3D extension but the GLSL compiler seems to get very upset if you try to use it. Attached is an example. I get these errors with it:

fragment shader info:
0:1(12): warning: extension `GL_OES_texture_3D' unsupported in fragment shader
0:2(22): error: invalid type `sampler3D' in declaration of `tex'
0:7(31): error: `tex' undeclared
0:0(0): error: no matching function for call to `texture3D(, vec3)'

link info:
linking with uncompiled shader
Mesa: User error: GL_INVALID_OPERATION in glUseProgram(program 1 not linked)
Mesa: User error: GL_INVALID_OPERATION in glGetUniformfv(program)
Mesa: User error: GL_INVALID_OPERATION in glUniform(program not linked)

It might be better not to advertise the extension if it's not going to work.
Comment 1 Chia-I Wu 2010-12-08 06:47:39 UTC
I've disabled GL_OES_texture_3D.  I will leave this bug open, but change its severity to enhancement.
Comment 2 Kenneth Graunke 2011-02-25 23:46:19 UTC
Created attachment 43845 [details] [review]
Patch to enable OES_texture_3D in the compiler.

The attached patch adds support for GL_OES_texture_3D.  I can't seem to get the attached example to run (I just get EGLUT: failed to choose a config), but I think I'm just doing something wrong with eglut.

Neil, does this fix your test?  If so I'll commit it.
Comment 3 Neil Roberts 2011-02-28 04:56:12 UTC
(In reply to comment #2)

> Neil, does this fix your test?  If so I'll commit it.

Yup, the patch fixes the test for me. Thanks.
Comment 4 Kenneth Graunke 2011-03-01 21:55:33 UTC
commit 0a163cf56d1e412629cb802480998a982a47bb3c
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Feb 25 23:11:20 2011 -0800

    glsl: Enable GL_OES_texture_3D extension for ES2.


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.