Commit Graph

42720 Commits

Author SHA1 Message Date
Dave Airlie 9c16fcc617 rgtc: shared the compressor code between signed/unsigned
No idea why I didn't do it like this the first time, but share
the code like other portions of mesa do using _tmp.h suffix
and some #defines for the types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 11:57:51 +10:00
Brian Paul 7b3bec87df vbo: silence unused var warning 2011-02-28 18:34:06 -07:00
Brian Paul 125b4ac7e6 softpipe: remove redundant draw_flush() call
We'll flush after the same-shader comparison.
2011-02-28 18:25:41 -07:00
Brian Paul e6f3e24330 draw: setup pipe's draw pointer for the aapoint stage
The other draw stages like aaline and pstipple were already doing this.
If the driver used the aapoint stage but not the others it would crash
because of a null pipe->draw pointer.
2011-02-28 18:25:37 -07:00
Brian Paul b70610b982 mesa: move PBO-related functions into a new file 2011-02-28 18:24:35 -07:00
Brian Paul 7d8db55148 mesa: always generate error in glColorTableParameter[fi]v()
These were only used by GL_SGI_texture_color_table, which is gone now.
2011-02-28 18:24:30 -07:00
Brian Paul 9d20849516 mesa: remove GL_SGI_texture_color_table support
It was only implemented in the swrast driver and probably not used by
any applications.  A modern app would use a dependent/chained texture
lookup in the fragment shader.
2011-02-28 18:24:30 -07:00
Brian Paul 7e161bcf11 svga: add assertions in svga_shader_type() 2011-02-28 18:24:30 -07:00
Brian Paul c6991433ef mesa: consolidate framebuffer target lookup code 2011-02-28 18:24:25 -07:00
Brian Paul fec26193fb mesa: remove some old do-nothing code 2011-02-28 18:24:25 -07:00
Brian Paul 1f9a0a4e6e mesa: reduce calls to _mesa_test_framebuffer_completeness()
when updating/validating framebuffer state.  The _Status field is set
to zero when we need to recompute _Status.  Otherwise, it's up to date.
2011-02-28 18:24:25 -07:00
Brian Paul b0fceae22f mesa: reduce calls to _mesa_test_framebuffer_completeness()
when doing glCopyTex[Sub]Image() and checking the source buffer's
completeness.
We only need to determine FBO completeness when the status is indeterminate.
2011-02-28 18:24:20 -07:00
Brian Paul ca1b551562 mesa: s/mesaFormat/attFormat/ 2011-02-28 18:23:23 -07:00
Marek Olšák 790c731409 r300g: set the correct HiZ clear value 2011-03-01 01:46:27 +01:00
Marek Olšák 4609be4410 r300g: update derived state before uploading vertex buffers
The function may invoke blitter, which invalidates vertex buffers.
2011-03-01 00:46:58 +01:00
Marek Olšák fbedd9c73a u_vbuf_mgr: compute user buffer size for instance data from instance_count 2011-03-01 00:46:58 +01:00
Marek Olšák 2f665885cd r300g: fix printing whether Z compression is enabled 2011-03-01 00:46:58 +01:00
Marek Olšák ebf69f2c50 r300g: disable HiZ permanently if the the depth function is inverted
Instead of temporarily.

The HiZ function (something like a depth function) is a property
of a HiZ buffer and can only be changed during HiZ clears.
2011-03-01 00:46:54 +01:00
Marek Olšák d99ec708af r300g: fix HiZ memory size computation and deciding when to use HiZ
I removed the HiZ memory management, because the HiZ RAM is too small
and I also did it in hope that HiZ will be enabled more often.

This also sets aligned strides to HIZ_PITCH and ZMASK_PITCH.
2011-03-01 00:23:11 +01:00
Alex Deucher 5f44fab5a6 r600g: add missing evergreen INT_TO_FLT to r600_bc_get_num_operands
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-28 17:21:26 -05:00
Dave Airlie 3f600047d9 rgtc: fix void pointer arith.
should fix scons build.
2011-03-01 06:47:00 +10:00
Kenneth Graunke 0a163cf56d glsl: Enable GL_OES_texture_3D extension for ES2. 2011-02-28 10:35:57 -08:00
Kenneth Graunke eb639349e2 glsl: Use reralloc instead of plain realloc.
Plugs a memory leak when compiling shaders with user defined structures.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-28 10:35:40 -08:00
Jerome Glisse c33e091d17 r600g: indentation fixes
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-02-28 13:33:13 -05:00
Marek Olšák ab824a0722 r300g: initialize SC_SCREENDOOR 2011-02-28 12:43:26 +01:00
Marek Olšák d1dbbf7bf4 r300g: disable hyper-z on rs6xx+
It doesn't work.
2011-02-28 12:28:07 +01:00
Vinson Lee 93893139a4 mesa: Add texcompress_rgtc.c to SConscript. 2011-02-27 23:17:49 -08:00
Dave Airlie e107a3aa08 rgtc: update docs 2011-02-28 13:43:32 +10:00
Dave Airlie 83ebc01c1d mesa/st: add RGTC format support.
this just adds a format check + format conversion.
2011-02-28 13:35:35 +10:00
Dave Airlie 903726d285 swrast: add RGTC support 2011-02-28 13:35:35 +10:00
Dave Airlie 8d47c91985 mesa: Add RGTC texture store/fetch support.
This adds support for the RGTC unsigned and signed
texture storage and fetch methods.

