Commit Graph

36127 Commits

Author SHA1 Message Date
Luca Barbieri 4d946c4e8a translate_test: improve
1. Generate random data specifically for float and doubles, so that
   they end up in [0, 1] range
2. Don't test useless conversions like SCALED <-> NORM
3. Poison the buffers before testing
2010-08-12 18:36:21 +02:00
Marek Olšák f668ea11bd Revert "u_blitter: unify clear_depth_stencil and flush_depth_stencil"
This reverts commit de4784e365.
2010-08-12 13:35:16 +02:00
Andre Maasikas e62e5b0922 r600: add support for draw_elements_base_vertex
use VTX_BASE_VTX_LOC for offset, last time using INDEX_OFFSET was
probably a wrong register for this
2010-08-12 12:44:10 +03:00
Vinson Lee 17bcfaa475 mesa: Clean up header file inclusion in prog_uniform.h.
Remove mtypes.h.
Remove prog_statevars.h.
Include glheader.h for GL symbols.
2010-08-12 00:33:48 -07:00
Vinson Lee 791d7d4bf9 mesa: Include missing headers in prog_print.h.
Include stdio.h for FILE symbol.
Include glheader.h for GL symbols.
Include mtypes.h for GLcontext symbol.
Add forward declarations.
2010-08-12 00:27:01 -07:00
Vinson Lee 991a24d033 mesa: Include missing header in prog_optimize.h.
Include mtypes.h for GLcontext symbol.
2010-08-12 00:18:33 -07:00
Dave Airlie 582129ced6 r600g: fix typo in stencil translate.
fixes piglit stencil-twoside and stencil-wrap
2010-08-12 16:32:19 +10:00
Dave Airlie 13bc2098ca r600g: fix provoking-vertex piglit test. 2010-08-12 16:29:04 +10:00
Dave Airlie e2df0a8b23 r600g: improve texture format checker.
This takes the r300g texture format checker and fixes it up for r600g,
it passes glean texSwizzle, pixelformats, and texture_srgb tests,

however I think it L8S8_SRGB is broken as is L8_SRGB, need to investigate.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-12 16:20:31 +10:00
Marek Olšák de4784e365 u_blitter: unify clear_depth_stencil and flush_depth_stencil
No need to enable depth test for clear.
2010-08-12 06:21:24 +02:00
Vinson Lee e1bb9ee7a6 scons: Fix freebsd8 build. 2010-08-11 18:57:27 -07:00
Vinson Lee 4a859cd12f scons: Add freebsd8 to list of accepted platforms. 2010-08-11 17:58:06 -07:00
Marek Olšák 608f168709 r300/compiler: remove an unused variable 2010-08-12 00:39:04 +02:00
Luca Barbieri 39cd4f7ceb translate_test: fix segfault on x86-64 2010-08-11 22:32:20 +02:00
Luca Barbieri 41c7ff11e6 u_staging: remove useless inline keyword 2010-08-11 22:11:19 +02:00
Luca Barbieri 99cc6d70a4 translate_test: fix, reindent, and improve
1. Fix the segfault due to the reverted commit using the new interface
2. Reindent to Mesa 3 spaces style
3. Improve output and return success/failure with error code
4. Add much better support for testing translate_sse
2010-08-11 21:47:28 +02:00
Luca Barbieri 10adb7840c translate: allow clients to ask for supported output formats
Currently translate asserts on unsupported output formats, making
it impossible to use for some purposes, such as testing whether it
actually works on all formats it supports.

Removing the assert was met with opposition, so this change allows
clients to ask whether an output format is supported, and they are thus
able to avoid attempting to use it.

Since this is just an addition to the API, no adverse effect is
possible, and it makes the testsuite work again.
2010-08-11 21:47:27 +02:00
Vinson Lee 27fe2347bc auxiliary: Make u_staging.c MSVC compatible.
Fixes MSVC build.
2010-08-11 12:45:02 -07:00
Vinson Lee f7d7b080a1 translate: Add translate_test.c to SCons.
This is a follow-up to commit 945e38c73b,
which added translate_test.c to make.
2010-08-11 12:18:25 -07:00
Vinson Lee 04cfc6234c auxiliary: Add u_staging.c to SCons build.
This is a follow-up to commit b85c71d4e1
which added u_staging.c to make.
2010-08-11 12:04:54 -07:00
Tom Stellard f78445de5d r300/compiler: Implement the CONT opcode. 2010-08-11 11:39:57 -07:00
Tom Stellard 953e39c61d r300/compiler: Handle loops in the register allocator. 2010-08-11 11:39:57 -07:00
Jerome Glisse 481b65abae r600g: accept empty frag prog shader
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 14:26:07 -04:00
Jerome Glisse 1bb0427a85 r600g: add src negation support
Should fix few glBitmap cases.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 13:50:19 -04:00
José Fonseca b481a1237e gallivm: Fix and enable the extra Newton/Raphson step in lp_build_rcp().
Thanks to Michal for spotting this.
2010-08-11 18:45:26 +01:00
Jerome Glisse 457378e031 r600g: add point/sprite rendering support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 12:20:28 -04:00
Luca Barbieri 5266bc3c60 Revert "translate_generic: return NULL instead of assert(0) if format not supported"
This reverts commit 16b45ca7ce.

José Fonseca asked for a revert.

Note that the testsuite will now segfault since it attempts to test
all possible formats.
2010-08-11 17:01:27 +02:00
Luca Barbieri 684aeb366f translate_generic: fix broken A8R8G8B8_UNORM output
translate was attempting to output A8R8G8B8_UNORM as if it were
R8G8B8A8_UNORM.

