mesa.git
14 years agoutil: Generate correct format conversions for half floats.
Michal Krol [Thu, 1 Apr 2010 11:56:03 +0000 (13:56 +0200)]
util: Generate correct format conversions for half floats.

14 years agoutil: Use u_half to perform half <--> float conversions.
Michal Krol [Thu, 1 Apr 2010 07:52:40 +0000 (09:52 +0200)]
util: Use u_half to perform half <--> float conversions.

14 years agogallium: Integrate util_half with scons.
Michal Krol [Thu, 1 Apr 2010 07:51:54 +0000 (09:51 +0200)]
gallium: Integrate util_half with scons.

14 years agogallium/util: add fast half float conversion functions
Luca Barbieri [Wed, 24 Mar 2010 17:12:45 +0000 (18:12 +0100)]
gallium/util: add fast half float conversion functions

This adds a fast half float conversion facility to Gallium.

Mesa already contains such a facility, but using a much worse algorithm.

This one is an implementation of
www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf
and uses a branch-less algorithm with some lookup tables small enough
to fit in the L1 cache.

Ideally, Mesa should start using these functions too, but I'm not sure
how to arrange that with the current build system.

A new "u_gctors.cpp" is added that defines a global C++ constructor
allowing to initialize to conversion lookup tables at library init.

14 years agogallium/unit: Install test in build/xxx/bin
José Fonseca [Thu, 1 Apr 2010 10:52:54 +0000 (11:52 +0100)]
gallium/unit: Install test in build/xxx/bin

14 years agoutil: Add half float test cases.
José Fonseca [Thu, 1 Apr 2010 10:52:00 +0000 (11:52 +0100)]
util: Add half float test cases.

14 years agollvmpipe: Fix (un)swizzling, broken due to use of VOID channels.
José Fonseca [Thu, 1 Apr 2010 10:31:03 +0000 (11:31 +0100)]
llvmpipe: Fix (un)swizzling, broken due to use of VOID channels.

14 years agomesa: Remove unnecessary header.
Vinson Lee [Thu, 1 Apr 2010 06:44:29 +0000 (23:44 -0700)]
mesa: Remove unnecessary header.

14 years agor300g: Remove unnecessary header.
Vinson Lee [Thu, 1 Apr 2010 06:36:06 +0000 (23:36 -0700)]
r300g: Remove unnecessary header.

14 years agoutil/format: fix big endian compilation by not trying to byteswap single bytes
Luca Barbieri [Thu, 1 Apr 2010 04:17:10 +0000 (06:17 +0200)]
util/format: fix big endian compilation by not trying to byteswap single bytes

Conceivably, we could also have a dummy util_bswap8, but it seems better
to not emit it in the first place.

14 years agogallivm: convert floats to doubles
Zack Rusin [Thu, 1 Apr 2010 01:30:37 +0000 (21:30 -0400)]
gallivm: convert floats to doubles

printf can't handle floats, convert them to doubles so that we can
actually print floats.

14 years agor300g: add RGBA16F colorbuffer support
Marek Olšák [Thu, 1 Apr 2010 00:21:06 +0000 (02:21 +0200)]
r300g: add RGBA16F colorbuffer support

Disabled by default due to unresolved IP issues.

14 years agor300g: add RGTC texture support
Marek Olšák [Thu, 1 Apr 2010 00:14:52 +0000 (02:14 +0200)]
r300g: add RGTC texture support

The CS checker already knows about this.

14 years agor300g: format handling cleanup
Marek Olšák [Wed, 31 Mar 2010 23:13:26 +0000 (01:13 +0200)]
r300g: format handling cleanup

14 years agosoftpipe: Use S3TC when avaiilable,
José Fonseca [Wed, 31 Mar 2010 21:47:11 +0000 (22:47 +0100)]
softpipe: Use S3TC when avaiilable,

14 years agoutil: Hook into libtxc_dxtn.so (WIP).
José Fonseca [Wed, 31 Mar 2010 21:46:42 +0000 (22:46 +0100)]
util: Hook into libtxc_dxtn.so (WIP).

14 years agollvmpipe: Don't call unused generate_clamp().
José Fonseca [Wed, 31 Mar 2010 20:37:57 +0000 (21:37 +0100)]
llvmpipe: Don't call unused generate_clamp().

