[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966





--- Comment #7 from [EMAIL PROTECTED]  2007-05-16 23:45 PST ---
Dear Paul, Alex and Benno,

Many apologies for my proposal, clearly this is not a good direction, but it
was my only way to make it work. If I knew something about the Unichrome
driver...

I attached some explanations about the failure, having modified the sources
src/mesa/drivers/dri/unichrome/via_context.c to print the calls to
viaMakeCurrent and other.

Best regards,
Pierre


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966





--- Comment #6 from [EMAIL PROTECTED]  2007-05-16 23:38 PST ---
Created an attachment (id=9992)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=9992&action=view)
stack trace and variable dump


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] Tool to process .syn files?

2007-05-16 Thread Oliver McFadden
On 5/16/07, Ian Romanick <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Where is the tool to process the .syn files in src/mesa/shader?
>
> Is there an easy way in this parser generator to change the grammar for
> the TXP instruction?  Basically, I want it to be invalid to use TXP with
> the SHADOWARRAY2D target.
>
> Alternately, is there a reason we're using this instead of lex & yacc?
>
> I used lex & yacc to write a unified parser for another project that
> handles ARB_{vertex,fragment}_program (up to vp3 and fp2), the various
> NV vertex and fragment programs, and ATI_text_fragment_shader.  I could
> probably adapt it to work with Mesa without too much trouble.
>
> Opinions?

Personally I'd rather see a Lex and Yacc parser instead of something custom...

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10972] Wrong processing of unsigned color value

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10972





--- Comment #1 from [EMAIL PROTECTED]  2007-05-16 16:36 PST ---
Created an attachment (id=9989)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=9989&action=view)
the case


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10972] New: Wrong processing of unsigned color value

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10972

   Summary: Wrong processing of unsigned color value
   Product: Mesa
   Version: CVS
  Platform: All
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa3d-dev@lists.sourceforge.net
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]


Mesa: master 8a7f474c691dc077c081b59e30937e526400860f

>From OpenGL spec: if the bitwidth (let's say "m") of a color channel in FB is
less than the number of bits of the value with which the color component was
specified, then the converted value must equal the most significant "m" bits of
the specified value. (see 2.14.9, spec v1.5).

Current implementation of Mesa doesn't follow this rule. 

the attached case shows an example:
Run the case under any visual in which the bitwidth (let's say "m") of Red
channel is smaller than 16 (which is the bit width of type unsigned short), and
see whether the value read back is consistent with the first "m" most
significant bits of the specified value by glColor*us(). For example, if m = 8,
and glColor*us(0x00EE, ..., ...) is called, the expected red color read back
should be consistent with 0x00 (the 8 MSBs).


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] Tool to process .syn files?

2007-05-16 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Where is the tool to process the .syn files in src/mesa/shader?

Is there an easy way in this parser generator to change the grammar for
the TXP instruction?  Basically, I want it to be invalid to use TXP with
the SHADOWARRAY2D target.

Alternately, is there a reason we're using this instead of lex & yacc?

I used lex & yacc to write a unified parser for another project that
handles ARB_{vertex,fragment}_program (up to vp3 and fp2), the various
NV vertex and fragment programs, and ATI_text_fragment_shader.  I could
probably adapt it to work with Mesa without too much trouble.

Opinions?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGS4oxX1gOwKyEAw8RAkyDAJwPumMROv0Fzh9vJsBaVb+qvdDUXACeM4H/
6Z01oV4eKcQ6JT1ne07GLJc=
=AbB0
-END PGP SIGNATURE-

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966





--- Comment #5 from [EMAIL PROTECTED]  2007-05-16 10:12 PST ---
I'm going to veto that patch.  The real bug is in the unichrome driver, not in
core Mesa.

If you can provide a stack trace when the problem occurs, I might be able to
suggest something better.  Also, what is the value of 'bufferName' at that
time?


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966


[EMAIL PROTECTED] changed:

   What|Removed |Added

Attachment #9984 is|0   |1
   obsolete||




--- Comment #4 from [EMAIL PROTECTED]  2007-05-16 09:07 PST ---
Created an attachment (id=9986)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=9986&action=view)
mesa-6.5.3/src/mesa/main/renderbuffer.c diffs to avoid assert failure


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #3 from [EMAIL PROTECTED]  2007-05-16 07:55 PST ---
Please attach a unified diff, made with 'diff -u' from the top dir of mesa.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966





--- Comment #2 from [EMAIL PROTECTED]  2007-05-16 07:13 PST ---
Created an attachment (id=9984)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=9984&action=view)
mesa-6.5.3/src/mesa/main/renderbuffer.c diffs to avoid assert failure

this is a test for _mesa_add_renderbuffer() in the case there was a
renderbuffer attached to a framebuffer, due to a bug in the via/unichrome
driver.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966





--- Comment #1 from [EMAIL PROTECTED]  2007-05-16 06:04 PST ---
please attach a diff with your changes.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 10966] New: workaround to avoid the assert main/renderbuffer.c:2041: _mesa_add_renderbuffer:...

2007-05-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=10966

   Summary: workaround to avoid the assert main/renderbuffer.c:2041:
_mesa_add_renderbuffer:...
   Product: Mesa
   Version: 6.5
  Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa3d-dev@lists.sourceforge.net
ReportedBy: [EMAIL PROTECTED]


I own a VIA EPIA800ML motherboard, with an Unichrome adapter : chipset CLE266.
My Ubuntu 7.04 has installed Mesa-6.5.2, but, as far as I have seen, the same
bug exists in 6.5.3.

When launching wine on any 3D soft, I got the famous
main/renderbuffer.c:2041: _mesa_add_renderbuffer:  assertion "bufferName ==
BUFFER_DEPTH || bufferName == BUFFER_STENCIL ||
fb->Attachment[bufferName].Renderbuffer == ((void *)0)" failed  (translated
from french)

This is due to an attempt to allocate a second front render buffer into the
current frame buffer. This happens when calling calculate_buffer_parameters
from viaMakeCurrent in mesa-6.5.2/src/mesa/drivers/dri/unichrome/via_context.c.

The problem is when it calls viaMakeCurrent two times with different contexts
but with the same framebuffer, mesa tries to allocate a second renderbuffer.
This bug is mentionned by the via developer, in via_context.c (look for the
word "funny"). Very bad to have suggested no solution.

So (after many attempts, without any explanations about the code), I propose to
change a little the file :

/mesa-6.5.?/src/mesa/main/renderbuffer.c:

* remove the assert, line 2041 in 6.5.2 (or 2075 in 6.5.3)
* insert these 6 lines after the second assert, line 2086 in 6.5.3 :
   /* do not allocate a new renderbuffer, use the current one */
   if (bufferName != BUFFER_DEPTH &&
   bufferName != BUFFER_STENCIL &&
   fb->Attachment[bufferName].Renderbuffer) {
  /* no allocation OR delete previous renderbuffer */
  return; OR _mesa_remove_renderbuffer(fb,bufferName);
   }

Note : you have to choose between return or _mesa_remove... I tried both with
apparently similar results.

Now, there is no more "...:2041 assert failed" and my software seem to run much
better. But I am totally unsure about the memory (safe or not to reuse/share
such a buffer, safe or not for other drivers ?)
I do not know which one, the return or the _mesa_remove is better...

I must say this is not enough, there is still a big bug in the via unichrome
driver, which I report in another post (wrong addresses (?) for 3D drawing).

I thank you a lot for your attention and wish my bug report to be useful.
Pierre
username pierre.nerzic domain free.fr (replace domain by at)


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev