mesa.git
14 years agoglapi.c: misc coscmetic for FreeTSD
George Sapountzis [Mon, 1 Mar 2010 02:44:02 +0000 (04:44 +0200)]
glapi.c: misc coscmetic for FreeTSD

- move out of of the dispatch/context block to after corresponding init functions

- use more consistent naming with corresponding init functions

- XXX use _glthread_InitTSD() vs (void)_glthread_GetTSD() in _glapi_check_multithread() XXX

14 years agoglapi.c: misc cosmetic
George Sapountzis [Sat, 27 Feb 2010 13:19:44 +0000 (15:19 +0200)]
glapi.c: misc cosmetic

mainly, move the multithread check mutex out of the dispatch/context block,
closer to where it is used.

14 years agoglapi.c: mv init_glapi_relocs to glapi_getproc.c
George Sapountzis [Fri, 26 Feb 2010 21:43:46 +0000 (23:43 +0200)]
glapi.c: mv init_glapi_relocs to glapi_getproc.c

14 years agoglapi.c: mv check_table to glapi_getproc.c
George Sapountzis [Fri, 26 Feb 2010 18:01:20 +0000 (20:01 +0200)]
glapi.c: mv check_table to glapi_getproc.c

14 years agoglapi.c: split check_table to not_null and get_proc
George Sapountzis [Fri, 26 Feb 2010 22:24:58 +0000 (00:24 +0200)]
glapi.c: split check_table to not_null and get_proc

14 years agoglapi.h: drop dispatch_override prototypes
George Sapountzis [Fri, 26 Feb 2010 17:09:38 +0000 (19:09 +0200)]
glapi.h: drop dispatch_override prototypes

cannot find them in mesa tree

14 years agoglapi.h: misc cosmetic
George Sapountzis [Sat, 27 Feb 2010 00:48:27 +0000 (02:48 +0200)]
glapi.h: misc cosmetic

- revert context/dispatch order, similar to glapi.c
- stray GL_GLEXT_PROTOTYPES

14 years agoglapi.h: consolidate GET_DISPATCH() and GET_CURRENT_CONTEXT() macros
George Sapountzis [Fri, 26 Feb 2010 18:58:24 +0000 (20:58 +0200)]
glapi.h: consolidate GET_DISPATCH() and GET_CURRENT_CONTEXT() macros

Use likely() macro, as this is what most projects use.

Drops GL_CALL define, cannot find it in mesa tree.

Also, whitespace cleaunps in glthread.h

14 years agotgsi: Cleanup exec code for CLAMP, CMP and CND.
Michal Krol [Mon, 1 Mar 2010 16:57:18 +0000 (17:57 +0100)]
tgsi: Cleanup exec code for CLAMP, CMP and CND.

14 years agoutil: A few more todo marks.
José Fonseca [Mon, 1 Mar 2010 14:56:05 +0000 (14:56 +0000)]
util: A few more todo marks.

14 years agoutil: More documentation for u_format.csv
José Fonseca [Mon, 1 Mar 2010 14:49:18 +0000 (14:49 +0000)]
util: More documentation for u_format.csv

14 years agoutil: Tweak comments regarding R8G8B8A8/X8_UNORM.
José Fonseca [Mon, 1 Mar 2010 14:24:41 +0000 (14:24 +0000)]
util: Tweak comments regarding R8G8B8A8/X8_UNORM.

14 years agopython: Don't mention deprecated drivers=trace option.
José Fonseca [Mon, 1 Mar 2010 14:22:30 +0000 (14:22 +0000)]
python: Don't mention deprecated drivers=trace option.

Now trace always built.

14 years agopython: Don't mention deprecated drivers=trace option.
José Fonseca [Sat, 27 Feb 2010 23:50:09 +0000 (23:50 +0000)]
python: Don't mention deprecated drivers=trace option.

Now trace always built.

14 years agollvmpipe: Don't mention deprecated drivers=trace option.
José Fonseca [Sat, 27 Feb 2010 23:49:58 +0000 (23:49 +0000)]
llvmpipe: Don't mention deprecated drivers=trace option.

Now trace always built.

14 years agoprogs/gallium: Make a phony target "unit" to run unit tests.
José Fonseca [Sat, 27 Feb 2010 23:46:32 +0000 (23:46 +0000)]
progs/gallium: Make a phony target "unit" to run unit tests.

14 years agodri/nouveau: Combine the dummy texture more deterministically on nv0x.
Francisco Jerez [Mon, 1 Mar 2010 00:56:38 +0000 (01:56 +0100)]
dri/nouveau: Combine the dummy texture more deterministically on nv0x.

14 years agodri/nouveau: Fix up the ADD texture environment on nv0x.
Francisco Jerez [Mon, 1 Mar 2010 00:53:22 +0000 (01:53 +0100)]
dri/nouveau: Fix up the ADD texture environment on nv0x.

14 years agodri/nouveau: Add two stencil operation cases in nv04_state_raster.c.
Andrew Randrianasulu [Mon, 1 Mar 2010 00:48:29 +0000 (01:48 +0100)]
dri/nouveau: Add two stencil operation cases in nv04_state_raster.c.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodri/nouveau: Allow to render to XRGB8888 textures.
Andrew Randrianasulu [Mon, 1 Mar 2010 00:46:32 +0000 (01:46 +0100)]
dri/nouveau: Allow to render to XRGB8888 textures.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agor300g: atomize texture and sampler states
Marek Olšák [Sun, 28 Feb 2010 18:28:31 +0000 (19:28 +0100)]
r300g: atomize texture and sampler states

14 years agor300g: decouple vertex stream setup (PSC) and VS output mapping (VAP_OUT)
Marek Olšák [Sun, 28 Feb 2010 06:45:56 +0000 (07:45 +0100)]
r300g: decouple vertex stream setup (PSC) and VS output mapping (VAP_OUT)

Formerly known as vertex_format_state. These two are completely
unrelated when using HWTCL and decoupling them makes the design
less SWTCL-centric.

When bypass_vs_clip_and_viewport gets removed, the PSC setup will
no longer be a derived state.

This change shouldn't make unbreaking SWTCL harder.

14 years agoi965g: Fix texture creation
Jakob Bornecrantz [Sun, 28 Feb 2010 16:28:44 +0000 (16:28 +0000)]
i965g: Fix texture creation

14 years agoFixed mklib to properly merge static libraries on darwin.
Alex Weiss [Sat, 27 Feb 2010 19:47:43 +0000 (14:47 -0500)]
Fixed mklib to properly merge static libraries on darwin.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
14 years agodri: Remove dead code.
Vinson Lee [Sun, 28 Feb 2010 05:57:38 +0000 (21:57 -0800)]
dri: Remove dead code.

14 years agoglut: Add asserts to check for null pointer dereferences.
Vinson Lee [Sun, 28 Feb 2010 05:19:07 +0000 (21:19 -0800)]
glut: Add asserts to check for null pointer dereferences.

14 years agoglx: Add assert to check input to memcpy.
Vinson Lee [Sun, 28 Feb 2010 04:23:17 +0000 (20:23 -0800)]
glx: Add assert to check input to memcpy.

14 years agomesa: Add asserts to check inputs to memcpy.
Vinson Lee [Sun, 28 Feb 2010 04:11:31 +0000 (20:11 -0800)]
mesa: Add asserts to check inputs to memcpy.

14 years agomesa: Add assert to check input to memcpy is not null.
Vinson Lee [Sun, 28 Feb 2010 01:19:31 +0000 (17:19 -0800)]
mesa: Add assert to check input to memcpy is not null.

14 years agoglsl: Move assert from outside to inside of _slang_gen_swizzle function.
Vinson Lee [Sun, 28 Feb 2010 01:01:25 +0000 (17:01 -0800)]
glsl: Move assert from outside to inside of _slang_gen_swizzle function.

14 years agodri: Add assert to check for null pointer dereference.
Vinson Lee [Sun, 28 Feb 2010 00:51:17 +0000 (16:51 -0800)]
dri: Add assert to check for null pointer dereference.

14 years agoi810: Add assert to check for null pointer dereference.
Vinson Lee [Sun, 28 Feb 2010 00:41:49 +0000 (16:41 -0800)]
i810: Add assert to check for null pointer dereference.

14 years agomach64: Add asserts to check for null pointer dereferences.
Vinson Lee [Sun, 28 Feb 2010 00:38:09 +0000 (16:38 -0800)]
mach64: Add asserts to check for null pointer dereferences.