14 years agolibgl-xlib: Fix missing X11 symbols.
José Fonseca [Wed, 31 Mar 2010 20:27:07 +0000 (21:27 +0100)]
libgl-xlib: Fix missing X11 symbols.

14 years agoutil: Make the accessors bidimensional again.
José Fonseca [Wed, 31 Mar 2010 20:16:16 +0000 (21:16 +0100)]
util: Make the accessors bidimensional again.

Otherwise there's no way to unpack blocks with height >1

14 years agoutil: First stab at half-float conversion.
Michal Krol [Wed, 31 Mar 2010 19:54:54 +0000 (21:54 +0200)]
util: First stab at half-float conversion.

14 years agoutil: Describe PIPE_FORMAT_NONE as PIPE_FORMAT_R8_USCALED.
José Fonseca [Thu, 18 Mar 2010 11:27:29 +0000 (11:27 +0000)]
util: Describe PIPE_FORMAT_NONE as PIPE_FORMAT_R8_USCALED.

Avoids the need to special case PIPE_FORMAT_NONE so often.

Conflicts:

src/gallium/auxiliary/util/u_format_table.py

14 years agoutil: Silence pointer to integer size mismatch errors.
José Fonseca [Wed, 17 Mar 2010 19:50:33 +0000 (19:50 +0000)]
util: Silence pointer to integer size mismatch errors.

14 years agoutil: Add callback to fetch a single pixel.
José Fonseca [Wed, 31 Mar 2010 19:15:17 +0000 (20:15 +0100)]
util: Add callback to fetch a single pixel.

14 years agopython/tests: Read the number of tests to execute from command line.
José Fonseca [Wed, 31 Mar 2010 19:05:10 +0000 (20:05 +0100)]
python/tests: Read the number of tests to execute from command line.

14 years agomesa: Use a consistent name of the external s3tc library for all windows compilers.
José Fonseca [Wed, 31 Mar 2010 18:53:25 +0000 (19:53 +0100)]
mesa: Use a consistent name of the external s3tc library for all windows compilers.

14 years agoscons: Force to consider the util/u_format_pack.py for util/u_format_table.c.
José Fonseca [Wed, 31 Mar 2010 18:43:57 +0000 (19:43 +0100)]
scons: Force to consider the util/u_format_pack.py for util/u_format_table.c.

14 years agoscons: Don't always include/links X11 headers/libs.
José Fonseca [Thu, 11 Mar 2010 17:52:34 +0000 (17:52 +0000)]
scons: Don't always include/links X11 headers/libs.

Move it into a separate tool.

TODO: Needs to be "tooled" in each SConscript that uses it.

14 years agoscons: Don't always link expat.
José Fonseca [Thu, 11 Mar 2010 16:50:37 +0000 (16:50 +0000)]
scons: Don't always link expat.

Only needed for DRI. Should be linked in DRI specific subdirectories.

14 years agollvmpipe: Disable threads by default on embedded.
José Fonseca [Wed, 10 Mar 2010 16:34:09 +0000 (16:34 +0000)]
llvmpipe: Disable threads by default on embedded.

14 years agoos: Temporarily use posix thread for embedded too.
Kurt Daverman [Wed, 10 Mar 2010 16:30:22 +0000 (16:30 +0000)]
os: Temporarily use posix thread for embedded too.

14 years agoscons: Allow any toolchain to be specified in the command line.
José Fonseca [Mon, 8 Mar 2010 19:58:34 +0000 (19:58 +0000)]
scons: Allow any toolchain to be specified in the command line.

14 years agoutil: Remove the hand written u_tile.c functions for the ones that are code generated...
José Fonseca [Wed, 31 Mar 2010 16:29:51 +0000 (17:29 +0100)]
util: Remove the hand written u_tile.c functions for the ones that are code generated correctly.

Not that the code generated are any better, but to quickly detect any regression
in the code generated ones from now on.

14 years agoutil: Use u_format_pack.py's code instead of u_format_access.py.
José Fonseca [Wed, 31 Mar 2010 16:26:31 +0000 (17:26 +0100)]
util: Use u_format_pack.py's code instead of u_format_access.py.

