Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
On Fri, Nov 25, 2016 at 3:43 PM, Kenneth Graunke  wrote:
> On Friday, November 25, 2016 3:19:57 PM PST Rob Clark wrote:
>> no worries.. I can keep the reverts locally (it is marginally easier
>> than rebuilding glmark2 and I only really care until I get far enough
>> with $new_hw to advertise desktop gl 2.0+.. otherwise I wouldn't be
>> using glmark2-es)
>>
>> BR,
>> -R
>
> See this bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=97532
>
> Apparently glmark2 from git fixes these bugs.

yeah, saw that.. but it hasn't landed in rawhide yet.. and easier to
keep (locally) revert patches in mesa (which I'm constantly rebuilding
at this stage) than mess around w/ cmake and rebuilding glmark2 ;-)

pretty soon I won't care and will switch over to gl version of glmark2
and other more fancy things :-)

BR,
-R
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Kenneth Graunke
On Friday, November 25, 2016 3:19:57 PM PST Rob Clark wrote:
> no worries.. I can keep the reverts locally (it is marginally easier
> than rebuilding glmark2 and I only really care until I get far enough
> with $new_hw to advertise desktop gl 2.0+.. otherwise I wouldn't be
> using glmark2-es)
> 
> BR,
> -R

See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97532

Apparently glmark2 from git fixes these bugs.


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
no worries.. I can keep the reverts locally (it is marginally easier
than rebuilding glmark2 and I only really care until I get far enough
with $new_hw to advertise desktop gl 2.0+.. otherwise I wouldn't be
using glmark2-es)

BR,
-R

On Fri, Nov 25, 2016 at 3:10 PM, Ian Romanick  wrote:
> When I have a computer in front of me, I can look it up, but the GLSL ES
> 1.00 spec is quite clear on the topic. There was a bug a couple months ago
> where we discussed this to death.
>
>
>
> On November 25, 2016 9:44:10 AM Rob Clark  wrote:
>
>> hmm, that is annoying.. but is it required for gles2 as well?  or just
>> glsl 300+ shaders?
>>
>> maybe if CTS wasn't required in gles2 days, that is why ever other
>> driver let it slide..
>>
>> BR,
>> -R
>>
>> On Fri, Nov 25, 2016 at 12:39 PM, Ian Romanick 
>> wrote:
>>>
>>> The glmark tests are broken and not our problem. The spec has always
>>> required that precision qualifiers match. This patch is required to pass
>>> conformance. We absolutely cannot revert it.
>>>
>>>
>>>
>>> On November 25, 2016 6:37:47 AM Rob Clark  wrote:
>>>
 hmm, actually looks like we need to revert
 259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
 on ES if uniform precision qualifiers don't match") too

 On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:
