Commit Graph

23097 Commits

Author SHA1 Message Date
José Fonseca
8bfbb7ec8b gallium: Shorthand functions for computing stride and sizes for a rect. 2009-06-10 15:31:12 +01:00
Keith Whitwell
76a1017e97 mesa/st: fix tracking of mapped buffer ranges
In st_bufferobj_map_range(), set obj->Offset consistently with its
usage elsewhere.
2009-06-09 18:32:18 +01:00
Keith Whitwell
9192347443 stw: ignore swapbuffer requests on singlebuffer
Return TRUE in this case.  Returning FALSE seems to result in
mis-rendering -- possibly opengl32.dll is trying to compensate by
doing a software blit??
2009-06-09 16:37:38 +01:00
Brian Paul
cb549775a5 glsl: Expand nested preprocessor macros.
(cherry picked from master, commit ef8caec29a)
2009-06-09 09:14:38 -06:00
Brian Paul
34bb024cf2 st/mesa: fix incorrect bufObj Length assignment, remove unneeded assertion 2009-06-08 16:11:17 -06:00
Jon TURNEY
7eed6ab5b5 Cygwin build fixes
Fix mklib to deal with NOPREFIX and use --enable-auto-image-base for cygwin
Teach configure.ac some basic facts about cygwin

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-08 14:30:46 -06:00
Brian Paul
304ba4bba4 glsl: Fix preprocessor define argument parsing for dead sections.
(cherry picked from master, commit 19a54d9f10)
2009-06-08 13:53:33 -06:00
Jakob Bornecrantz
77c329a277 pipebuffer: Silence out of heap space debug print 2009-06-08 19:54:55 +02:00
Brian Paul
b6753adbc7 st/mesa: remove invalid assertion
It's legal for ARB_vertex_program programs to not write to result.position.
The results are undefined in that case.  This assertion was causing us to
abort/exit though.
2009-06-08 10:46:46 -06:00
José Fonseca
e09f78d8dc mesa: Use matching signedness for the counter as upper bound. 2009-06-08 16:56:41 +01:00
José Fonseca
42678dba94 mesa: Allocate tokens from the heap.
The recent increase ST_MAX_SHADER_TOKENS to 8K causes stack overflows on
windows.

Failure to allocate is not being propagated to the caller. This is not
a regression since the previous _mesa_malloc result wasn't being
checked as well. Unfortunately it is not easy to fix, as the callers of
these functions do not have failure propagation mechanism either, and
so on. So leaving a just fixme note for now.
2009-06-08 16:56:41 +01:00
Brian Paul
33d6327770 mesa: better error message for invalid texture unit index 2009-06-08 09:53:00 -06:00
Brian Paul
0bced6a326 mesa: bump MAX_PROGRAM_ENV_PARAMS from 128 to 256
Also, MAX_NV_VERTEX_PROGRAM_PARAMS should be 96, not 128 (or 256).
2009-06-08 09:53:00 -06:00
Keith Whitwell
0d3c8fbf12 mesa/vbo: drop all references to vbo on destroy
We were adding references to the input arrays, but failing to drop
them on destruction.  This could lead to a 64kb buffer being leaked
each context destruction.
2009-06-08 16:27:43 +01:00
Brian Paul
fce4ee12a6 mesa: EXT_vertex_array_bgra fixes
1) Pass the correct format when calling update_array in
   _mesa_VertexAttribPointerARB.
2) glVertexAttribPointerNV accepts GL_BGRA format too.
3) raise INVALID_VALUE error when format is BGRA and normalized is
   false in glVertexAttribPointerARB

(cherry picked from commit 4adb190a16)
2009-06-08 07:25:24 -06:00
Jakob Bornecrantz
4d9d0e6230 stw: If stfb not set don't call into mesa 2009-06-08 14:45:56 +02:00
Jakob Bornecrantz
283e84bfb3 progs/tests: Add some scissor tests 2009-06-08 14:45:40 +02:00
José Fonseca
78dad27564 Revert "scons: Less aggressive optimizations for MSVC 64bit compiler."
This reverts commit fc7f924782.
2009-06-08 11:13:41 +01:00
Brian Paul
cfff2a6189 mesa: bump version to 7.5-rc3 2009-06-05 17:16:47 -06:00
Dan Nicholson
6453605785 osmesa: Link with -ldl for dlopen code
Now that the dlopen wrappers are built into libmesa.a, we need to link
standalone libOSMesa with libdl to resolve dlopen and friends on
platforms that need it.
(cherry picked from commit 4795dd5950)
2009-06-04 19:47:41 -07:00
Dan Nicholson
5df6468589 osmesa: Allow building standalone in all three channel widths
autoconf had been designating the 8 bit libOSMesa as the default
standalone osmesa, but the Makefile expected it to be linked to libGL.
Fix up the osmesa Makefile so that it allows any of the combinations of
standalone and channel width to be built.

Fixes bug #21980.
(cherry picked from commit 7441dcd90b)
2009-06-04 19:47:32 -07:00
Brian Paul
9424d81d18 softpipe: separate case for PIPE_PRIM_POLYGON in sp_vbuf_draw()
Because of flat shading, we can't use same code as PIPE_PRIM_TRIANGLE_FAN.
This is a follow-on to commit a59575d8fb.

(cherry picked from commit 086ecea179)
2009-06-04 13:13:14 -06:00
Brian Paul
6907650211 softpipe: fix incorrect tri vertex order for PIPE_PRIM_POLYGON rendering
This fixes incorrect front/back-face orientation.