14 years agollvmpipe: Don't rely on u_format_access.py
José Fonseca [Wed, 31 Mar 2010 15:58:05 +0000 (16:58 +0100)]
llvmpipe: Don't rely on u_format_access.py

14 years agoMerge branch 'gallium-new-formats'
Roland Scheidegger [Wed, 31 Mar 2010 14:57:05 +0000 (16:57 +0200)]
Merge branch 'gallium-new-formats'

Conflicts:
src/gallium/auxiliary/util/u_format.csv
src/gallium/auxiliary/util/u_format_access.py
src/gallium/auxiliary/util/u_format_pack.py

14 years agoutil: Put the format pack/unpack functions in the description table.
José Fonseca [Wed, 31 Mar 2010 14:30:14 +0000 (15:30 +0100)]
util: Put the format pack/unpack functions in the description table.

14 years agoutil: Make pack/unpack operate on spans.
José Fonseca [Wed, 31 Mar 2010 13:43:09 +0000 (14:43 +0100)]
util: Make pack/unpack operate on spans.

14 years agost/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more places
Ben Skeggs [Wed, 31 Mar 2010 05:44:25 +0000 (15:44 +1000)]
st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more places

14 years agoutil: Make util_format_xxx_pack_xxx take pointer as arguments.
José Fonseca [Wed, 31 Mar 2010 13:31:29 +0000 (14:31 +0100)]
util: Make util_format_xxx_pack_xxx take pointer as arguments.

14 years agoutil: Fix PIPE_FORMAT_B5G5R5X1_UNORM test case.
José Fonseca [Wed, 31 Mar 2010 13:28:54 +0000 (14:28 +0100)]
util: Fix PIPE_FORMAT_B5G5R5X1_UNORM test case.

14 years agoutil: Use VOID type for X channels in format descriptions.
José Fonseca [Wed, 31 Mar 2010 13:28:34 +0000 (14:28 +0100)]
util: Use VOID type for X channels in format descriptions.

14 years agopython/tests: Run trhough tests randomly.
José Fonseca [Wed, 31 Mar 2010 13:05:55 +0000 (14:05 +0100)]
python/tests: Run trhough tests randomly.

14 years agogallivm: Fix USCALED translation. Minor Cleanups.
José Fonseca [Wed, 31 Mar 2010 13:05:21 +0000 (14:05 +0100)]
gallivm: Fix USCALED translation. Minor Cleanups.

14 years agollvmpipe: More accurate format capability exporting.
José Fonseca [Wed, 31 Mar 2010 13:00:46 +0000 (14:00 +0100)]
llvmpipe: More accurate format capability exporting.

14 years agollvmpipe: Drop the aos format conversion.
José Fonseca [Wed, 31 Mar 2010 12:59:59 +0000 (13:59 +0100)]
llvmpipe: Drop the aos format conversion.

It's unused and incomplete. Still in git history if necessary in future.

14 years agoutil: Generalize lp_format_is_rgba8 into util_format_is_rgba8_variant.
José Fonseca [Wed, 31 Mar 2010 12:55:12 +0000 (13:55 +0100)]
util: Generalize lp_format_is_rgba8 into util_format_is_rgba8_variant.

14 years agopython/tests: Rename test name.
José Fonseca [Wed, 31 Mar 2010 12:28:36 +0000 (13:28 +0100)]
python/tests: Rename test name.

We only test blitting from a surface -- we don't test any sampler state.

14 years agopython/tests: Test all existing gallium formats.
José Fonseca [Wed, 31 Mar 2010 12:27:08 +0000 (13:27 +0100)]
python/tests: Test all existing gallium formats.

14 years agopython/tests: Speed up the tests by reusing the same pipe context.
José Fonseca [Wed, 31 Mar 2010 12:12:08 +0000 (13:12 +0100)]
python/tests: Speed up the tests by reusing the same pipe context.

14 years agopython/tests: Get the tests running again.
José Fonseca [Wed, 31 Mar 2010 11:28:49 +0000 (12:28 +0100)]
python/tests: Get the tests running again.

14 years agost/python: Generate binding for u_format utility functions too.
José Fonseca [Wed, 31 Mar 2010 11:28:12 +0000 (12:28 +0100)]
st/python: Generate binding for u_format utility functions too.

