Bug 88357 - [BDW] ARB_gpu_shader5 not enabled on GEN8
Summary: [BDW] ARB_gpu_shader5 not enabled on GEN8
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-13 07:55 UTC by lu hua
Modified: 2015-05-08 05:40 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lu hua 2015-01-13 07:55:44 UTC
System Environment:
--------------------------
Platform: BDW
Libdrm:		(master)libdrm-2.4.58-21-gd7c0a08bc576deb07df6c3f91f393ca8edd0c4bf
Mesa:		(10.4)fffe533f08d7c0cc61841195216e54587a1b77ad
Xserver:	(server-1.16-branch)xorg-server-1.16.3-1-gf39ac527baab8a38d023e3a8416757ccfcead42a
Xf86_video_intel:(master)2.99.917-26-gee79d1885509a2a94acb80e0c416cb276ba7c453
Libva:		(master)e97ac9e78cd475a13e722c455e34d5d39d0f059d
Libva_intel_driver:(master)1a4e98338b8b498895eabe3a151f48e5c624bb63
Kernel:   (drm-intel-fixes)e3e6efcd638d3caa18d9e89f235c7d6fc32c1f0b
Piglit    fdf804da1479e216bb1eb7f84984a29d266ba0a5

Bug detailed description:
-----------------------------
This new case fail on BDW with mesa master and 10.4 branch. Test on IVB, it works well.

output:
libGL: OpenDriver: trying /opt/X11R7/lib/dri/tls/i965_dri.so
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
Failed to compile fragment shader /GFX/Test/Piglit/piglit/tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:6(12): error: extension `GL_ARB_gpu_shader5' unsupported in fragment shader

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.30
// [end config]
#version 130
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }

Reproduce steps:
----------------------------
1. xinit
2. ./bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.30
Comment 1 Matt Turner 2015-01-13 20:30:11 UTC
I think Jason fixed this with:

http://cgit.freedesktop.org/piglit/commit/?id=62b62677a7d132e0ec4c9b5594d71cf9d1f70859
Comment 2 lu hua 2015-01-14 07:33:27 UTC
Test Piglit commit 62b62677a7d132e0ec4c9b5594d71cf9d1f70859. It still fails.
Failed to compile fragment shader tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:7(12): error: extension `GL_ARB_gpu_shader5' unsupported in fragment shader

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.30
// require_extensions: GL_ARB_gpu_shader5
// [end config]
#version 130
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }
Comment 3 Matt Turner 2015-01-14 07:57:41 UTC
Ah. The test uses #version 130. That's wrong. ARB_gpu_shader5's spec says >=150, so we only expose the extension in core profiles. I'm not sure how this could work on IVB.
Comment 4 Jason Ekstrand 2015-01-14 18:51:41 UTC
Patch sent to the piglit list:

http://lists.freedesktop.org/archives/piglit/2015-January/014084.html
Comment 5 Jason Ekstrand 2015-01-14 23:59:06 UTC
Fixed in piglit master.
Comment 6 lu hua 2015-01-16 06:04:59 UTC
Test Piglit commit 6c92c42d88fe87, GLSL 1.50 is not supported

output:
libGL: OpenDriver: trying /opt/X11R7/lib/dri/tls/i965_dri.so
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
libGL: Error in /etc/drirc line 1, column 0: no element found.
libGL: Error in /root/.drirc line 1, column 0: no element found.
libGL: Error in /etc/drirc line 1, column 0: no element found.
libGL: Error in /root/.drirc line 1, column 0: no element found.
Failed to compile fragment shader tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:6(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.50
// require_extensions: GL_ARB_gpu_shader5
// [end config]
#version 150
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }
Comment 7 Jason Ekstrand 2015-01-16 15:12:03 UTC
You need to be passing a glsl version of 1.50 to glslparsertest. That should turn it into a skip on platforms that don't support 1.5. Piglit will do this automatically based on the metadata at the top of the file.
Comment 8 Kenneth Graunke 2015-01-19 05:35:38 UTC
No, the problem is that we don't expose GL_ARB_gpu_shader5 on Gen8+ yet.

We somehow missed that earlier.  In order to enable it, we at minimum need a few imulExtended bug fixes.
Comment 9 Ian Romanick 2015-02-11 22:51:41 UTC
Updating the summary to reflect the actual problem.
Comment 10 Ian Romanick 2015-02-26 16:08:58 UTC
I believe Matt recently submitted some fixes for imul fairly recently, but I may be misremembering.  Do we have a list of what remains to be done?
Comment 11 Ben Widawsky 2015-02-26 18:39:33 UTC
I wrote a patch series to implement this. Matt found some issues, and who knows if it still applies. I asked him to look at it then because the tests were passing piglit and he said we needed better tests.

