Commit Graph

11252 Commits

Author SHA1 Message Date
Brian Paul 345a08a77f intel: added intel_rendering_to_texture() helper function.
When we're rendering to textures we have to invert the viewport transformation.
This helper cleans up that test and can be used elsewhere...
2009-01-16 13:31:04 -07:00
Brian Paul 12c6d28cc7 mesa: remove GL_DEPTH_TEST + no depth buffer test
One could enable depth testing before binding an FBO that has a depth buffer
so this test is no longer useful or correct.
2009-01-16 13:25:41 -07:00
Brian Paul e442fe5ba5 glsl: fix broken sampler assignments 2009-01-16 09:30:58 -07:00
Xiang, Haihao 66a4f5cf9a i915: fallback on transfer mode 2009-01-16 16:06:33 +08:00
Karl Schultz e7c988d065 windows: updated mesa.def file 2009-01-15 07:05:31 -07:00
Brian Paul 4a8356209d glsl: use _mesa_sprintf() 2009-01-15 07:05:30 -07:00
Brian Paul e1ba29ea19 glsl: move declaration before code 2009-01-15 07:05:30 -07:00
Alan Hourihane fbf13bcb8a mesa: check frambuffer complete status before rendering 2009-01-15 11:56:00 +00:00
Brian Paul 8f8435637d mesa: bump version to 7.3-rc2 2009-01-14 17:05:26 -07:00
Brian Paul 7d08091767 glsl: fix comment 2009-01-14 17:05:26 -07:00
Brian Paul b5f32e1d5a glsl: minor clean-up for rect sampler test 2009-01-14 17:05:26 -07:00
Brian Paul 0dffd22349 r300: work-around FRAG_BIT_FOGC warning/error
See bug 17929.

Fog doesn't actually work, but the often complained about warning is
silenced.
2009-01-14 16:49:24 -07:00
Brian Paul 947d1c5b2a i965: asst. fixes, work-arounds for FBOs and render to texture
OpenGL allows mixing and matching depth and stencil renderbuffers in
framebuffer objects while the hardware really only supports interleaved
depth/stencil buffers.  This makes for some tricky buffer management.

An extra wrinkle is the situation where the user allocates a 16bpp depth
texture or renderbuffer then tries to render to it along with a stencil
buffer.  We'd have to promote the 16bpp Z values to 24-bit Z values and
mix in the stencil values to setup the depth/stencil renderbuffer.

There's no support for that now, so always allocate 32bpp depth textures/
renderbuffers for now.
2009-01-14 16:49:24 -07:00
Brian Paul c7f43543af i965: fix incorrect renderbuffer DataType assignment 2009-01-14 16:49:24 -07:00
Brian Paul 5912cdff3e i965: fix some FBO depth/stencil assertions 2009-01-14 16:49:24 -07:00
Ian Romanick 03188b09e0 intel: SW fallback maps texture images, not texture coordinates 2009-01-14 12:48:22 -08:00
Brian Paul fae9604727 glsl: propagate pragma info down into compiler from preprocessor 2009-01-14 12:16:00 -07:00
Brian Paul b5f89e5f17 glsl: simplify IR storage for samplers
Don't overload the Size field with the texture target, to avoid confusion.
2009-01-14 11:58:45 -07:00
Brian Paul c12d24b513 mesa: fix incorrect transformation of GL_SPOT_DIRECTION
This was changed between GL 1.0 and 1.1.  Mesa still had the 1.0 behaviour.
2009-01-14 11:51:30 -07:00
Ian Romanick 2549c26a8b Treat image units and coordinate units differently.
Previously MaxTextureUnits was used to validate both texture image
units and texture coordinate units in fragment programs.  Instead, use
MaxTextureCoordUnits for texture coordinate units and
MaxTextureImageUnits for texture image units.

Fixes bugzilla #19468.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2009-01-14 10:09:01 -08:00
Alan Hourihane a98dccca36 glsl: fix regression from sampler arrays commit 2009-01-14 16:34:19 +00:00
Brian Paul 1b3e3e6b84 i965: indentation fixes 2009-01-14 08:34:07 -07:00
Brian Paul 49b53407c7 i965: allow larger AA points on fallback path 2009-01-14 08:34:06 -07:00
Brian Paul d911e3e24f i965: fix indentation 2009-01-14 08:34:06 -07:00
Brian Paul 658ab3c3ae i965: comment for emit_kil() 2009-01-14 08:34:06 -07:00
Brian Paul 8f7349dbb4 mesa: put _NV suffix on a few opcodes 2009-01-14 08:34:06 -07:00
Brian Paul d687476edd i965: fix indentation 2009-01-14 08:34:06 -07:00
Xiang, Haihao c157a5bb91 intel: bump driver date 2009-01-14 09:32:55 +08:00
Alan Hourihane 14eca6b573 glsl: fix a comment typo 2009-01-14 00:12:59 +00:00
Alan Hourihane ef0e0f2550 glsl: support sampler arrays. 2009-01-14 00:12:33 +00:00
Brian Paul 01a0938776 glsl: add preprocessor support for #pragma
Two forms are supported:

Pragmas are silently ignored at this time.
2009-01-13 15:09:40 -07:00
Karl Schultz 00c02626d8 windows: try to create a context in wglCreateLayerContext() 2009-01-13 09:02:04 -07:00
Brian Paul eeeed45c2c i965: fix glDrawPixels Z coordinate in intel_texture_drawpixels().
As for glBitmap, it needs to be an NDC coord in [-1,1].
2009-01-12 15:47:57 -07:00
Brian Paul 3a5463d158 i965: fix broken glBitmap + depth test
When we use the do_blit_bitmap() function, it seems the fragment Z is always
1.0.  If depth testing is on, that means that bitmap fragments are often
occluded by other rendering.  So, the bitmap doesn't appear even if
rasterpos.Z==0.
The fix is to use the intel_texture_bitmap() path when depth testing is on.
Also, fix the incorrect Z coordinate.  It needs to be an NDC value in [-1,1].
2009-01-12 15:43:54 -07:00
Brian Paul de35989cde i965: fix broken ARB fp fog options
Just call _mesa_append_fog_code() if the fragment program's FogOption is
not GL_NONE.
This allows us to remove some unnecessary i965 fog code.
Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG).
2009-01-12 14:24:45 -07:00
Brian Paul 06fdb6a74c glsl: better fix for for-loop scope issue (commit 6333005f7a) 2009-01-12 08:52:54 -07:00
Matthieu Herrb 436024561a Build fixes for gcc 2.95 2009-01-11 16:56:34 -07:00
Matthieu Herrb 0f0922f93c Big endian fixes. 2009-01-11 16:44:54 -07:00
Matthieu Herrb 33f6dc3c33 build fix on big endian OpenBSD architectures. 2009-01-11 16:44:52 -07:00
Matthieu Herrb 356428d4e4 replace nearbyint() by rint() for now. 2009-01-11 16:44:50 -07:00
Owain G. Ainsworth b4866f8a52 Fix build with GCC 2.95. 2009-01-11 16:44:40 -07:00
Matthieu Herrb 297a9606ea __builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
Patch suggested by miod@. Thanks.
2009-01-11 16:44:36 -07:00
Brian Paul 287102ddcc mesa: deprecate GL/amesa.h header (allegro driver) 2009-01-10 12:04:39 -07:00
Brian Paul f5979b0c15 mesa: deprecate the GL/fxmesa.h header 2009-01-10 12:01:40 -07:00
Brian Paul 1636328b0a xmesa: deprecate the "XMesa" interface
Move the include/GL/xmesa*.h files to src/mesa/drivers/x11/ so they're no
longer considered public.
2009-01-10 11:57:13 -07:00
Brian Paul 6333005f7a glsl: force creation of new scope for for-loop body
Fixes regression in progs/demos/convolution.c due to loop unrolling.
This also allows the following to be compiled correctly:
for (int i = 0; i < n; i++) {
   int i;
   ...
}
This fix is a bit of a hack, however.  The better fix would be to change
the slang_shader.syn grammar.  Will revisit that...
2009-01-10 11:40:20 -07:00
Brian Paul 1d352b42a1 glsl: replace 0/1 with GL_FALSE/GL_TRUE 2009-01-10 11:39:05 -07:00
Ian Romanick 9939a306f7 swrast: Fix GL_ATI_separate_stencil
GL_ATI_separate_stencil is enabled by default for software
rasterizers, but the extension functions weren't hooked up to the
dispatch table.
2009-01-09 16:44:08 -08:00
Brian Paul ca03e881a8 glsl: make minimum struct size = 2, not 1
1-component structs such as "struct foo { float x; }" could get placed at
any position within a register.  This caused some trouble computing the
field offset which assumed all struct objects were placed at R.x.
It would be unusual to hit this case in normal shaders.
2009-01-09 09:59:49 -07:00
Brian Paul acd99f67cc glsl: fix typo in the vec2 += operator function 2009-01-08 17:07:28 -07:00