14 years agoi965g: Fix assertion that was always true.
Vinson Lee [Wed, 31 Mar 2010 06:46:51 +0000 (23:46 -0700)]
i965g: Fix assertion that was always true.

surface_format field is a 9-bit field and the value of
BRW_SURFACEFORMAT_INVALID exceeds 9 bits.

14 years agost/dri: Remove unnecessary header.
Vinson Lee [Wed, 31 Mar 2010 06:35:32 +0000 (23:35 -0700)]
st/dri: Remove unnecessary header.

14 years agoidentity: Remove unnecessary header.
Vinson Lee [Wed, 31 Mar 2010 05:42:45 +0000 (22:42 -0700)]
identity: Remove unnecessary header.

14 years agost/dri: Remove unnecessary header.
Vinson Lee [Wed, 31 Mar 2010 05:35:23 +0000 (22:35 -0700)]
st/dri: Remove unnecessary header.

14 years agomesa: added glGet queries for transform_feedback
Brian Paul [Wed, 31 Mar 2010 01:55:08 +0000 (19:55 -0600)]
mesa: added glGet queries for transform_feedback

14 years agomesa: added glEnable/Disable state for transform feedback
Brian Paul [Wed, 31 Mar 2010 01:54:51 +0000 (19:54 -0600)]
mesa: added glEnable/Disable state for transform feedback

14 years agomesa: add new query/buffer targets for transform feedback
Brian Paul [Wed, 31 Mar 2010 01:53:01 +0000 (19:53 -0600)]
mesa: add new query/buffer targets for transform feedback

14 years agomesa: plug in transform feedback functions, set limits
Brian Paul [Wed, 31 Mar 2010 01:51:26 +0000 (19:51 -0600)]
mesa: plug in transform feedback functions, set limits

14 years agomesa: add transformfeedback.c to build
Brian Paul [Wed, 31 Mar 2010 01:50:49 +0000 (19:50 -0600)]
mesa: add transformfeedback.c to build

14 years agomesa: initial check-in of transform feedback functions
Brian Paul [Wed, 31 Mar 2010 01:50:11 +0000 (19:50 -0600)]
mesa: initial check-in of transform feedback functions

14 years agomesa: add transform feedback queries
Brian Paul [Wed, 31 Mar 2010 01:54:02 +0000 (19:54 -0600)]
mesa: add transform feedback queries

And make _mesa_copy_string() non-static.

14 years agomesa: add EXT_transform_feedback to extension list
Brian Paul [Wed, 31 Mar 2010 01:53:28 +0000 (19:53 -0600)]
mesa: add EXT_transform_feedback to extension list

14 years agomesa: initial data structures for transform feedback
Brian Paul [Wed, 31 Mar 2010 01:59:51 +0000 (19:59 -0600)]
mesa: initial data structures for transform feedback

14 years agomesa: simplify query code with get_query_binding_point()
Brian Paul [Tue, 30 Mar 2010 17:33:51 +0000 (11:33 -0600)]
mesa: simplify query code with get_query_binding_point()

14 years agointel: Bump intel driver date to later than the date on the 7.8 branch
Ian Romanick [Tue, 30 Mar 2010 22:38:03 +0000 (15:38 -0700)]
intel: Bump intel driver date to later than the date on the 7.8 branch

14 years agodri: Drop another unused __DRIscreen field
Kristian Høgsberg [Tue, 30 Mar 2010 18:41:27 +0000 (14:41 -0400)]
dri: Drop another unused __DRIscreen field

14 years agodri: Drop the unused dummyContext
Kristian Høgsberg [Tue, 30 Mar 2010 18:38:52 +0000 (14:38 -0400)]
dri: Drop the unused dummyContext

14 years agodri: Drop an unused __DRIcontext field
Kristian Høgsberg [Tue, 30 Mar 2010 18:37:02 +0000 (14:37 -0400)]
dri: Drop an unused __DRIcontext field

14 years agointel: Remove redundant fields from struct intel_context
Kristian Høgsberg [Tue, 30 Mar 2010 18:32:10 +0000 (14:32 -0400)]
intel: Remove redundant fields from struct intel_context

All these pointers are in the __DRIcontext struct, which we point to.

