Commit graph

92185 commits

Author SHA1 Message Date
José Fonseca
0013796948 gallium: Conditionally use posix libraries/includes. 2008-02-07 19:59:37 +09:00
Eric Anholt
700a77fb48 [915] Fix COS function using same plan as SIN.
The previous COS function failed badly outside of [-pi/2, pi/2].
2008-02-06 15:43:05 -08:00
Eric Anholt
2551a5ee80 [915] Use a quartic term to improve the accuracy of SIN results.
This is described in the link in the comment, and is the same technique that
r300 uses.
2008-02-06 15:40:32 -08:00
Eric Anholt
d98abcbef0 [915] Fix fp SIN function, and use a quadratic approximation instead of Taylor.
The Taylor series notably fails at producing sin(pi) == 0, which leads to
discontinuity every 2*pi.  The quadratic gets us sin(pi) == 0 behavior, at the
expense of going from 2.4% THD with working Taylor series to 3.8% THD (easily
seen on comparative graphs of the two).  However, our previous implementation
was producing sin(pi) < -1 and worse, so any reasonable approximation is an
improvement.  This also fixes the repeating behavior, where the previous
implementation would repeat sin(x) for x>pi as sin(x % pi) and the opposite
for x < -pi.
2008-02-06 15:26:00 -08:00
Brian
c4e0d725dc Cell: silence unused var warnings 2008-02-06 09:48:56 -07:00
Brian
2ed6604f50 gallium: #include p_debug.h since we use assert 2008-02-06 09:48:37 -07:00
Brian
c0235d0a24 Cell: use mem_dup() 2008-02-06 09:35:39 -07:00
Brian
f12d641ab2 gallium: use mem_dup() 2008-02-06 09:35:39 -07:00
Brian
c8af89cf72 gallium: added mem_dup() 2008-02-06 09:35:39 -07:00
Brian
31c98eafb0 gallium: change pipe->texture_create() to operate like the CSO functions
Now, pass in a template object and return a new object.
2008-02-06 09:35:39 -07:00
Brian
f52f5136e6 clean-ups in guess_and_alloc_texture() 2008-02-06 09:35:39 -07:00
Brian
2440ff74d6 plug in ctx->Driver.GenerateMipmap function 2008-02-06 09:35:39 -07:00
Brian
4c2f3dbca9 Added ctx->Driver.GenerateMipmap() driver hook 2008-02-06 09:35:39 -07:00
Brian
afc5498337 clean-ups 2008-02-06 09:35:39 -07:00
Brian
105b3596be added comment 2008-02-06 09:35:39 -07:00
Brian
a4fbf09673 comments, clean-ups, consts 2008-02-06 09:35:39 -07:00
Brian
71984d76aa clean-up 2008-02-06 09:35:38 -07:00
Brian
4650b35846 gallium: add bitmap/drawpixels texcoord bias support
The state tracker will call pipe->get_paramf(PIPE_CAP_BITMAP_TEXCOORD_BIAS)
to get a bias factor for adjusting the texcoords used in bitmap/drawpixels.
This allows us to compensate for small differences in rasterization from
one device to another.
2008-02-06 09:35:38 -07:00
José Fonseca
af6b12cc76 gallium: Bring latest fixes. 2008-02-07 01:07:49 +09:00
José Fonseca
9791d7f64c gallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions. 2008-02-06 14:37:49 +09:00
José Fonseca
78bce9c2dc gallium: Add forgotten return type. 2008-02-06 14:37:24 +09:00
José Fonseca
81b6a801f7 gallium: Update scons instructions. Propagate user environment. 2008-02-06 14:36:50 +09:00
José Fonseca
a31d289de6 gallium: Cross-platform debugging helpers. 2008-02-06 13:27:49 +09:00
José Fonseca
5e2d0517b1 gallium: Portability guidelines. 2008-02-06 12:56:35 +09:00
Brian
e39fccc34c Cell: remove accidentally added OPT_FLAGS lines 2008-02-05 15:12:18 -07:00
Brian
1730f7bad4 Cell: SIMD-ize tri_linear_coeff(), use vector float for vertex attributes in struct vertex_header 2008-02-05 15:08:06 -07:00
Brian
4da82fd5c5 Cell: re-enable inlined vertex buffers
Vertex data must be on a 16-byte address/offset so SIMD operations will work
properly in the SPU code.
2008-02-05 15:08:06 -07:00
Brian
2174890ed0 Cell: remove dummy fields, update/add some comments 2008-02-05 15:08:06 -07:00
Brian
b0974420f4 Cell: added cell_batch_alloc_aligned() 2008-02-05 15:08:06 -07:00
Eric Anholt
c0e026c809 [965] Bug 14314: assertion failure with with !AIGLX and depth=24 visual. 2008-02-05 11:01:14 -08:00
Eric Anholt
d14d36f9cc [965] Fix TTM relocation caching overzealousness.
The failure mode that was a available was:
reloc 1 -> target_buf
exec: PRESUMED_OFFSET wrong, buffer migrates, r1 entry updated.
reloc 2 -> target_buf
exec: suppose buffer migrates again.  PRESUMED_OFFSET wrong. r2 entry updated.
reloc 1 -> target_buf
exec: suppose buffer doesn't migrate.  PRESUMED_OFFSET right. no relocations
      performed.  r1 has stale pointer at original location.