(cherry picked from commit a64bbdaa3e)
2009-06-04 13:12:13 -06:00
Brian Paul
d37795c453 st/mesa: increase ST_MAX_SHADER_TOKENS to 8k 2009-06-04 13:10:31 -06:00
Brian Paul
45e744dddc tgsi: increase MAX_LABELS to 4096 2009-06-04 13:10:31 -06:00
José Fonseca
fc7f924782 scons: Less aggressive optimizations for MSVC 64bit compiler.
MSVC 64bit compiler takes forever on some of the files.

Might want to revisit this again later.
2009-06-02 18:41:12 -07:00
José Fonseca
0f50c4fab8 scons: Output nice summary messages instead of long command lines.
You can still get the old behavior by passing the option quiet=no to scons.
2009-06-02 18:23:12 -07:00
José Fonseca
273117ceed util: Unsaved change missing from last commit. 2009-06-02 16:41:45 -07:00
José Fonseca
840af5fd62 util: Support Z24S8/Z24X8 -> unsigned conversion. 2009-06-02 11:46:53 -07:00
José Fonseca
c91df4c153 util: Fix 24 to 32 bit expansion binary arithmetic expression.
When approaching y = x * 0xffffffff / 0xffffff with bit arithmetic, the
8 least significant bits of y should come from the
8 most significant bits of x.
2009-06-02 11:46:06 -07:00
Brian Paul
12e94d892e mesa: release VBO and PBO references upon context destruction 2009-06-02 10:29:39 -06:00
Brian Paul
cb3a9f984d mesa: add #define FEATURE_ARB_pixel_buffer_object 2009-06-02 10:29:38 -06:00
Ian Romanick
16fbd39129 intel: Clip to window after calling Driver.TexImage2D
This prevents the width / height from being clipped to the window size before
the texture is allocated.  This matches intelCopyTexImage1D.

This should fix bug #21227

Signed-off-by: Ian Romanick <ian.romanick@intel.com>
(cherry picked from commit 129f311673)
2009-06-02 16:52:03 +01:00
Keith Whitwell
1aef032d43 gallium/draw: Free specialized versions of driver shaders
The pstipple, aaline and aapoint code would create specialized versions
of shaders and upload them to the driver -- but never free them.
2009-06-01 20:35:38 -07:00
Keith Whitwell
003cfd4dd2 draw: free more token arrays
The AA line and point code also needs to free token arrays after
building driver shaders.
2009-06-01 20:35:38 -07:00
Keith Whitwell
69a765df1c draw: avoid leaking tokens when building pstipple fragment shader
Add missing FREE() after MALLOC().
2009-06-01 20:35:38 -07:00
Keith Whitwell
503632557e mesa/st: restore flush to copy_texsubimage (was previously finish)
Need a flush here even though the original finish was overkill.
2009-06-01 20:34:44 -07:00
José Fonseca
557d2bb423 wgl: Destroy the framebuffer when the window is destroyed. 2009-06-01 20:20:48 -07:00
Keith Whitwell
97f5953ced progs/vpglsl: add similar support for point rendering as progs/vp 2009-06-01 18:40:21 -07:00
Jakob Bornecrantz
f989390af6 st/gl: Fix mip gen for compressed textures 2009-06-01 18:40:12 -07:00
Keith Whitwell
00e7a60077 trivial/tri-z: add controls for depthrange min/max
Also add key to set up quake-1 style ztrick rendering with clear depth
1.0, deptrange(1.0, 0.0) and depthfunc GL_GREATER.
2009-06-01 18:39:58 -07:00
José Fonseca
3c756ed39f progs/wgl: Small cleanup to wglinfo. 2009-06-01 18:23:20 -07:00
José Fonseca
76ad2b4a5a progs/wgl: Use an invisible window in wglinfo. 2009-06-01 18:23:20 -07:00
Brian Paul
0e8a5a8474 st/mesa: fix incorrect sprite origin when drawing to FBO/texture
Need to take the draw buffer's up/down orientation into consideration
when setting the sprite_coord_mode field.

Fixes inverted sprites when drawing into an FBO.
2009-06-01 14:59:11 -06:00
Brian Paul
427554211b draw: reset extra_vp_outputs.slot to zero in widepoint_flush()
Fixes a crash when clearing the window with a quad after drawing large
points.  We were asking the draw module how many vertex shader outputs
there were and got 3 instead of 2.  This led to creating vertices with
too many attributes and trying to read invalid memory.

We reset extra_vp_outputs.slot to zero in the aaline/aapoint stage's
flush functions already.
This omission was just an oversight in the wide_point stage.
2009-06-01 14:28:57 -06:00
Brian Paul
a5d033e89b demos: add missing dependencies for util files 2009-06-01 11:23:39 -06:00
José Fonseca
ea3ee4791e wgl: Cleanup framebuffer destruction logic. 2009-05-31 17:16:26 -07:00
José Fonseca
0ea519f931 wgl: Ensure we only create framebuffers for HDC associated with a window. 2009-05-31 11:10:22 -07:00
José Fonseca
fe69b6bdc7 wgl: Use the right pixel format.
There is no current pixel format. Each HDC has its pixelformat which is
kept by gdi and set/get via the SetPixelFormat/GetPixelFormat functions.

Now the HDC's pixelformat is kept in the stw_framebuffer, which is
created during the SetPixelFormat.
2009-05-30 20:29:03 -07:00
José Fonseca
be7c56be06 wgl: Fix debugging output. 2009-05-30 20:29:03 -07:00