14 years agointel: Use fb->Height when flipping read buffer orientation
Kristian Høgsberg [Tue, 30 Mar 2010 18:05:47 +0000 (14:05 -0400)]
intel: Use fb->Height when flipping read buffer orientation

With DRI2, x and y are always zero and fb->Height is always up to date
with the drawable height.

14 years agor300/compiler: Unbreak DDX/DDY.
Corbin Simpson [Tue, 30 Mar 2010 17:43:51 +0000 (10:43 -0700)]
r300/compiler: Unbreak DDX/DDY.

Fixes progs/glsl/deriv.

14 years agogallivm: cleanup the code (found by coverity)
Zack Rusin [Tue, 30 Mar 2010 12:55:17 +0000 (08:55 -0400)]
gallivm: cleanup the code (found by coverity)

the condition can't be false, declerations are ok even if we don't
emit any.

14 years agodrisw: fix use after free (bug 27370)
George Sapountzis [Tue, 30 Mar 2010 10:09:16 +0000 (13:09 +0300)]
drisw: fix use after free (bug 27370)

14 years agoMerge branch '7.8'
Michel Dänzer [Tue, 30 Mar 2010 10:01:31 +0000 (12:01 +0200)]
Merge branch '7.8'

Conflicts:
Makefile
src/mesa/main/version.h

Resolved by keeping version strings from master (also in the intel driver).

14 years agoglx/dri2: Fix debug build with old dri2proto.
Michel Dänzer [Tue, 30 Mar 2010 09:50:13 +0000 (11:50 +0200)]
glx/dri2: Fix debug build with old dri2proto.

Apparently the higher compiler optimization level in non-debug builds was
eliminating the unused functions referencing the unresolved DRI2 symbols...

14 years agost/dri: Fix a memory leak in dri1_init_screen.
Chia-I Wu [Tue, 30 Mar 2010 07:41:31 +0000 (15:41 +0800)]
st/dri: Fix a memory leak in dri1_init_screen.

Free the returned configs upon errors.

14 years agomesa/es: Use core mesa's mfeatures.h.
Chia-I Wu [Tue, 30 Mar 2010 05:19:59 +0000 (13:19 +0800)]
mesa/es: Use core mesa's mfeatures.h.

Remove mfeatures_es1.h and mfeatures_es2.h.  Build the overlay with
either FEATURE_ES1 or FEATURE_ES2 defined.

14 years agomesa: Add missing features.
Chia-I Wu [Tue, 30 Mar 2010 05:13:20 +0000 (13:13 +0800)]
mesa: Add missing features.

Add features tested in the code but missing from mfeatures.h.

This also fixes some tests of features.  They should be tested with
"#if", not "#ifdef".

14 years agomesa: Add umbrella features.
Chia-I Wu [Tue, 30 Mar 2010 04:38:25 +0000 (12:38 +0800)]
mesa: Add umbrella features.

Add FEATURE_GL, FEATURE_ES1, and FEATURE_ES2 for OpenGL, OpenGL ES 1.x,
and OpenGL ES 2.x respectively.  Define individual features through the
new umbrella features.  There is no real change introduced by this
commit.

14 years agodrisw: Remove unnecessary header.
Vinson Lee [Tue, 30 Mar 2010 06:11:26 +0000 (23:11 -0700)]
drisw: Remove unnecessary header.

14 years agoswrastg: Silence unused value warning.
Vinson Lee [Tue, 30 Mar 2010 05:54:35 +0000 (22:54 -0700)]
swrastg: Silence unused value warning.

14 years agor300g: Remove unused variable.
Vinson Lee [Tue, 30 Mar 2010 05:19:28 +0000 (22:19 -0700)]
r300g: Remove unused variable.

14 years agor300g: Remove unnecessary header.
Vinson Lee [Tue, 30 Mar 2010 05:11:37 +0000 (22:11 -0700)]
r300g: Remove unnecessary header.

14 years agor300g: Bind constantbuf to Draw immediately, don't wait for render.
Corbin Simpson [Mon, 29 Mar 2010 22:10:18 +0000 (15:10 -0700)]
r300g: Bind constantbuf to Draw immediately, don't wait for render.

Doesn't hurt, and reduces code duplication.

