Commit Graph

13435 Commits

Author SHA1 Message Date
Brian Paul 3f6668a4bf mesa: dump/debug varying vars list 2008-11-24 09:03:47 -07:00
Brian Paul 777a5c4f2e mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
Plus, update the print/debug code.
2008-11-24 08:43:38 -07:00
Brian Paul 0f228d7ab3 mesa: add Flags field to gl_program_parameter
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-24 08:33:49 -07:00
Brian Paul 5464667874 docs: update webmaster email addr 2008-11-24 08:14:28 -07:00
Brian Paul 4f05893415 mesa: issue error, don't crash, when calling a prototyped, but undefined function
Bug #18659.
2008-11-21 17:22:16 -07:00
Brian Paul b63a31b36f mesa: better variable name: s/aux/store/ 2008-11-21 14:24:28 -07:00
Brian Paul c45c5c4ca4 added progs/demos/fragcoord.c - tests gl_FragCoord attribute in fragment shader
Fragment's red/greenb/blue is a function gl_FragCoord.xyz
2008-11-21 10:04:37 -07:00
Eric Anholt 3e0164aabb i965: Add support for accelerated CopyTexSubImage.
There were hacks in EmitCopyBlit before to adjust offsets so that y=0 after
the offsets had been adjusted for a negative pitch.  It appears that those
hacks were due to an unclear and surprising aspect of the hardware: inverting
the pitch results in the blit into the specified rectangle being inverted,
without the user needing to adjust y and base offset.

Tested with piglit copytexsubimage test on 915GM and GM965.  Should fix
serious performance issues with ETQW and other applications.
2008-11-21 17:35:33 +08:00
Eric Anholt a6aa926e3f intel: Don't glBitmap fallback with scissoring enabled.
The blit bitmap code already handles scissoring.  This is a 15-100% speedup on
blender benchmark.blend thanks to avoiding fallbacks. Bug #17951.
2008-11-21 13:25:10 +08:00
Eric Anholt 2adef553f2 i915: Don't overwrite i915's Viewport function from generic code.
Instead, have i965 and i915 both call the generic function from their Viewport.
2008-11-21 13:23:46 +08:00
Xiang, Haihao b6bb5e09e0 mesa: fix shadow sampling unit issue.
texture comparison logic is bypassed if the currently bound texture is not
a depth/depth_stencil texture.
2008-11-20 16:54:16 +08:00
airlied 1412ca0be2 intel: fix i830 comment + backwards VB offsets.
According to Keith the docs have these offsets the other way around
2008-11-20 21:27:45 +10:00
airlied 1ea414fdeb intel: fix i8xx vbo enable bit 2008-11-20 21:14:45 +10:00
airlied b17e343bdd intel: add lots of i830 engine to intel_decode debug 2008-11-20 18:18:20 +10:00
Brian Paul bab4e78734 mesa: minor comment reformattting 2008-11-19 16:04:37 -07:00
Brian Paul bf7f9d2143 mesa: glsl compiler debug code
RETURN0 macro reports file/line before returning zero.
2008-11-19 15:08:46 -07:00
Brian Paul ae0ff8097b mesa: rework GLSL array code generation
We now express arrays in terms of indirect addressing.  For example:
  dst = a[i];
becomes:
  MOV dst, TEMP[1 + TEMP[2].y];
At instruction-emit time indirect addressing is converted into ARL/
ADDR-relative form:
  ARL ADDR.x, TEMP[2].y;
  MOV dst, TEMP[1 + ADDR.x];
This fixes a number of array-related issues.  Arrays of arrays and complex
array/struct nesting works now.
There may be some regressions, but more work is coming.
2008-11-19 14:12:25 -07:00
Brian Paul e709d68d92 mesa: don't realloc instruction buffer so often 2008-11-19 09:12:47 -07:00
Brian Paul d9fa9e3290 mesa: updated comment 2008-11-19 09:12:47 -07:00
Xiang, Haihao 2f9ceb158a mesa: clamp luminance if needed.
This fixes glReadPixels(GL_LUMINANCE, GL_FLOAT)/glGetTexImage(GL_LUMINANCE, GL_FLOAT) issue
on fixed-point color buffers.
2008-11-19 11:30:30 +08:00
Brian Paul 80d6379722 mesa: no longer need Writemask field in GLSL IR nodes
The Swizzle and Size fields carry all the info we need now.
2008-11-13 18:19:12 -07:00
Brian Paul 3a7ed9779b mesa: revamp GLSL instruction emit code
This is a step toward better array handling code.  In particular, when more
than one operand of an instruction uses indirect addressing, we'll need some
temporary instructions and registers.  By converting IR storage to instruction
operands all in one place (emit_instruction()) we can be smarter about this.

Also, somewhat better handling of dst register swizzle/writemask handling.
This results in tighter writemasks on some instructions which is good for
SOA execution.

And, cleaner instruction commenting with inst_comment().