the code is a port of the DXT5 alpha compression code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 13:35:34 +10:00
Dave Airlie e792e79f5a mesa: make_float_temp_image non-static
We need this to do signed stuff for RGTC.
2011-02-28 13:34:25 +10:00
Dave Airlie e3709c26a6 rgtc: llvmpipe/softpipe refuse RGTC until u_format has support.
So far I haven't implemented the u_format code for these.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 13:34:25 +10:00
Dave Airlie 0495425dc3 r300g: force swizzles for RGTC
still can't get signed to work
2011-02-28 13:21:44 +10:00
Christian König 96bbc627f3 r600g: implement instanced drawing support 2011-02-28 02:19:39 +01:00
Christian König bce4f9ac39 st/mesa & v_bug_mgr: two small instanced drawing fixes 2011-02-28 02:19:39 +01:00
Dave Airlie 0a17444133 Revert "r600g: Don't negate result of ABS instruction"
This reverts commit b6d4021393.

This actually breaks gears here on my rv670.
2011-02-28 11:10:35 +10:00
Fabian Bieler 0ab7dcddb3 r600g: Process TRUNC with tgis_op2
TRUNC is neither a scalar instruction nor exclusive to the Trans unit.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 09:22:16 +10:00
Fabian Bieler b6d4021393 r600g: Don't negate result of ABS instruction
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 09:21:41 +10:00
Daniel Vetter d42c9433b0 i915g: implement cache flushing
With an extremely dumb strategy. But it's the same i915c employs.

Also improve the hw_atom code slightly by statically specifying the
required batch space. For extremely variably stuff (shaders, constants)
it would probably be better to add a new parameter to the hw_atom->validate
function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 22:10:46 +01:00
Daniel Vetter f90fa55347 i915g: buffer validation for blitter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 22:03:51 +01:00
Daniel Vetter 342016010a i915g: buffer validation for render state
Also contains the first few bits for hw state atoms.

v2: Implement suggestion by Jakob Bornecrantz.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 21:57:31 +01:00
Daniel Vetter 3c59b3eb4b i915g/winsys: buffer validation support
v2: Add the batch bo to the libdrm validation lost, for otherwise
libdrm won't take previously used buffers into account.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 18:49:56 +01:00
Daniel Vetter e20c3255e2 i915g: add raw batchbuffer dumping in drm winsys
These files can be decoded with intel_dump_decode from the intel-gpu-tools
available at:

http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 16:32:38 +01:00
Daniel Vetter f58c11af72 i915g: cleanup static state calculation, part 2
Now also for the DRAW_RECT command

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 15:58:13 +01:00
Daniel Vetter beaf039f97 i915g: cleanup static state calculation, part 1
Move it to i915_state_static.c This way i915_emit_state.c only emits
state and doesn't (re)calculate it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-27 15:58:03 +01:00
Kenneth Graunke a385ac6207 glsl/builtins: Fix return type for textureSize sampler2DArray variants.
A copy and paste error.
2011-02-27 00:44:47 -08:00
Eric Anholt 5f889c5bf5 glx: Adjust the MESA_multithread_makecurrent spec to match implementation.
This came out of discussion at the office today, and we agreed that
solving this for indirect wasn't really interesting, though the
server-side change would be of a similar level of difficulty.
2011-02-26 12:43:15 -08:00
Eric Anholt dea5e57861 intel: Use the current context rather than last bound context for a drawable.
If another thread bound a context to the drawable then unbound it, the
driContextPriv would end up NULL.

With the previous two fixes, this fixes glx-multithread-makecurrent-2,
despite the issue not being about the multithreaded makecurrent.
2011-02-26 12:43:15 -08:00
Eric Anholt 74cde6505c dri2: Don't call the dri2 flush hook for swapbuffers unless we have a context.
The driver only has one reasonable place to look for its context to
flush anything, which is the current context.  Don't bother it with
having to check.
2011-02-26 12:43:15 -08:00