>
>
> fwiw, issue is that a bunch (all) have "precision mediump float;" in
> frag shader, and list some uniforms in both frag and vert shader.  I'm
> not a spec lawyer, but pretty sure we should allow that.
>
> note that these are all gles2 shaders (not glsl 300 or 310)
>
> BR,
> -R
>
> On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:
>>
>>
>> This breaks a whole bunch of gles2 glmark2 "tests"..
>>
>> This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
>> ---
>>  src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
>>  src/compiler/glsl/linker.cpp| 10 +-
>>  2 files changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/src/compiler/glsl/link_interface_blocks.cpp
>> b/src/compiler/glsl/link_interface_blocks.cpp
>> index 4e91abc..abcc841 100644
>> --- a/src/compiler/glsl/link_interface_blocks.cpp
>> +++ b/src/compiler/glsl/link_interface_blocks.cpp
>> @@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
>> * don't force their types to match.  They might mismatch due
>> to
>> the two
>> * shaders using different GLSL versions, and that's ok.
>> */
>> -  if ((a->data.how_declared != ir_var_declared_implicitly ||
>> -   b->data.how_declared != ir_var_declared_implicitly) &&
>> -  (!prog->IsES || prog->Version != 310 ||
>> -   interstage_member_mismatch(prog, a->get_interface_type(),
>> -  b->get_interface_type(
>> +  if (a->data.how_declared != ir_var_declared_implicitly ||
>> +  b->data.how_declared != ir_var_declared_implicitly)
>>   return false;
>> }
>>
>> diff --git a/src/compiler/glsl/linker.cpp
>> b/src/compiler/glsl/linker.cpp
>> index cc28b26..e925d79 100644
>> --- a/src/compiler/glsl/linker.cpp
>> +++ b/src/compiler/glsl/linker.cpp
>> @@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program
>> *prog,
>>  return;
>>   }
>>
>> - /* Only in GLSL ES 3.10, the precision qualifier should not
>> match
>> -  * between block members defined in matched block names
>> within
>> a
>> -  * shader interface.
>> -  *
>> -  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each
>> block
>> -  * member should match.
>> -  */
>> - if (prog->IsES && (prog->Version != 310 ||
>> !var->get_interface_type()) &&
>> - existing->data.precision != var->data.precision) {
>> + if (prog->IsES && existing->data.precision !=
>> var->data.precision) {
>>  linker_error(prog, "declarations for %s `%s` have "
>>   "mismatching precision qualifiers\n",
>>   mode_string(var), var->name);
>> --
>> 2.7.4
>>
>>>
>>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Ian Romanick
When I have a computer in front of me, I can look it up, but the GLSL ES 
1.00 spec is quite clear on the topic. There was a bug a couple months ago 
where we discussed this to death.



On November 25, 2016 9:44:10 AM Rob Clark  wrote:


hmm, that is annoying.. but is it required for gles2 as well?  or just
glsl 300+ shaders?

maybe if CTS wasn't required in gles2 days, that is why ever other
driver let it slide..

BR,
-R

On Fri, Nov 25, 2016 at 12:39 PM, Ian Romanick  wrote:

The glmark tests are broken and not our problem. The spec has always
required that precision qualifiers match. This patch is required to pass
conformance. We absolutely cannot revert it.



On November 25, 2016 6:37:47 AM Rob Clark  wrote:


hmm, actually looks like we need to revert
259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
on ES if uniform precision qualifiers don't match") too

On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:


fwiw, issue is that a bunch (all) have "precision mediump float;" in
frag shader, and list some uniforms in both frag and vert shader.  I'm
not a spec lawyer, but pretty sure we should allow that.

note that these are all gles2 shaders (not glsl 300 or 310)

BR,
-R

On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:


This breaks a whole bunch of gles2 glmark2 "tests"..

This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
---
 src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
 src/compiler/glsl/linker.cpp| 10 +-
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/glsl/link_interface_blocks.cpp
b/src/compiler/glsl/link_interface_blocks.cpp
index 4e91abc..abcc841 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
* don't force their types to match.  They might mismatch due to
the two
* shaders using different GLSL versions, and that's ok.
*/
-  if ((a->data.how_declared != ir_var_declared_implicitly ||
-   b->data.how_declared != ir_var_declared_implicitly) &&
-  (!prog->IsES || prog->Version != 310 ||
-   interstage_member_mismatch(prog, a->get_interface_type(),
-  b->get_interface_type(
+  if (a->data.how_declared != ir_var_declared_implicitly ||
+  b->data.how_declared != ir_var_declared_implicitly)
  return false;
}

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index cc28b26..e925d79 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program
*prog,
 return;
  }

- /* Only in GLSL ES 3.10, the precision qualifier should not
match
-  * between block members defined in matched block names within
a
-  * shader interface.
-  *
-  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each
block
-  * member should match.
-  */
- if (prog->IsES && (prog->Version != 310 ||
!var->get_interface_type()) &&
- existing->data.precision != var->data.precision) {
+ if (prog->IsES && existing->data.precision !=
var->data.precision) {
 linker_error(prog, "declarations for %s `%s` have "
  "mismatching precision qualifiers\n",
  mode_string(var), var->name);
--
2.7.4







___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
hmm, that is annoying.. but is it required for gles2 as well?  or just
glsl 300+ shaders?

maybe if CTS wasn't required in gles2 days, that is why ever other
driver let it slide..

BR,
-R

On Fri, Nov 25, 2016 at 12:39 PM, Ian Romanick  wrote:
> The glmark tests are broken and not our problem. The spec has always
> required that precision qualifiers match. This patch is required to pass
> conformance. We absolutely cannot revert it.
>
>
>
> On November 25, 2016 6:37:47 AM Rob Clark  wrote:
>
>> hmm, actually looks like we need to revert
>> 259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
>> on ES if uniform precision qualifiers don't match") too
>>
>> On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:
>>>
>>> fwiw, issue is that a bunch (all) have "precision mediump float;" in
>>> frag shader, and list some uniforms in both frag and vert shader.  I'm
>>> not a spec lawyer, but pretty sure we should allow that.
>>>
>>> note that these are all gles2 shaders (not glsl 300 or 310)
>>>
>>> BR,
>>> -R
>>>
>>> On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:

 This breaks a whole bunch of gles2 glmark2 "tests"..

 This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
 ---
  src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
  src/compiler/glsl/linker.cpp| 10 +-
  2 files changed, 3 insertions(+), 14 deletions(-)

 diff --git a/src/compiler/glsl/link_interface_blocks.cpp
 b/src/compiler/glsl/link_interface_blocks.cpp
 index 4e91abc..abcc841 100644
 --- a/src/compiler/glsl/link_interface_blocks.cpp
 +++ b/src/compiler/glsl/link_interface_blocks.cpp
 @@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
 * don't force their types to match.  They might mismatch due to
 the two
 * shaders using different GLSL versions, and that's ok.
 */
 -  if ((a->data.how_declared != ir_var_declared_implicitly ||
 -   b->data.how_declared != ir_var_declared_implicitly) &&
 -  (!prog->IsES || prog->Version != 310 ||
 -   interstage_member_mismatch(prog, a->get_interface_type(),
 -  b->get_interface_type(
 +  if (a->data.how_declared != ir_var_declared_implicitly ||
 +  b->data.how_declared != ir_var_declared_implicitly)
   return false;
 }

 diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
 index cc28b26..e925d79 100644
 --- a/src/compiler/glsl/linker.cpp
 +++ b/src/compiler/glsl/linker.cpp
 @@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program
 *prog,
  return;
   }

 - /* Only in GLSL ES 3.10, the precision qualifier should not
 match
 -  * between block members defined in matched block names within
 a
 -  * shader interface.
 -  *
 -  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each
 block
 -  * member should match.
 -  */
 - if (prog->IsES && (prog->Version != 310 ||
 !var->get_interface_type()) &&
 - existing->data.precision != var->data.precision) {
 + if (prog->IsES && existing->data.precision !=
 var->data.precision) {
  linker_error(prog, "declarations for %s `%s` have "
   "mismatching precision qualifiers\n",
   mode_string(var), var->name);
 --
 2.7.4

>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Ian Romanick
The glmark tests are broken and not our problem. The spec has always 
required that precision qualifiers match. This patch is required to pass 
conformance. We absolutely cannot revert it.



On November 25, 2016 6:37:47 AM Rob Clark  wrote:


hmm, actually looks like we need to revert
259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
on ES if uniform precision qualifiers don't match") too

On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:

fwiw, issue is that a bunch (all) have "precision mediump float;" in
frag shader, and list some uniforms in both frag and vert shader.  I'm
not a spec lawyer, but pretty sure we should allow that.

note that these are all gles2 shaders (not glsl 300 or 310)

BR,
-R

On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:

This breaks a whole bunch of gles2 glmark2 "tests"..

This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
---
 src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
 src/compiler/glsl/linker.cpp| 10 +-
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/glsl/link_interface_blocks.cpp 
b/src/compiler/glsl/link_interface_blocks.cpp

index 4e91abc..abcc841 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
* don't force their types to match.  They might mismatch due to the two
* shaders using different GLSL versions, and that's ok.
*/
-  if ((a->data.how_declared != ir_var_declared_implicitly ||
-   b->data.how_declared != ir_var_declared_implicitly) &&
-  (!prog->IsES || prog->Version != 310 ||
-   interstage_member_mismatch(prog, a->get_interface_type(),
-  b->get_interface_type(
+  if (a->data.how_declared != ir_var_declared_implicitly ||
+  b->data.how_declared != ir_var_declared_implicitly)
  return false;
}

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index cc28b26..e925d79 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
 return;
  }

- /* Only in GLSL ES 3.10, the precision qualifier should not match
-  * between block members defined in matched block names within a
-  * shader interface.
-  *
-  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
-  * member should match.
-  */
- if (prog->IsES && (prog->Version != 310 || 
!var->get_interface_type()) &&

- existing->data.precision != var->data.precision) {
+ if (prog->IsES && existing->data.precision != var->data.precision) {
 linker_error(prog, "declarations for %s `%s` have "
  "mismatching precision qualifiers\n",
  mode_string(var), var->name);
--
2.7.4




___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Eero Tamminen

Hi,

Please look at:
https://github.com/glmark2/glmark2/issues/25
https://bugs.freedesktop.org/show_bug.cgi?id=97532
https://bugs.freedesktop.org/show_bug.cgi?id=97804


- Eero

On 25.11.2016 16:37, Rob Clark wrote:

hmm, actually looks like we need to revert
259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
on ES if uniform precision qualifiers don't match") too

On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:

fwiw, issue is that a bunch (all) have "precision mediump float;" in
frag shader, and list some uniforms in both frag and vert shader.  I'm
not a spec lawyer, but pretty sure we should allow that.

note that these are all gles2 shaders (not glsl 300 or 310)

BR,
-R

On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:

This breaks a whole bunch of gles2 glmark2 "tests"..

This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
---
 src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
 src/compiler/glsl/linker.cpp| 10 +-
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/glsl/link_interface_blocks.cpp 
b/src/compiler/glsl/link_interface_blocks.cpp
index 4e91abc..abcc841 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
* don't force their types to match.  They might mismatch due to the two
* shaders using different GLSL versions, and that's ok.
*/
-  if ((a->data.how_declared != ir_var_declared_implicitly ||
-   b->data.how_declared != ir_var_declared_implicitly) &&
-  (!prog->IsES || prog->Version != 310 ||
-   interstage_member_mismatch(prog, a->get_interface_type(),
-  b->get_interface_type(
+  if (a->data.how_declared != ir_var_declared_implicitly ||
+  b->data.how_declared != ir_var_declared_implicitly)
  return false;
}

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index cc28b26..e925d79 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
 return;
  }

- /* Only in GLSL ES 3.10, the precision qualifier should not match
-  * between block members defined in matched block names within a
-  * shader interface.
-  *
-  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
-  * member should match.
-  */
- if (prog->IsES && (prog->Version != 310 || !var->get_interface_type()) 
&&
- existing->data.precision != var->data.precision) {
+ if (prog->IsES && existing->data.precision != var->data.precision) {
 linker_error(prog, "declarations for %s `%s` have "
  "mismatching precision qualifiers\n",
  mode_string(var), var->name);
--
2.7.4


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
hmm, actually looks like we need to revert
259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
on ES if uniform precision qualifiers don't match") too

On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark  wrote:
> fwiw, issue is that a bunch (all) have "precision mediump float;" in
> frag shader, and list some uniforms in both frag and vert shader.  I'm
> not a spec lawyer, but pretty sure we should allow that.
>
> note that these are all gles2 shaders (not glsl 300 or 310)
>
> BR,
> -R
>
> On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:
>> This breaks a whole bunch of gles2 glmark2 "tests"..
>>
>> This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
>> ---
>>  src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
>>  src/compiler/glsl/linker.cpp| 10 +-
>>  2 files changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/src/compiler/glsl/link_interface_blocks.cpp 
>> b/src/compiler/glsl/link_interface_blocks.cpp
>> index 4e91abc..abcc841 100644
>> --- a/src/compiler/glsl/link_interface_blocks.cpp
>> +++ b/src/compiler/glsl/link_interface_blocks.cpp
>> @@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
>> * don't force their types to match.  They might mismatch due to the 
>> two
>> * shaders using different GLSL versions, and that's ok.
>> */
>> -  if ((a->data.how_declared != ir_var_declared_implicitly ||
>> -   b->data.how_declared != ir_var_declared_implicitly) &&
>> -  (!prog->IsES || prog->Version != 310 ||
>> -   interstage_member_mismatch(prog, a->get_interface_type(),
>> -  b->get_interface_type(
>> +  if (a->data.how_declared != ir_var_declared_implicitly ||
>> +  b->data.how_declared != ir_var_declared_implicitly)
>>   return false;
>> }
>>
>> diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
>> index cc28b26..e925d79 100644
>> --- a/src/compiler/glsl/linker.cpp
>> +++ b/src/compiler/glsl/linker.cpp
>> @@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
>>  return;
>>   }
>>
>> - /* Only in GLSL ES 3.10, the precision qualifier should not match
>> -  * between block members defined in matched block names within a
>> -  * shader interface.
>> -  *
>> -  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
>> -  * member should match.
>> -  */
>> - if (prog->IsES && (prog->Version != 310 || 
>> !var->get_interface_type()) &&
>> - existing->data.precision != var->data.precision) {
>> + if (prog->IsES && existing->data.precision != var->data.precision) 
>> {
>>  linker_error(prog, "declarations for %s `%s` have "
>>   "mismatching precision qualifiers\n",
>>   mode_string(var), var->name);
>> --
>> 2.7.4
>>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
fwiw, issue is that a bunch (all) have "precision mediump float;" in
frag shader, and list some uniforms in both frag and vert shader.  I'm
not a spec lawyer, but pretty sure we should allow that.

note that these are all gles2 shaders (not glsl 300 or 310)

BR,
-R

On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark  wrote:
> This breaks a whole bunch of gles2 glmark2 "tests"..
>
> This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
> ---
>  src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
>  src/compiler/glsl/linker.cpp| 10 +-
>  2 files changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/src/compiler/glsl/link_interface_blocks.cpp 
> b/src/compiler/glsl/link_interface_blocks.cpp
> index 4e91abc..abcc841 100644
> --- a/src/compiler/glsl/link_interface_blocks.cpp
> +++ b/src/compiler/glsl/link_interface_blocks.cpp
> @@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
> * don't force their types to match.  They might mismatch due to the 
> two
> * shaders using different GLSL versions, and that's ok.
> */
> -  if ((a->data.how_declared != ir_var_declared_implicitly ||
> -   b->data.how_declared != ir_var_declared_implicitly) &&
> -  (!prog->IsES || prog->Version != 310 ||
> -   interstage_member_mismatch(prog, a->get_interface_type(),
> -  b->get_interface_type(
> +  if (a->data.how_declared != ir_var_declared_implicitly ||
> +  b->data.how_declared != ir_var_declared_implicitly)
>   return false;
> }
>
> diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
> index cc28b26..e925d79 100644
> --- a/src/compiler/glsl/linker.cpp
> +++ b/src/compiler/glsl/linker.cpp
> @@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
>  return;
>   }
>
> - /* Only in GLSL ES 3.10, the precision qualifier should not match
> -  * between block members defined in matched block names within a
> -  * shader interface.
> -  *
> -  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
> -  * member should match.
> -  */
> - if (prog->IsES && (prog->Version != 310 || 
> !var->get_interface_type()) &&
> - existing->data.precision != var->data.precision) {
> + if (prog->IsES && existing->data.precision != var->data.precision) {
>  linker_error(prog, "declarations for %s `%s` have "
>   "mismatching precision qualifiers\n",
>   mode_string(var), var->name);
> --
> 2.7.4
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

2016-11-25 Thread Rob Clark
This breaks a whole bunch of gles2 glmark2 "tests"..

This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
---
 src/compiler/glsl/link_interface_blocks.cpp |  7 ++-
 src/compiler/glsl/linker.cpp| 10 +-
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/glsl/link_interface_blocks.cpp 
b/src/compiler/glsl/link_interface_blocks.cpp
index 4e91abc..abcc841 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
* don't force their types to match.  They might mismatch due to the two
* shaders using different GLSL versions, and that's ok.
*/
-  if ((a->data.how_declared != ir_var_declared_implicitly ||
-   b->data.how_declared != ir_var_declared_implicitly) &&
-  (!prog->IsES || prog->Version != 310 ||
-   interstage_member_mismatch(prog, a->get_interface_type(),
-  b->get_interface_type(
+  if (a->data.how_declared != ir_var_declared_implicitly ||
+  b->data.how_declared != ir_var_declared_implicitly)
  return false;
}
 
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index cc28b26..e925d79 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
 return;
  }
 
- /* Only in GLSL ES 3.10, the precision qualifier should not match
-  * between block members defined in matched block names within a
-  * shader interface.
-  *
-  * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
-  * member should match.
-  */
- if (prog->IsES && (prog->Version != 310 || 
!var->get_interface_type()) &&
- existing->data.precision != var->data.precision) {
+ if (prog->IsES && existing->data.precision != var->data.precision) {
 linker_error(prog, "declarations for %s `%s` have "
  "mismatching precision qualifiers\n",
  mode_string(var), var->name);
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev