Commit Graph

13527 Commits

Author SHA1 Message Date
Brian Paul aa1b904636 mesa: checkpoint: handle uniform vars in _slang_gen_var_decl()
This allows uniform declarations with scalar/array initializers.
The code is rough though, and will be cleaned up.
2008-12-15 16:44:55 -07:00
Brian Paul a9475cc240 mesa: use IFLOOR(x) instead of (int) FLOORF(x) 2008-12-12 18:03:48 -07:00
Brian Paul 3b61e9c6e6 mesa: place glsl constant arrays in constant memory
For example, a declaration like
   const float[3] xxx = float[3](1.1, 2.2, 3.3);
will place the array in the constant buffer whereas a regular, non-const array
would be placed in the temporary register file.
Next up: do the same thing for uniform arrays.
2008-12-12 18:00:47 -07:00
Brian Paul 0da44c62cc mesa: remove old size=4 limit 2008-12-12 18:00:19 -07:00
Brian Paul d4be09fb2b mesa: code clean-up in glsl compiler 2008-12-12 16:20:31 -07:00
Brian Paul 240e211c71 mesa: remove unneeded swizzle init code in glsl compiler 2008-12-12 16:02:31 -07:00
Brian Paul 4d49fc83f1 mesa: disable glsl debug output 2008-12-12 15:34:58 -07:00
Brian Paul 81253be334 mesa: remove unused varpool code in glsl compiler 2008-12-12 15:11:08 -07:00
Brian Paul 5c0c5e5af9 mesa: basic array constructors work now
For example: float[3] xxx = float[3](1.1, 2.2, 3.3);

Optimizations for const-qualified arrays next.
2008-12-12 15:07:21 -07:00
Brian Paul c20d00f04b mesa: copy array_len in slang_fully_specified_type_copy() 2008-12-12 15:01:00 -07:00
Brian Paul 9016331d0f mesa: remove incorrect array_len assignment 2008-12-12 15:00:06 -07:00
Brian Paul 87a00959ba mesa: array size fix in _slang_typeof_operation() 2008-12-12 13:18:30 -07:00
Brian Paul 8571401d7d mesa: fix some more GLSL 1.20 array things.
Function that return arrays should work now.
2008-12-12 13:05:29 -07:00
Brian Paul d5367622a3 mesa: more glsl function renaming 2008-12-12 10:32:56 -07:00
Brian Paul b4019483de mesa: use _slang_alloc() 2008-12-12 10:29:15 -07:00
Brian Paul 456a4e274f mesa: glsl compiler function renaming 2008-12-12 10:22:47 -07:00
Brian Paul 9a174ef409 mesa: more glsl type/function movement 2008-12-12 10:17:58 -07:00
Brian Paul aeeb9bca27 mesa: move some glsl compiler functions to different files to be more consistant 2008-12-12 10:11:41 -07:00
Brian Paul ea9dc3879f mesa: move _slang_locate_function() to different file 2008-12-12 10:03:31 -07:00
Brian Paul 19ca2908be mesa: remove unused fixup table code in glsl compiler 2008-12-12 09:58:18 -07:00
Brian Paul ade777ea1b mesa: checkpoint: GLSL 1.20 array constructors 2008-12-12 09:56:13 -07:00
Brian Paul 1737f2dbdd mesa: consolidate variable declaration initializer code for globals too 2008-12-11 19:34:43 -07:00
Brian Paul 2760bca1e1 mesa: move variable initializer IR generation into _slang_gen_var_decl()
More code consolidation coming...
2008-12-11 19:28:22 -07:00
Brian Paul 05ed9f7fe9 mesa: simplify some glsl variable declaration code 2008-12-11 19:10:58 -07:00
Brian Paul 929eb00b32 mesa: glsl clean-ups 2008-12-11 18:49:28 -07:00
Brian Paul 2dc3de016c mesa: checkpoint commit of GLSL 1.20 array syntax.
This allows things like float[3] x = float[3](1., 2., 3.);

Parsing and AST construction now.  Codegen not working yet.
2008-12-11 18:02:19 -07:00
Brian Paul e8f5c1a5e8 mesa: in slang linker, replace assertion with link error when max samplers exceeded 2008-12-09 14:30:42 -07:00
Brian Paul 3c7419d57b demos: updated tests/floattex.c (doesn't work just yet). 2008-12-09 14:29:14 -07:00
Brian Paul c89690f765 mesa: move _mesa_dlopen(), etc into separate dlopen.c file 2008-12-09 14:26:02 -07:00
Brian Paul 5295f9a033 glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
Set GLUT_PPM_FILE to the desired filename.  The first frame rendered will
be written to that file.
2008-12-09 10:23:14 -07:00
Pierre Willenbrock a0d5c3cfe6 intel: Require the right amount of space in glBitmap blit acceleration.
This leads to problems when the batchbuffer is flushed, but the bitmap
data could not fit into it.
2008-12-08 14:06:51 -08:00
Eric Anholt f849d364c2 mesa: Fix GenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB).
The ctx->Driver.GenerateMipmap() hook only expects cubemap face enums, not
CUBE_MAP_ARB, so walk all faces when we encounter that.  Fixes oglconform
fbo.c segfault with both swrast and i965 drivers.
2008-12-06 22:41:52 -08:00
Eric Anholt 8b661a5d33 intel: Fall back on rendering to a texture attachment with a border.
Fixes a segfault in oglconform fbo.c test.
2008-12-06 22:41:52 -08:00
Eric Anholt 75b26e18a6 intel: Fix crash in automatic mipmap generation for glCopyTex{Sub,}Image.
The images aren't mapped at this point, so we want the generic Mesa path for
GenerateMipmapEXT that does the mapping/unmapping for us.  Ideally Mesa would
just call it for us.
2008-12-06 22:41:52 -08:00
Eric Anholt a0625fa281 intel: Fix glCopyPixels blit acceleration for FBO destinations.
This was another opportunity to either get clipped to screen size or not get
clipped enough and draw outside of object boundaries.
2008-12-06 22:41:51 -08:00
Eric Anholt cb433d91c6 intel: Fix glBitmap blit acceleration for FBO destinations.
Bug #18914.  Fixes fbo_firecube hang due to drawing outside the FBO bounds.
Thanks to Pierre Willenbrock for debugging the issue.
2008-12-06 22:41:51 -08:00
Eric Anholt bdc8ac4426 intel: Put CopyTexImage fallback under DEBUG_FALLBACKS not DEBUG_TEXTURE. 2008-12-06 22:41:51 -08:00
Brian 6e0f8b174d mesa: assorted clean-ups, updated comments, etc. 2008-12-05 09:20:06 -07:00
Brian 249e1e4d30 mesa: replace large macros with inline functions 2008-12-05 09:20:06 -07:00
Brian 39091cc638 demos: added simple vertex shader texture test.
Draw a quadmesh where Z coord is taken from a texture map.
2008-12-03 18:55:25 -07:00
Jeremy Huddleston f18880038b darwin: Use -Os instead of -O2
(cherry picked from commit 456dbb143a0d11b69d8af0d493cd84efb0596273)
2008-12-03 17:03:35 -08:00
Eric Anholt 264cba6f70 i965: Fix failure to upload new constant data when changing programs.
This is fallout from the ffvertex_prog.c work.  It doesn't call
ProgramStringNotify, so we don't set param_state, so we wouldn't track when
VP parameters changed, and constants wouldn't get uploaded.  Instead, remove
param_state entirely and just use the real value that we want to be tracking.

Fixes rendering in openarena since BRW_NEW_BATCH got disentangled from
BRW_NEW_INDICES.

Bug #18822.
2008-12-03 11:45:16 -08:00
Eric Anholt 8a1e7086c7 i965: Fix stray character that the compile whined about. 2008-12-03 11:30:58 -08:00
Kristian Høgsberg 154a9e5317 Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol. 2008-12-01 21:44:03 -05:00
Dave Airlie cd031749a7 intel: restore old vertex submit paths for i8xx hardware.
Intel docs state that only 830/845 have VBOs, 855/865 don't. So
lets just not use them on i8xx at all.

This restores the old pre-vbo code and uses it on all 8xx hw.
2008-12-02 20:31:14 +10:00
Brian 1e2f574251 mesa: fix conditional in save_Lightfv(), bug 18838 2008-12-01 18:32:47 -07:00
Eric Anholt e476acb105 i965: Add a new state flag BRW_NEW_NR_SURFACES instead of CACHE_NEW_SURFACE
The CACHE_NEW_SURFACE bit always gets spammed since we get many different
surface BOs per state emit, but the only consumer of it wanted to just know
how many surfaces were enabled.
2008-11-28 17:09:46 -08:00
Eric Anholt 8e5639577c i965: Fix clashing enums for BRW_NEW_INDICES/VERTICES versus BATCH/DEPTH_BUFFER.
Fixes upload of large amounts of state for every new primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt 287d719a93 i965: Remove BRW_WM_LOCK dirty bit, introduced to work around lack of relocs.
This was causing a prepare of wm state at every primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt 3f973de07c i965: Add debug code for dumping how frequently different dirty bits are set. 2008-11-28 17:09:46 -08:00