Commit graph

9878 commits

Author SHA1 Message Date
Brian Paul
5f90e76c54 gallivm: fix lp_build_sample_offset() crash when indexing a 1-D texture
If y==NULL and y_stride==NULL it means the texture is 1D.  Return
zero for out_i and the offset instead of garbage.
2010-07-29 19:19:05 +01:00
Keith Whitwell
a258701cd9 util: add uint version of pack_z_stencil
Useful for packing mask values.
2010-07-29 19:15:10 +01:00
José Fonseca
bdaa8be5b7 scons: Use the current python executable for code generation.
Less susceptible to be broken.
2010-07-29 19:11:50 +01:00
José Fonseca
111902f2c4 draw: Also emit EMMS on generated LLVM IR. 2010-07-29 19:11:06 +01:00
José Fonseca
e3d2ebac11 llvmpipe: Avoid corrupting the FPU stack with MMX instructions on 32bit OSes.
Unfortunately LLVM doesn't emit EMMS itself, and there is no
easy/effective way to disable MMX.

http://llvm.org/bugs/show_bug.cgi?id=3287
2010-07-29 19:10:59 +01:00
José Fonseca
38f5b1bc38 util: Don't include xmmintrin.h.
Unnecessary.
2010-07-29 19:10:56 +01:00
Chia-I Wu
ab25c1597d st/python: Adapt to interface change.
This is only compile tested.
2010-07-29 19:40:21 +08:00
Chia-I Wu
d4d62b6178 graw/tests: Use pipe_context::draw_vbo.
The other drawing variants such as draw_arrays or
draw_elements_instanced were removed.

This fixes fdo bug #29287.
2010-07-29 16:21:10 +08:00
Chia-I Wu
92f9b05499 gallium: Avoid void pointer arithmetic.
This fixes fdo bug #29286.
2010-07-29 15:55:14 +08:00
Chia-I Wu
e7f69c459a gallium/docs: Document draw_vbo and set_index_buffer.
Document the new unified drawing method and remove references to old
ones.
2010-07-29 13:45:31 +08:00
Chia-I Wu
a57f842519 gallium: Keep only pipe_context::draw_vbo.
That is, remove pipe_context::draw_arrays, pipe_context::draw_elements,
pipe_context::draw_arrays_instanced,
pipe_context::draw_elements_instanced,
pipe_context::draw_range_elements.
2010-07-29 13:45:31 +08:00
Chia-I Wu
cd3ef7592c gallium: Use unified pipe_context::draw_vbo.
Update u_draw_quad, st/vega, and st/mesa to use pipe_context::draw_vbo.
2010-07-29 13:45:31 +08:00
Chia-I Wu
6d28bf917f gallium: Implement draw_vbo and set_index_buffer for all drivers.
Some drivers define a generic function that is called by all drawing
functions.  To implement draw_vbo for such drivers, either draw_vbo
calls the generic function or the prototype of the generic function is
changed to match draw_vbo.

Other drivers have no such generic function.  draw_vbo is implemented by
calling either draw_arrays and draw_elements.

For most drivers, set_index_buffer does not mark the state dirty for
tracking.  Instead, the index buffer state is emitted whenever draw_vbo
is called, just like the case with draw_elements.  It surely can be
improved.
2010-07-29 13:45:30 +08:00
Chia-I Wu
c5e9d3114a gallium: Add pipe_context::draw_vbo and pipe_context::set_index_buffer.
This commit adds a new unified draw_vbo method to pipe_context.  Unlike
other draw methods, draw_vbo treats the index buffer as a state which is
set with set_index_buffer.
2010-07-29 13:45:30 +08:00
Kristian Høgsberg
aa44bd9189 Untangle gallium/egl/glx source sharing mess and make it compile again 2010-07-28 22:18:58 -04:00
Jerome Glisse
42c1f27149 r600g: state context ptr in sampler_view & add I8/L8 buffer format
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 20:09:15 -04:00
Jerome Glisse
35e044ab56 r600g: switch btw flat/linear interpolation
I am not sure how to properly handle flat shading regarding
non color parameter to fragment shader. It seems we should
still interpolate non color using linear interpolation and
flat shade only apply to color.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:59:38 -04:00
Jerome Glisse
6f0f6c6459 r600g: split pipe state creating/binding from hw state creation
Split hw vs pipe states creation handling as hw states group doesn't
match pipe state group exactly. Right now be dumb about that and
rebuild all hw states on each draw call. More optimization on that
side coming.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:36:16 -04:00
Jerome Glisse
742ee7935d r600g: cleanup resource buffer/texture mess
Use a common function, fix the mess it was before.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 12:18:19 -04:00
Jerome Glisse
b346c4205d r600g: add lrp instruction support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 10:35:32 -04:00
Jerome Glisse
9961a0b92d r600g: actualy fix the literal emission
Previous patch added literal emission to wrong place, we
want to emit literal before emitting a new alu group.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 09:11:14 -04:00
Vinson Lee
8bae190f18 gallium/docs: Fix VMware spelling. 2010-07-28 01:09:40 -07:00
Vinson Lee
da30209afd draw: Fix VMware spelling. 2010-07-28 01:07:03 -07:00
Dave Airlie
2ab24a6fae r600g: fix up segfault with variation between views and count.
For some reason gallium hands us something with lots of empty views, and
we are expected to deal with it, just do what r300g does for this bit.
2010-07-28 15:28:18 +10:00
Corbin Simpson
0a663bb4db gallium/docs: Fix VMware spelling. 2010-07-27 21:43:00 -07:00
Dave Airlie
f514ad0a9b r600g: use gallium util for float->ui conversion 2010-07-28 11:55:09 +10:00
Vinson Lee
b172aebfdf scons: Fix sunos5 build. 2010-07-27 18:13:47 -07:00
Jerome Glisse
641c9adb09 r600g: texture support
Add texture mapping support, redbook/texbind works if
you comment out glClear and second checkboard. Need to
fix :
 - texture overwritting
 - lod & mip/map handling
 - unormalized coordinate handling
 - texture view with first leve > 0
 - and many other things

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-27 20:18:32 -04:00
Brian Paul
25472942c9 llvmpipe: pass face+slice to llvmpipe_unswizzle_cbuf_tile()
Cube map faces and 3D texture slices are treated the same in llvmpipe
textures.  Need to pass the sum of these fields to
llvmpipe_unswizzle_cbuf_tile() as we do elsewhere.

