Re: [Mesa-dev] [PATCH] mesa: increase the relative address offset limit to 4096 in ARB_vp/fp

2010-08-01 Thread Eric Anholt
On Sat, 31 Jul 2010 20:32:29 +0200, Marek Olšák mar...@gmail.com wrote:
 Also program_parse.tab.c has been regenerated.
 
 This fixes the parser error:
 
   ARB_vp: error: relative address offset too large
 
 See also: https://bugs.freedesktop.org/show_bug.cgi?id=28628
 
 4096 * sizeof(vec4) is the maximum size of the constant buffer on NV50,
 so it is a reasonable limit, at least for now.
 (should there be any limit at all?)
 
 Piglit: vp-arl-constant-array-huge-relative-offset

The limit comes from:

(26) What limits should be imposed on the constants that can be added to
or subtracted from the address register for relative addressing?  Negative
offsets are sometimes useful for shifting down in an array.

  RESOLVED:  -64 to +63 should be sufficient for the time being.  Offset
  sizes are limited to allow offsets to be baked into device-dependent
  instruction encodings.

so wine is really being nonportable here and should handle it itself,
but I'm fine with just removing the limits in the core and letting the
drivers complain if they can't be supported.  4096 doesn't make sense as
a limit, as constant buffer size limits should already be expressed
through MAX_PROGRAM_PARAMETERS_ARB.


pgpQulwb3DgAT.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: increase the relative address offset limit to 4096 in ARB_vp/fp

2010-08-01 Thread Sven Arvidsson
On Sat, 2010-07-31 at 20:32 +0200, Marek Olšák wrote:
 Also program_parse.tab.c has been regenerated.
 
 This fixes the parser error:
 
   ARB_vp: error: relative address offset too large
 
 See also: https://bugs.freedesktop.org/show_bug.cgi?id=28628
 
 4096 * sizeof(vec4) is the maximum size of the constant buffer on NV50,
 so it is a reasonable limit, at least for now.
 (should there be any limit at all?)

Sorry about butting in, but is this the same issue that's tracked here?
https://bugs.freedesktop.org/show_bug.cgi?id=23975

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22



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


Re: [Mesa-dev] [PATCH] mesa: increase the relative address offset limit to 4096 in ARB_vp/fp

2010-08-01 Thread Marek Olšák
On Sun, Aug 1, 2010 at 7:27 PM, Eric Anholt e...@anholt.net wrote:

 On Sat, 31 Jul 2010 20:32:29 +0200, Marek Olšák mar...@gmail.com wrote:
  Also program_parse.tab.c has been regenerated.
 
  This fixes the parser error:
 
ARB_vp: error: relative address offset too large
 
  See also: https://bugs.freedesktop.org/show_bug.cgi?id=28628
 
  4096 * sizeof(vec4) is the maximum size of the constant buffer on NV50,
  so it is a reasonable limit, at least for now.
  (should there be any limit at all?)
 
  Piglit: vp-arl-constant-array-huge-relative-offset

 The limit comes from:

(26) What limits should be imposed on the constants that can be added to
or subtracted from the address register for relative addressing?
  Negative
offsets are sometimes useful for shifting down in an array.

  RESOLVED:  -64 to +63 should be sufficient for the time being.  Offset
  sizes are limited to allow offsets to be baked into device-dependent
  instruction encodings.

 so wine is really being nonportable here and should handle it itself,
 but I'm fine with just removing the limits in the core and letting the
 drivers complain if they can't be supported.


OK. The thing is proprietary drivers allow much larger offsets than -64/+63.

4096 doesn't make sense as
 a limit, as constant buffer size limits should already be expressed
 through MAX_PROGRAM_PARAMETERS_ARB.


It is not supposed to be a definite hardware limit, it is just large enough
for it not to get in the way.

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


[Mesa-dev] [PATCH] mesa: increase the relative address offset limit to 4096 in ARB_vp/fp

2010-07-31 Thread Marek Olšák
Also program_parse.tab.c has been regenerated.

This fixes the parser error:

  ARB_vp: error: relative address offset too large

See also: https://bugs.freedesktop.org/show_bug.cgi?id=28628

4096 * sizeof(vec4) is the maximum size of the constant buffer on NV50,
so it is a reasonable limit, at least for now.
(should there be any limit at all?)

Piglit: vp-arl-constant-array-huge-relative-offset
---
 src/mesa/program/program_parse.tab.c |4 ++--
 src/mesa/program/program_parse.y |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/program/program_parse.tab.c 
b/src/mesa/program/program_parse.tab.c
index 34e1fdc..31a6096 100644
--- a/src/mesa/program/program_parse.tab.c
+++ b/src/mesa/program/program_parse.tab.c
@@ -2983,7 +2983,7 @@ yyreduce:
 /* Line 1455 of yacc.c  */
 #line 937 program_parse.y
 {
-  if (((yyvsp[(1) - (1)].integer)  0) || ((yyvsp[(1) - (1)].integer) 
 63)) {
+  if (((yyvsp[(1) - (1)].integer)  0) || ((yyvsp[(1) - (1)].integer) 
 4095)) {
   char s[100];
   _mesa_snprintf(s, sizeof(s),
  relative address offset too large (%d), 
(yyvsp[(1) - (1)].integer));
@@ -3000,7 +3000,7 @@ yyreduce:
 /* Line 1455 of yacc.c  */
 #line 951 program_parse.y
 {
-  if (((yyvsp[(1) - (1)].integer)  0) || ((yyvsp[(1) - (1)].integer) 
 64)) {
+  if (((yyvsp[(1) - (1)].integer)  0) || ((yyvsp[(1) - (1)].integer) 
 4096)) {
   char s[100];
   _mesa_snprintf(s, sizeof(s),
  relative address offset too large (%d), 
(yyvsp[(1) - (1)].integer));
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 7753dd7..fb6ef85 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -935,7 +935,7 @@ addrRegRelOffset:  { $$ = 0; }
 
 addrRegPosOffset: INTEGER
{
-  if (($1  0) || ($1  63)) {
+  if (($1  0) || ($1  4095)) {
   char s[100];
   _mesa_snprintf(s, sizeof(s),
  relative address offset too large (%d), $1);
@@ -949,7 +949,7 @@ addrRegPosOffset: INTEGER
 
 addrRegNegOffset: INTEGER
{
-  if (($1  0) || ($1  64)) {
+  if (($1  0) || ($1  4096)) {
   char s[100];
   _mesa_snprintf(s, sizeof(s),
  relative address offset too large (%d), $1);
-- 
1.7.0.4

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