14 years agomga: Add assert to check for null pointer dereference.
Vinson Lee [Sun, 28 Feb 2010 00:30:49 +0000 (16:30 -0800)]
mga: Add assert to check for null pointer dereference.

14 years agor128: Add assert to check for null pointer dereference.
Vinson Lee [Sun, 28 Feb 2010 00:28:30 +0000 (16:28 -0800)]
r128: Add assert to check for null pointer dereference.

14 years agost/mesa: do not advertise S3TC if the external lib is not available
Marek Olšák [Sat, 27 Feb 2010 02:20:58 +0000 (03:20 +0100)]
st/mesa: do not advertise S3TC if the external lib is not available

14 years agor300g: put validating buffers after flushing
Marek Olšák [Sat, 27 Feb 2010 16:00:03 +0000 (17:00 +0100)]
r300g: put validating buffers after flushing

Also cleaning up the nasty validation process.

14 years agor300g: use the atom size directly during emission
Marek Olšák [Sat, 27 Feb 2010 22:12:46 +0000 (23:12 +0100)]
r300g: use the atom size directly during emission

14 years agor300g: atomize invalidation of texture caches
Marek Olšák [Sat, 27 Feb 2010 22:37:01 +0000 (23:37 +0100)]
r300g: atomize invalidation of texture caches

14 years agor300g: atomize PVS flush
Marek Olšák [Sat, 27 Feb 2010 22:26:19 +0000 (23:26 +0100)]
r300g: atomize PVS flush

The first non-state atom. It's better and cleaner to have it.

14 years agor300g: add size parameter to the atom emit functions
Marek Olšák [Sat, 27 Feb 2010 20:54:16 +0000 (21:54 +0100)]
r300g: add size parameter to the atom emit functions

Maintaining a closer relationship between the atom size and what's passed
in BEGIN_CS.

14 years agomesa: remove libmesagallium.a on make clean
Marcin Slusarz [Sat, 27 Feb 2010 21:55:35 +0000 (13:55 -0800)]
mesa: remove libmesagallium.a on make clean

Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agor300: Add asserts to check for null pointer dereferences.
Vinson Lee [Sat, 27 Feb 2010 23:36:11 +0000 (15:36 -0800)]
r300: Add asserts to check for null pointer dereferences.

14 years agosavage: Add assert to check for null pointer dereference.
Vinson Lee [Sat, 27 Feb 2010 23:29:44 +0000 (15:29 -0800)]
savage: Add assert to check for null pointer dereference.

14 years agosis: Add assert to check function pointer is not null.
Vinson Lee [Sat, 27 Feb 2010 23:13:38 +0000 (15:13 -0800)]
sis: Add assert to check function pointer is not null.

14 years agotdfx: Add asserts to check for null pointer dereferences.
Vinson Lee [Sat, 27 Feb 2010 23:07:30 +0000 (15:07 -0800)]
tdfx: Add asserts to check for null pointer dereferences.

14 years agounichrome: Assert that pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 22:56:27 +0000 (14:56 -0800)]
unichrome: Assert that pointer is not null before dereferencing.

14 years agoutil: Fix X8/A8B8G8R8_SNORM's swizzle.
José Fonseca [Sat, 27 Feb 2010 20:28:53 +0000 (20:28 +0000)]
util: Fix X8/A8B8G8R8_SNORM's swizzle.

14 years agoprogs/gallium: Add unit tests for pixel format packing/unpacking.
José Fonseca [Sat, 27 Feb 2010 20:28:16 +0000 (20:28 +0000)]
progs/gallium: Add unit tests for pixel format packing/unpacking.

14 years agor300g: move the emission of GA_POINT_MINMAX into emit_fb_state
Marek Olšák [Sat, 27 Feb 2010 19:05:00 +0000 (20:05 +0100)]
r300g: move the emission of GA_POINT_MINMAX into emit_fb_state

The only practical limits are the ones derived from the currently-set
framebuffer state.

14 years agor300g: put the emission of R300_US_OUT_FMT_UNUSED back
Marek Olšák [Sat, 27 Feb 2010 19:03:34 +0000 (20:03 +0100)]
r300g: put the emission of R300_US_OUT_FMT_UNUSED back

It wasn't such a good idea to remove it. :/