http://lists.freedesktop.org/archives/mesa-dev/2014-December/073286.html
Comment 12 lu hua 2015-03-02 08:22:47 UTC
(In reply to Ben Widawsky from comment #11)
> I wrote a patch series to implement this. Matt found some issues, and who
> knows if it still applies. I asked him to look at it then because the tests
> were passing piglit and he said we needed better tests.
> 
> http://lists.freedesktop.org/archives/mesa-dev/2014-December/073286.html

Hi Ben,
I notice there are 20 patches in this link. shell I test them all?
Comment 13 Matt Turner 2015-03-02 17:07:02 UTC
(In reply to lu hua from comment #12)
> (In reply to Ben Widawsky from comment #11)
> > I wrote a patch series to implement this. Matt found some issues, and who
> > knows if it still applies. I asked him to look at it then because the tests
> > were passing piglit and he said we needed better tests.
> > 
> > http://lists.freedesktop.org/archives/mesa-dev/2014-December/073286.html
> 
> Hi Ben,
> I notice there are 20 patches in this link. shell I test them all?

I don't think so. Some fixes need to be made to them.
Comment 14 Ben Widawsky 2015-03-05 18:02:58 UTC
I was mostly putting the link there so we don't forgot about the series if someone wants to fix this.

Lu Hua, I think it would be good if we got testing on them to see if it catches other bugs that we don't know about (assuming we'll eventually upstream a modified version of that series). However, like Matt said, fixes are probably needed, so consider it a low priority.

Setting to NEEDINFO to make sure Lu sees it. Lu, feel free to go back to New after you see it.
Comment 15 lu hua 2015-03-09 03:15:01 UTC
Test on the latest mesa master branch(commit 72d4f6c67f8a96956a1) and the latest Piglit. It still fails.
output:
libGL: OpenDriver: trying /opt/X11R7/lib/dri/tls/i965_dri.so
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
Failed to compile fragment shader tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:6(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.50
// require_extensions: GL_ARB_gpu_shader5
// [end config]
#version 150
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }
Comment 16 shuo.wang 2015-03-09 07:00:40 UTC
Hua

Please try by command:
./bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.50

Or

./piglit-run.py --no-concurrency -t spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag tests/quick.tests shuo

Since I think the command "./bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.30" is not right, since this case based on GLSL 1.50 not 1.30, and the last argv should be 1.50 instead of 1.30
Comment 17 lu hua 2015-03-09 08:00:23 UTC
run "./bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.50", it still fails.
root@x-bdw05:/GFX/Test/Piglit/piglit# ./bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.50
libGL: OpenDriver: trying /opt/X11R7/lib/dri/tls/i965_dri.so
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
Failed to compile fragment shader tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:7(12): error: extension `GL_ARB_gpu_shader5' unsupported in fragment shader

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.50
// require_extensions: GL_ARB_gpu_shader5
// [end config]
#version 150
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }
Comment 18 Kenneth Graunke 2015-03-09 09:01:35 UTC
Yeah, this is still not turned on upstream...we really should've gotten this done for 10.5.0... :(
Comment 19 Matt Turner 2015-04-30 23:23:26 UTC
Didn't remember that there was a bug outstanding. I fixed multiplication and turned ARB_gpu_shader5 on with

commit ff6ee39c19adc59225d1f0664695c669cd7e5a94
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Apr 24 11:28:06 2015 -0700

    i965: Enable ARB_gpu_shader5 on Gen8+.
Comment 20 lu hua 2015-05-05 08:48:13 UTC
Test on mesa commit b5045e29917a783be74becee5e72566e2b0e3535, It still fails and reports "GLSL 1.50 is not supported"
libGL: OpenDriver: trying /opt/X11R7/lib/dri/tls/i965_dri.so
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
Failed to compile fragment shader tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag: 0:6(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.50
// require_extensions: GL_ARB_gpu_shader5
// [end config]
#version 150
#extension GL_ARB_gpu_shader5: require

uniform int i;
uniform vec4 coord;
uniform sampler2DShadow s[5];

void main()
{
  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
                                  ivec2(-5, 3));
  gl_FragColor = vec4(0, f, 0, 1);
}

PIGLIT: {"result": "fail" }
Comment 21 Kenneth Graunke 2015-05-05 16:55:35 UTC
That must be a problem on your end - Broadwell supported GLSL 1.50 the day I upstreamed the code.

Note that you have to run it like this:

glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.50

adding "1.50" on the command line lets glslparsertest know that it needs to make a OpenGL Core Profile context.  Otherwise, you get a compatibility (3.0) context that only supports GLSL 1.30.

It works here.
Comment 22 lu hua 2015-05-08 05:40:49 UTC
(In reply to Kenneth Graunke from comment #21)
> That must be a problem on your end - Broadwell supported GLSL 1.50 the day I
> upstreamed the code.
> 
> Note that you have to run it like this:
> 
> glslparsertest
> tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass
> 1.50
> 
> adding "1.50" on the command line lets glslparsertest know that it needs to
> make a OpenGL Core Profile context.  Otherwise, you get a compatibility
> (3.0) context that only supports GLSL 1.30.
> 
> It works here.

Yes, run bin/glslparsertest tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag pass 1.50 , it works well.


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.