Fixes piglit fbo-3d test (fd.o bug 29135).
2010-07-27 17:42:27 -06:00
Vinson Lee
6a20539580 r600g: Move declaration before code.
Fixes SCons build.
2010-07-27 15:33:45 -07:00
Jakob Bornecrantz
cc09dc2773 swrastg: Add SWRAST_NO_PRESENT option to not send updates to X server
There seem to be a problem with this path and freeglut where
the window wont open if SWRAST_NO_PRESENT is set to true.
2010-07-27 13:54:37 -07:00
Jerome Glisse
2b3b76a4a0 r600g: always emit literal after emiting an alu instruction
Make sure we always fill in the literal after alu instruction.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-27 13:50:11 -04:00
José Fonseca
4fbffb7d90 llvmpipe: Use lp_build_select_bitwise() where appropriate.
Fixes fdo 29269.
2010-07-27 13:09:47 +01:00
José Fonseca
2a45972fb2 gallivm: Add lp_build_select_bitwise() alternative to lp_build_select_bitwise
When

  (mask & a) | (~mask & b)

is meant instead of

   mask ? a : b
2010-07-27 13:09:46 +01:00
Brian Paul
fef5ae949f cell: comment-out unused fields, functions 2010-07-26 20:50:17 -06:00
Brian Paul
dd0cf2e1f5 cell: make functions static 2010-07-26 20:49:54 -06:00
Brian Paul
0315c00f58 cell: fix segfault when freeing samplers 2010-07-26 20:49:35 -06:00
Brian Paul
2a8021667d cell: comment-out unneeded padding field 2010-07-26 20:49:09 -06:00
Brian Paul
d2c714627c cell: added const qualifier 2010-07-26 20:48:46 -06:00
Brian Paul
b17ee335e3 util: fix unused function warning on non-x86 2010-07-26 20:48:29 -06:00
nobled
c88fc26ac9 st/egl: Fix debug line
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-07-26 12:27:21 -07:00
nobled
3cef6c42bc util: fix CPU detection on OS X
s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN.

Acked-by: Vinson Lee <vlee@vmware.com>
2010-07-26 12:27:01 -07:00
nobled
b1ef3e0863 st/xorg: fix use-after-free
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-07-26 12:26:58 -07:00
Jakob Bornecrantz
0697d41fce i965g: Enable llvm in dri driver if built 2010-07-26 12:26:53 -07:00
nobled
4830237660 i915g: Fix llvm build
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-07-26 12:25:05 -07:00
Stephan Schmid
0bebdc230f r600g: implememt the LIT instruction 2010-07-26 10:34:05 -04:00
Marek Olšák
a3a42e4696 util: fix another mutex leak in mempool
By fixing one, I introduced another. Crap.
2010-07-26 14:56:48 +02:00
Marek Olšák
d26fb69169 util: fix mutex leaks in mempool 2010-07-26 14:53:27 +02:00
Dave Airlie
8c26dc2bfe r300g: fix macro substitution problem
isn't a problem yet, but have issues in hiz branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-26 12:02:14 +10:00
Marek Olšák
6f2936c654 r300g: implement D24X8 texture sampling for r3xx-r4xx
Because the hw can't sample it, I reinterpret the format as G16R16 and
sample the G component. This gives 16 bits of precision, which should be
enough for depth texturing (surprisingly, the sampled values are exactly
the same as in D16 textures).

This also enables EXT_packed_depth_stencil on those old chipsets, finally.
2010-07-25 23:40:51 +02:00