14 years agor300g: mark rasterizer_state as dirty only when it's not NULL
Marek Olšák [Sat, 27 Feb 2010 19:00:38 +0000 (20:00 +0100)]
r300g: mark rasterizer_state as dirty only when it's not NULL

14 years agoradeong: clean up includes
Marek Olšák [Sat, 27 Feb 2010 01:46:20 +0000 (02:46 +0100)]
radeong: clean up includes

14 years agor300g: always emit the correct max vertex index to avoid DRM errors
Marek Olšák [Fri, 26 Feb 2010 23:37:01 +0000 (00:37 +0100)]
r300g: always emit the correct max vertex index to avoid DRM errors

Fixing bizarre reports that a vertex buffer is not large enough.

14 years agor300g: remove pointless "while"
Marek Olšák [Fri, 26 Feb 2010 21:34:09 +0000 (22:34 +0100)]
r300g: remove pointless "while"

14 years agoradeon: Assert pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 10:28:00 +0000 (02:28 -0800)]
radeon: Assert pointer is not null before dereferencing.

Add back an assert that was removed in commit
cd5f167353f16fb4f5b349002625b704f3e23778.

14 years agodri: Assert pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 10:18:06 +0000 (02:18 -0800)]
dri: Assert pointer is not null before dereferencing.

14 years agost/dri: Assert pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 10:01:56 +0000 (02:01 -0800)]
st/dri: Assert pointer is not null before dereferencing.

14 years agor600: Assert pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 09:52:46 +0000 (01:52 -0800)]
r600: Assert pointer is not null before dereferencing.

14 years agoglsl: Assert input to strcmp is not null.
Vinson Lee [Sat, 27 Feb 2010 08:31:14 +0000 (00:31 -0800)]
glsl: Assert input to strcmp is not null.

14 years agoglsl: Assert pointer is not null before dereferencing.
Vinson Lee [Sat, 27 Feb 2010 08:08:14 +0000 (00:08 -0800)]
glsl: Assert pointer is not null before dereferencing.

14 years agomesa: Remove unnecessary header.
Vinson Lee [Sat, 27 Feb 2010 07:58:59 +0000 (23:58 -0800)]
mesa: Remove unnecessary header.

14 years agost/xorg: Re-enable crtc on resize
Jakob Bornecrantz [Thu, 25 Feb 2010 15:51:30 +0000 (16:51 +0100)]
st/xorg: Re-enable crtc on resize

14 years agost/xorg: Fix copy-topy
Jakob Bornecrantz [Thu, 25 Feb 2010 15:51:15 +0000 (16:51 +0100)]
st/xorg: Fix copy-topy

14 years agovmware/xorg: Bump to match vmware driver
Jakob Bornecrantz [Mon, 22 Feb 2010 19:06:23 +0000 (20:06 +0100)]
vmware/xorg: Bump to match vmware driver

14 years agost/xorg: Make resize fail gracefully
Jakob Bornecrantz [Mon, 22 Feb 2010 13:47:15 +0000 (14:47 +0100)]
st/xorg: Make resize fail gracefully

14 years agost/xorg: Obey max {width|height} from kernel and Gallium
Jakob Bornecrantz [Mon, 22 Feb 2010 13:46:10 +0000 (14:46 +0100)]
st/xorg: Obey max {width|height} from kernel and Gallium

14 years agost/xorg: Encapsulate all customizable stuff in a separate class.
Thomas Hellstrom [Mon, 15 Feb 2010 13:10:19 +0000 (14:10 +0100)]
st/xorg: Encapsulate all customizable stuff in a separate class.

This avoids exposing the ms driver structure to the winsys,
and nicely encapsulates driver customizable stuff.
In the future more things might be customizable by the winsys, like
throttling, 3D readback etc.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agovmware/xorg: Export modinfo just as the other vmware X drivers does
Jakob Bornecrantz [Thu, 18 Feb 2010 15:02:03 +0000 (16:02 +0100)]
vmware/xorg: Export modinfo just as the other vmware X drivers does

14 years agost/xorg: A bit more debugging info
Jakob Bornecrantz [Thu, 18 Feb 2010 14:53:42 +0000 (15:53 +0100)]
st/xorg: A bit more debugging info

14 years agost/xorg: Make default of debugging fallbacks smart
Jakob Bornecrantz [Thu, 18 Feb 2010 14:51:59 +0000 (15:51 +0100)]
st/xorg: Make default of debugging fallbacks smart