Now the tests just added pass.
2010-08-11 16:27:58 +02:00
Luca Barbieri 945e38c73b translate: add testsuite
Currently only checks all possible format conversions, and doesn't
attempt to test whether multiple buffers/elements or indices work.
2010-08-11 16:27:58 +02:00
Luca Barbieri 16b45ca7ce translate_generic: return NULL instead of assert(0) if format not supported
This gives the caller a chance to recover (or crash anyway otherwise).
2010-08-11 16:27:57 +02:00
Luca Barbieri deb809ec98 auxiliary: fix util_framebuffer_copy
util_framebuffer_copy was attempting to copy all elements of the
source framebuffer state.

However, this breaks if the user does not zero initialize the structure.
Instead, only copy the elements up to nr_cbufs, and clear elements up
to dst->nr_cbufs, if the destination was larger than the source.
2010-08-11 16:27:57 +02:00
José Fonseca 10ce6779e8 gallivm: Use lp_build_div instead of lp_build_mul + lp_build_rcp.
Single divide, so let lp_build_div decide how to implement this.

This will save a multiplication in architectures which don't have
a RCP intrinsic.
2010-08-11 15:14:10 +01:00
José Fonseca f8533482f4 gallivm: Use unsigned shift in lp_build_minify.
Texture dimensions are unsigned.
2010-08-11 15:14:10 +01:00
José Fonseca 66f57235d5 llvmpipe: Debug code to dump interpolation coefficients. 2010-08-11 15:14:10 +01:00
José Fonseca 3deca2e284 llvmpipe: Use single precision divide for one over area computation. 2010-08-11 15:14:10 +01:00
Marek Olšák 4b20ad7559 util: copy the u_staging commit message to the code 2010-08-11 15:11:42 +02:00
Luca Barbieri b85c71d4e1 auxiliary: support for transfers using staging resources
Direct3D 10/11 has no concept of transfers. Applications instead
create resources with a STAGING or DYNAMIC usage, copy between them
and the real resource and use Map to map the STAGING/DYNAMIC resource.

This util module allows to implement Gallium drivers as a Direct3D
driver would be implemented: transfers allocate a resource with
PIPE_USAGE_STAGING, and copy the data between it and the real resource
with resource_copy_region.
2010-08-11 13:03:00 +02:00
Luca Barbieri 6f3c4819ec gallium: add ALWAYS_INLINE
Used when we want to be sure the compiler inlines a large function into
an inner loop.
2010-08-11 11:27:46 +02:00
Luca Barbieri 5668526c91 u_surfaces: add util_surfaces_peek
Used to find out if a surface exists without creating one.
2010-08-11 11:20:16 +02:00
Luca Barbieri e45b2ce2c3 u_surfaces: use cso_hash instead of util_hash_table
Using cso_hash directly is the right thing since util_hash_table
adds useless overhead and is harder to use for this application.
2010-08-11 11:19:23 +02:00
Luca Barbieri 24f5ebb1d7 u_surfaces: fix surface leak due to off by one 2010-08-11 11:17:35 +02:00
Luca Barbieri 58b104d7f0 auxiliary: make primitive splitter assert on unimplemented adjacency prims
They are unimplemented, even though the framework makes it possible to
implement them well, and nv50 needs them.
2010-08-11 11:08:51 +02:00
Luca Barbieri eee5cea385 auxiliary: fix u_split_prim naming convention
Current practice is to start identifiers with "util_" instead of "u_".
2010-08-11 11:08:51 +02:00
Luca Barbieri 0dcf0f9dfa auxiliary: move Ben Skeggs' primitive splitter to common code
This is a simple framework that handles splitting primitives in an
abstract way.

The user has to specify the primitive start, start index and count.

Then, it can ask the primitive splitter to "draw" a chunk of the
primitive, staying under a given vertex/index budget.

The primitive splitter will then call user-supplied functions to
emit a range of vertices/indices, as well as switch the edgeflag
on or off.

This is particularly useful for hardware that either has limits
on the vertex count field, or where vertices are pushed on a FIFO
or temporary buffer of limited size.

Note that unlike other splitters, it does not manipulate data in
any way, and merely asks a callback to do so, in vertex intervals.
2010-08-11 11:08:46 +02:00
Vinson Lee 0578acbe18 mesa: Include missing header in prog_noise.h.
Include glheader.h for GLfloat symbol.
2010-08-11 01:10:54 -07:00
Vinson Lee f36a4b3c9e mesa: Clean up header file inclusion in prog_instruction.h.
Remove mfeatures.h.
Include glheader.h for GL symbols.
2010-08-11 01:06:58 -07:00
Vinson Lee c20e92c3e0 mesa: Include missing header in prog_execute.h.
Include mtypes.h for GLcontext symbol.
2010-08-11 00:43:28 -07:00
Vinson Lee 2a5bf7b4d2 mesa: Include missing header in prog_cache.h.
Include mtypes.h for GLcontext symbol.
2010-08-11 00:35:34 -07:00
Vinson Lee 1c5a077e1b mesa: Include missing header in nvvertparse.h.
Include mtypes.h for GLcontext symbol.
2010-08-11 00:33:02 -07:00
Vinson Lee 13887f389f mesa: Include missing header in nvfragparse.h.
Include mtypes.h for GLcontext symbol.
2010-08-11 00:29:26 -07:00