Next: remove some more dead code and additional clean-ups...
2008-11-13 18:19:12 -07:00
Brian Paul 610c2461ce mesa: make writemask_string() non-static 2008-11-13 18:19:12 -07:00
Brian Paul 4c167f8fc1 mesa: remove some do-nothing GLSL code 2008-11-13 18:19:12 -07:00
Brian Paul fe984aed5a mesa: fix accidental regression in GLSL built-in texture matrix lookup
Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.
2008-11-13 18:19:12 -07:00
Brian Paul d835f415c6 mesa: use the tighter definition of GLSL ftransform() from the gallium branches 2008-11-13 18:19:12 -07:00
Brian Paul e556cc82f8 mesa: remove unused/obsolete __NormalMatrixTranspose matrix 2008-11-13 18:19:12 -07:00
Brian Paul 47b883e42b mesa: fix bug in GLSL built-in matrix state lookup 2008-11-13 18:19:12 -07:00
Brian Paul 557fde9531 mesa: tweak program register printing for RelAddr case 2008-11-13 18:19:12 -07:00
Alan Hourihane e4c9aeed8b mesa: fix generation of fixed function state when no vp exists 2008-11-13 13:31:10 +00:00
Eric Anholt c30eb2c104 i965: Upload state on primitive switch, don't just prepare it.
This was a regression in 59b2c2adbb that broke
blender, among other apps.
2008-11-12 13:37:16 -08:00
Eric Anholt 2fc9d671e0 i965: Fix VB refcount leak on aperture overflow. 2008-11-12 13:34:20 -08:00
Eric Anholt 72bbc89534 Add glsync demo program from jbarnes for testing vblank synchronization. 2008-11-12 13:07:23 -08:00
Eric Anholt 62ff7ab720 i965: Fix up VS max_threads for G4X and removing a magic number.
As far as I can read in the docs, VS threads can be 1:1 with the pairs of
VUE handles allocated for them.  Also, G4X can run twice as many threads as
before (though we won't unless the we bump the preferred URB entries for VS).
2008-11-12 13:07:23 -08:00
Eric Anholt 9dadfc09a9 i965: Fix up SF max_threads.
We were dividing the number of URB entries by two to get number of threads,
which looks suspiciously like a copy'n'paste-o from brw_vs_state.c.  Also, the
maximum number of threads is 24, not 12.
2008-11-12 13:07:23 -08:00
Eric Anholt 82eb7c235d i965: Fix up clip min_nr_entries, preferred_nr_entries, and max_threads.
The clip thread could potentially deadlock when processing tristrips since
being moved back to dual-thread mode, as the two threads could each have 4 VUEs
referenced and not be able to allocate another one since SF processing
wasn't able to continue (needing 5 entries before it freed 2).
In constrained URB mode, similar deadlock could even have occurred with
polygons (so we cut back max_threads if we can't handle it any primitive type).
2008-11-12 13:07:22 -08:00
Eric Anholt 5cb7ba10cc i965: Update WM maximum threads for G4X. 2008-11-12 13:07:22 -08:00
Eric Anholt d70d62c561 i965: Add a big comment explaining my understanding of URB management.
It shouldn't offer anything new over what's in the docs (except for G4X notes),
but here it's all in one place.
2008-11-12 13:07:22 -08:00
Kristian Høgsberg e1fbb30211 glFlush before CopySubBuffer, fix coordinates and extension name typo. 2008-11-12 15:26:25 -05:00
Hanno Böck becf3d9272 glx: fix xcb build 2008-11-12 06:56:42 -07:00
Brian Paul 90246d3ea5 mesa: fix version check in dinoshade.c 2008-11-11 14:35:39 -07:00
Brian Paul f4361540f8 mesa: allow relative indexing into all register files and indirect dst register indexing 2008-11-11 14:35:39 -07:00
Kristian Høgsberg 57d78067bd Don't mess with emacs tab width. 2008-11-11 13:41:43 -05:00
Xiang, Haihao 09623fe551 intel: reset cliprect_mode to IGNORE_CLIPRECTS.
This ensures all batchbuffers have a same cliprect mode after calling
_intel_batchbuffer_flush even if there aren't invalid commands in the
current batch buffer. (fix bug#18362).
2008-11-11 13:58:15 +08:00
Xiang, Haihao 8412b06b67 mesa: restore the negate flag of dots in build_lighting.
Dots is re-used if more than one light is enabled. Previously
the negate flag of dots may affect next light.
2008-11-11 13:36:32 +08:00
Xiang, Haihao 064b04d464 mesa: update new state for RasterPos like other operations.
This fixes a lighting issue when drawing a bitmap.
2008-11-11 13:35:51 +08:00
Brian be1b8e5d6c mesa: new _mesa_is_pow_two() function 2008-11-10 20:16:00 -07:00
Brian Paul 8df4f6667f mesa: restore glapi/ prefix on #include 2008-11-10 16:38:47 -07:00
Brian Paul 59cc973940 mesa: fix some misc breakage caused by editing auto-generated files rather than the python generators
Specifically:
  #include "glapitable.h" in src/mesa/main/glapi/dispatch.h
  Call _mesa_bsearch() in src/mesa/main/enums.c.
2008-11-10 14:42:02 -07:00
Brian Paul 13f96c5401 GLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()
See bug 18445.
When getting array results, __glXReadReply() always reads a multiple of
four bytes.  This can cause writing to invalid memory when 'n' is not a
multiple of four.

Special-case the glAreTexturesResident() functions now.
To fix the bug, we use a temporary buffer that's a multiple of four bytes
in length.

NOTE: this commit also reverts part of commit 919ec22ecf
(glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protection) which
directly edited the indirect.c file rather than the python generator!
I'm not repairing that issue at this time.
2008-11-10 14:27:42 -07:00