Set it to the same as 2d acceleration

14 years agodrm/vmware: Latest interface changes are backwards incopatible
Jakob Bornecrantz [Thu, 11 Feb 2010 13:41:40 +0000 (14:41 +0100)]
drm/vmware: Latest interface changes are backwards incopatible

Since the execbuffer change actually changed size off the ioctl
struct and not just a reuse of padded bits, we can't support
old kernels as easily as the scanout change was.

14 years agost/xorg, vmware/xorg: Fix xnfcalloc arguments.
Thomas Hellstrom [Mon, 15 Feb 2010 13:24:51 +0000 (14:24 +0100)]
st/xorg, vmware/xorg: Fix xnfcalloc arguments.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agovmware: Update vmwgfx_drm.h to kernel version.
Thomas Hellstrom [Tue, 9 Feb 2010 21:54:15 +0000 (22:54 +0100)]
vmware: Update vmwgfx_drm.h to kernel version.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agor600: enable OQ on rv740 on drms with working pipe config
Alex Deucher [Fri, 26 Feb 2010 20:24:12 +0000 (15:24 -0500)]
r600: enable OQ on rv740 on drms with working pipe config

14 years agor600: fail to validate unsupported texture formats
Klaus Schnass [Fri, 26 Feb 2010 20:09:50 +0000 (15:09 -0500)]
r600: fail to validate unsupported texture formats

14 years agonv40: fix include of nv04_surface_2d.h
Christoph Bumiller [Fri, 26 Feb 2010 20:11:07 +0000 (21:11 +0100)]
nv40: fix include of nv04_surface_2d.h

14 years agoeglinfo: Wrap extension string
Kristian Høgsberg [Fri, 26 Feb 2010 20:11:29 +0000 (15:11 -0500)]
eglinfo: Wrap extension string

14 years agoxeglgears: Add an case that exercises EGL_KHR_gl_renderbuffer_image
Kristian Høgsberg [Fri, 26 Feb 2010 19:51:32 +0000 (14:51 -0500)]
xeglgears: Add an case that exercises EGL_KHR_gl_renderbuffer_image

14 years agoegl_dri2: Implement EGL_KHR_gl_renderbuffer_image
Kristian Høgsberg [Fri, 26 Feb 2010 19:51:11 +0000 (14:51 -0500)]
egl_dri2: Implement EGL_KHR_gl_renderbuffer_image

14 years agointel: Lookup requested renderbuffer in intel_create_image_from_renderbuffer
Kristian Høgsberg [Fri, 26 Feb 2010 19:49:31 +0000 (14:49 -0500)]
intel: Lookup requested renderbuffer in intel_create_image_from_renderbuffer

Previously we'd use the current renderbuffer.

14 years agoprogs/tests: add compile-time option for coloring texture corners
Brian Paul [Fri, 26 Feb 2010 19:04:53 +0000 (12:04 -0700)]
progs/tests: add compile-time option for coloring texture corners

When debugging wrap modes it's helpful to set each corner of the texture
image to a distinct color.

14 years agogallium: define GENERATED auxiliary files
Brian Paul [Fri, 26 Feb 2010 18:58:54 +0000 (11:58 -0700)]
gallium: define GENERATED auxiliary files

Don't need special default dependency on u_format_pack.h anymore.

14 years agogallium: added GENERATED_SOURCES var to Makefile.template
Brian Paul [Fri, 26 Feb 2010 18:58:05 +0000 (11:58 -0700)]
gallium: added GENERATED_SOURCES var to Makefile.template

For use in dependency checking and make clean.

14 years agoprogs/glsl: Ensure CFLAGS are passed during linking
Dan Nicholson [Fri, 26 Feb 2010 18:01:37 +0000 (10:01 -0800)]
progs/glsl: Ensure CFLAGS are passed during linking

Commit ab6825b3e3fd04564b7840e945fa32b0a7b3c0c2 fixed an issue where the
architecture option -m32 wasn't being passed to the compiler when
linking .o files. This would only fix the issue with user's building
with the hacky --enable-32-bit. The right way to fix this is to pass
CFLAGS to the linker, which the GNU make builtin rules unfortunately
don't do.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Török Edwin <edwintorok@gmail.com>
14 years agoxeglgears: Clean up the code a bit
Kristian Høgsberg [Fri, 26 Feb 2010 18:18:37 +0000 (13:18 -0500)]
xeglgears: Clean up the code a bit