14 years agost/glx: Remove a wrong assertion in choose_pixel_format.
Chia-I Wu [Tue, 30 Mar 2010 01:17:20 +0000 (09:17 +0800)]
st/glx: Remove a wrong assertion in choose_pixel_format.

There are X visuals that Gallium or the code does not support.  We could
not assert the color format to be supported.  Return PIPE_FORMAT_NONE in
such cases and let the caller handle it.

14 years agogallivm: use constant size array, added assertion check
Brian Paul [Tue, 30 Mar 2010 00:13:31 +0000 (18:13 -0600)]
gallivm: use constant size array, added assertion check

14 years agogallium/util: use other layout instead of the old compressed
Roland Scheidegger [Tue, 30 Mar 2010 00:01:11 +0000 (02:01 +0200)]
gallium/util: use other layout instead of the old compressed

14 years agoMerge branch 'master' into gallium-new-formats
Roland Scheidegger [Mon, 29 Mar 2010 23:52:13 +0000 (01:52 +0200)]
Merge branch 'master' into gallium-new-formats

Conflicts:
src/gallium/auxiliary/util/u_format.csv

14 years agogallium: adapt all code to the renamed depth/stencil formats
Roland Scheidegger [Mon, 29 Mar 2010 23:35:49 +0000 (01:35 +0200)]
gallium: adapt all code to the renamed depth/stencil formats

14 years agogallium: make the python scripts for format parsing not fail on new formats
Roland Scheidegger [Mon, 29 Mar 2010 23:33:28 +0000 (01:33 +0200)]
gallium: make the python scripts for format parsing not fail on new formats

they won't generate any useful conversion code for some of the new formats
but at least don't assert. Also needed some more hacks so they don't generate
code for some of the new formats, as gcc was not impressed.
Also declare unused channels as void, and change the scripts to not fail if
the first channel happened to be unused.
Needs serious fixing.

14 years agoAdd test case for lp_bld_printf()
Chris Li [Fri, 26 Mar 2010 17:24:34 +0000 (10:24 -0700)]
Add test case for lp_bld_printf()

14 years agogallivm: added lp_bld_printf() function
Chris Li [Fri, 26 Mar 2010 17:23:03 +0000 (10:23 -0700)]
gallivm: added lp_bld_printf() function

14 years agoprogs/glsl: Add workarounds for Apple GLSL compiler crash.
Vinson Lee [Mon, 29 Mar 2010 21:56:12 +0000 (14:56 -0700)]
progs/glsl: Add workarounds for Apple GLSL compiler crash.

fsraytrace and vsraytrace were crashing on Mac OS X 10.6.3 in the Apple
GLSL compiler function TPPStreamCompiler::assignOperands. Removing some
const qualifers made the crashes go away.

14 years agoprogs/glsl: Remove inline keyword.
Vinson Lee [Mon, 29 Mar 2010 20:58:39 +0000 (13:58 -0700)]
progs/glsl: Remove inline keyword.

Fixes MSVC build.

14 years agoprogs/gallium/python: Get tri.py sample working again.
José Fonseca [Mon, 29 Mar 2010 20:10:03 +0000 (21:10 +0100)]
progs/gallium/python: Get tri.py sample working again.

14 years agost/python: Update for util_draw_vertex_buffer changes.
José Fonseca [Mon, 29 Mar 2010 20:09:37 +0000 (21:09 +0100)]
st/python: Update for util_draw_vertex_buffer changes.

14 years agost/python: Move surface read/write methods to context.
José Fonseca [Mon, 29 Mar 2010 20:09:21 +0000 (21:09 +0100)]
st/python: Move surface read/write methods to context.

14 years agogallivm: make sure that the alloca's are the very first thing in the function
Zack Rusin [Mon, 29 Mar 2010 20:17:17 +0000 (16:17 -0400)]
gallivm: make sure that the alloca's are the very first thing in the function

otherwise mem2reg can't put them in registers

14 years agost/dri/sw: add drisw_api similarly to dri1_api
George Sapountzis [Mon, 29 Mar 2010 18:06:54 +0000 (21:06 +0300)]
st/dri/sw: add drisw_api similarly to dri1_api

I am pretty sure that this is in gallium spirit, so commit. Thanks to Chia-I
for suggesting this.