Bug 20850 - vbo_exec_vtx_flush causes Floating point exception when gets 0 vertsize.
Summary: vbo_exec_vtx_flush causes Floating point exception when gets 0 vertsize.
Status: RESOLVED DUPLICATE of bug 23489
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: low minor
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-24 18:54 UTC by Krzysztof A. Sobiecki
Modified: 2009-08-25 00:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
I have made small patch that hacks around this problem. It's only a hack. (876 bytes, patch)
2009-03-24 18:54 UTC, Krzysztof A. Sobiecki
Details | Splinter Review
Vertex that causes Floating point exception. (2.86 KB, text/plain)
2009-03-25 05:05 UTC, Krzysztof A. Sobiecki
Details

Description Krzysztof A. Sobiecki 2009-03-24 18:54:42 UTC
Created attachment 24218 [details] [review]
I have made small patch that hacks around this problem. It's only a hack.

Function vbo_exec_vtx_flush insrc/mesa/vbo/vbo_exec_draw.c gets Floating point exception when it gets vertex that looks like this:
http://pastebin.com/m1e77aeb7

It have 0 size and by looking in code:

exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /.
                            (exec->vtx.vertex_size * sizeof(GLfloat)));

exec->vtx.vertex_size ends as 0. Id divides by 0.

With my hack I was able to run this vertex without problems.

Tested on master and radeon-rewrite
System:
Radeon X1650pro
Comment 1 Michel Dänzer 2009-03-25 01:15:58 UTC
> Function vbo_exec_vtx_flush insrc/mesa/vbo/vbo_exec_draw.c gets Floating point
> exception when it gets vertex that looks like this:
> http://pastebin.com/m1e77aeb7

Please attach that information here directly rather than linking to an external site.
Comment 2 Krzysztof A. Sobiecki 2009-03-25 05:05:56 UTC
Created attachment 24234 [details]
Vertex that causes Floating point exception.
Comment 3 Brian Paul 2009-03-25 08:06:01 UTC
Your attachment is not a vertex shader.  Is a vertex shader really involved?

Do you have a small (glut) test program to reproduce the problem?  Or can you describe what sequence of GL calls is causing this?

Comment 4 Krzysztof A. Sobiecki 2009-03-25 11:08:11 UTC
>Your attachment is not a vertex shader.  Is a vertex shader really involved?
No. I don't think so. I don't remember how "shader" thing ended here.
It might be plain VBO.
>Or can you describe what sequence of GL calls is causing this?
This might take some time
Comment 5 Frank Earl 2009-03-30 19:39:23 UTC
Hi, I'm the person doing the coding work on Linux for the application he's reporting the issue with.

The application that is producing the issue is a 32-bit game title in beta testing right at the moment.  To the best of my knowledge, the binary he's got is a testing build that's using pretty much only immediate mode rendering calls.  

The developer's website is: http://www.elecorn.com/caster3d/index.html. 

If you're wanting a binary before it goes gold, contact me and I'll arrange access for you.
Comment 6 Adam Jackson 2009-08-24 12:32:00 UTC
Mass version move, cvs -> git
Comment 7 Tormod Volden 2009-08-25 00:47:57 UTC
Fixed with commit b9b04872d526ed7955f647542399e110ace0325c.

*** This bug has been marked as a duplicate of bug 23489 ***


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.