Still a mess...

14 years agoSet API dispatch pointers for OES_EGL_image functions
Kristian Høgsberg [Fri, 26 Feb 2010 18:17:30 +0000 (13:17 -0500)]
Set API dispatch pointers for OES_EGL_image functions

This chunk fell through the cracks when I rebase the EGLImage patch series.

14 years agoRevert "gallium: remove unneeded -I path from Makefile.templast"
Brian Paul [Fri, 26 Feb 2010 17:54:20 +0000 (10:54 -0700)]
Revert "gallium: remove unneeded -I path from Makefile.templast"

This reverts commit d9c65ddd52199469c49fc0d3ad90fedb9a69274d.

Looks like the nouveau drivers need this.  Perhaps the drivers
could be fixed to add the extra -I path where needed.  I'll leave
that up to others.

14 years agogallium/nouveau: clean-up #includes
Brian Paul [Fri, 26 Feb 2010 17:54:05 +0000 (10:54 -0700)]
gallium/nouveau: clean-up #includes

14 years agogallium: remove unneeded -I path from Makefile.templast
Brian Paul [Fri, 26 Feb 2010 17:44:41 +0000 (10:44 -0700)]
gallium: remove unneeded -I path from Makefile.templast

14 years agosoftpipe: fix up #includes
Brian Paul [Fri, 26 Feb 2010 17:43:56 +0000 (10:43 -0700)]
softpipe: fix up #includes

14 years agogallium/trace: remove unneeded path prefixes on #includes
Brian Paul [Fri, 26 Feb 2010 17:43:19 +0000 (10:43 -0700)]
gallium/trace: remove unneeded path prefixes on #includes

14 years agogallium/identity: remove unneeded path prefixes on #includes
Brian Paul [Fri, 26 Feb 2010 17:43:04 +0000 (10:43 -0700)]
gallium/identity: remove unneeded path prefixes on #includes

14 years agoglx: fix incorrect array stack memory allocation
Markus Fleschutz [Fri, 26 Feb 2010 17:34:19 +0000 (10:34 -0700)]
glx: fix incorrect array stack memory allocation

The array stack space wasn't allocated to the proper size.  Fixes out of
bounds memory writes when the client/array stack depth exceeds one.

See fd.o bug 26768.

14 years agoutil: Define SRGB's channels as normalized.
José Fonseca [Fri, 26 Feb 2010 16:46:09 +0000 (16:46 +0000)]
util: Define SRGB's channels as normalized.

A better approximation than uscaled...

14 years agoutil: Code generate functions to pack and unpack a single pixel.
José Fonseca [Fri, 26 Feb 2010 16:45:22 +0000 (16:45 +0000)]
util: Code generate functions to pack and unpack a single pixel.

Should work correctly for all pixel formats except SRGB formats.

Generated code made much simpler by defining the pixel format as
a C structure. For example this is the generated structure for
PIPE_FORMAT_B6UG5SR5S_NORM:

union util_format_b6ug5sr5s_norm {
   uint16_t value;
   struct {
      int r:5;
      int g:5;
      unsigned b:6;
   } chan;
};

Not used everywhere yet because it seems compiled code is slower than
bitshift arithmetic by some misterious reason. So we should generate
bitshift arithmetic at least for the simple UNORM pixel formats.

14 years agoutil: Factor some code into u_format_parse.py
José Fonseca [Fri, 26 Feb 2010 15:45:48 +0000 (15:45 +0000)]
util: Factor some code into u_format_parse.py

14 years agoutil: Add util_bswap16.
José Fonseca [Fri, 26 Feb 2010 15:37:18 +0000 (15:37 +0000)]
util: Add util_bswap16.

14 years agoutil: Use python names consistent with u_format.h
José Fonseca [Fri, 26 Feb 2010 11:03:06 +0000 (11:03 +0000)]
util: Use python names consistent with u_format.h

14 years agomesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
Brian Paul [Fri, 26 Feb 2010 16:03:31 +0000 (09:03 -0700)]
mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()

The rb->InternalFormat field will be set by the caller if the allocation
succeeds.  Until then, this field's value can't be used.  Fixes a failed
assertion with FlightGear.