Failures were reported with OGLconform's VBO test and SPECviewperf90, though
I haven't confirmed that this fixes it.
2008-02-05 11:01:14 -08:00
Ian Romanick
c9f98142b6 Use _transpose_matrix4x4 from Cell SDK instead of my own version 2008-02-05 09:44:33 -08:00
Ian Romanick
45f4125fa8 Add some debug messages 2008-02-05 09:44:33 -08:00
Ian Romanick
e8a80c8627 More semi-trivial vectorization in the shader VM 2008-02-05 09:44:33 -08:00
Ian Romanick
490a7b1c73 Vectorize vertex puller 2008-02-05 09:44:33 -08:00
Ian Romanick
8fc2355949 Vectorize all micro ops
Fold single instruction micro ops inline.  Remove unused micro ops.
2008-02-05 09:44:33 -08:00
Ben Skeggs
9bd17ea3a3 nv40: cleanup state handling a bit 2008-02-06 02:25:14 +11:00
Michal Krol
45b18c51c0 gallium: Use align_free to free aligned memory. 2008-02-05 07:50:56 -07:00
Xiang, Haihao
89faa648a5 i965: adjust the byte order of clear color. fix #14165 2008-02-05 15:17:58 +08:00
Eric Anholt
fd776e10b3 Replace usage of DRM_BO_FLAG_MEM_TT in intel_regions.c with local/cached.
In addition to potentially binding when it was about to be mapped anyway,
failure to use CACHED_MAPPED means eating a full wbinvd on validate.  Thanks to
airlied for catching this.
2008-02-04 18:24:16 -08:00
Eric Anholt
745df749cc Include glext.h in the cva test so that it actually uses CVAs. 2008-02-04 18:24:16 -08:00
Eric Anholt
5857e988be Allow first != 0 in mesa CVA handling, and add more error checking. 2008-02-04 18:24:16 -08:00
Eric Anholt
2abcc512a3 [965] Convert brw_draw_upload to managing dri_bos, not gl_buffer_objects.
This helps us avoid a bunch of mess with gl_client_arrays that we filled
with unused data and confused readers.
2008-02-04 18:24:16 -08:00
Eric Anholt
0907c639c8 [965] Remove dead structure in brw_draw_upload.c. 2008-02-04 18:24:16 -08:00
Eric Anholt
7b8892f504 [965] Move temporary vbo array storage into the function using it. 2008-02-04 18:24:16 -08:00
Eric Anholt
c86ec87830 [965] Remove dead brw_vertex_element members. 2008-02-04 18:24:16 -08:00
Eric Anholt
4e13067d0f [965] Add a wrapper around interleaved copy_array_to_vbo_array for profiling.
If compiled with optimization, it shouldn't appear at all, and helps me for
now.
2008-02-04 18:24:16 -08:00
Eric Anholt
df44fefced [965] Avoid overloaded use of the term 'input' for clarity. 2008-02-04 18:24:16 -08:00
Eric Anholt
931685e243 [965] Replace VEP/VBP state structures with inline batch emits. 2008-02-04 18:24:15 -08:00
Brian
5db1593c78 Cell: fix some alignment issues by aligning commands to 8-byte boundaries
Contributed by Ian Romanick.
Also, temporarily disable inlined vertex buffers.  They need to be 16-byte
aligned...
2008-02-04 18:05:37 -07:00