mesa.git
16 years agogallium: Add newline to eof.
José Fonseca [Thu, 1 May 2008 01:20:31 +0000 (10:20 +0900)]
gallium: Add newline to eof.

16 years agodraw: squash warnings
Keith Whitwell [Thu, 1 May 2008 12:47:27 +0000 (13:47 +0100)]
draw: squash warnings

16 years agodraw: turn on SSE swizzle code
Keith Whitwell [Thu, 1 May 2008 12:47:09 +0000 (13:47 +0100)]
draw: turn on SSE swizzle code

16 years agogallium: remove old files
Brian Paul [Thu, 1 May 2008 00:23:17 +0000 (18:23 -0600)]
gallium: remove old files

16 years agogallium: fix texture border removal bug
Brian Paul [Thu, 1 May 2008 00:21:10 +0000 (18:21 -0600)]
gallium: fix texture border removal bug

16 years agogallium: use the newer PIPE_FORMAT_x_UNORM format names
Brian Paul [Wed, 30 Apr 2008 22:50:17 +0000 (16:50 -0600)]
gallium: use the newer PIPE_FORMAT_x_UNORM format names

16 years agogallium: rename old PIPE_FORMAT_U_I8 with PIPE_FORMAT_I8_UNORM, etc.
Brian Paul [Wed, 30 Apr 2008 22:49:38 +0000 (16:49 -0600)]
gallium: rename old PIPE_FORMAT_U_I8 with PIPE_FORMAT_I8_UNORM, etc.

Now all the packed color types are consistantly named.
Added temporary #defines for the old names until all drivers are updated.

16 years agogallium: replace old PIPE_FORMAT_U_S8 with PIPE_FORMAT_S8_UNORM
Brian Paul [Wed, 30 Apr 2008 22:41:53 +0000 (16:41 -0600)]
gallium: replace old PIPE_FORMAT_U_S8 with PIPE_FORMAT_S8_UNORM

16 years agoAdd support for GL_REPLACE_EXT texture env mode.
Brian Paul [Wed, 30 Apr 2008 22:05:01 +0000 (16:05 -0600)]
Add support for GL_REPLACE_EXT texture env mode.

GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension.  Found an old demo that
actually uses it.
The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.

16 years agoadded xdemos/sharedtex.c test
Brian Paul [Wed, 30 Apr 2008 20:43:28 +0000 (14:43 -0600)]
added xdemos/sharedtex.c test

Test that modifications to a texture object in one rendering context are seen
in a second rendering context.
Press 't' to change the texture's image/colors.

16 years agogallium: fix typo: s/custam/custom/
Brian Paul [Wed, 30 Apr 2008 19:24:35 +0000 (13:24 -0600)]
gallium: fix typo: s/custam/custom/

16 years agoplug a memleak, destroy setup context
Zack Rusin [Wed, 30 Apr 2008 18:05:49 +0000 (14:05 -0400)]
plug a memleak, destroy setup context

16 years agotry to fix the deleting of the bound cso during cleanup of the hash
Zack Rusin [Wed, 30 Apr 2008 06:04:28 +0000 (02:04 -0400)]
try to fix the deleting of the bound cso during cleanup of the hash

16 years agogallium: Fix release build.
José Fonseca [Wed, 30 Apr 2008 18:43:19 +0000 (03:43 +0900)]
gallium: Fix release build.

16 years agod3d: Windows miniport driver portability fixes.
José Fonseca [Wed, 30 Apr 2008 15:59:12 +0000 (00:59 +0900)]
d3d: Windows miniport driver portability fixes.

16 years agoscons: Try to cope with scons 0.98+.
José Fonseca [Wed, 30 Apr 2008 15:58:04 +0000 (00:58 +0900)]
scons: Try to cope with scons 0.98+.

16 years agogallium: use new buffer wrapper functions in p_inlines.h
Brian Paul [Wed, 30 Apr 2008 16:43:59 +0000 (10:43 -0600)]
gallium: use new buffer wrapper functions in p_inlines.h

This allows us to remove most of the direct references to winsys in the state tracker.

16 years agogallium: new pipe_buffer alloc/map/unmap/ref wrappers
Brian Paul [Wed, 30 Apr 2008 16:43:09 +0000 (10:43 -0600)]
gallium: new pipe_buffer alloc/map/unmap/ref wrappers

16 years agogallium: consolidate the bitmap->texel conversion code
Brian Paul [Wed, 30 Apr 2008 16:10:44 +0000 (10:10 -0600)]
gallium: consolidate the bitmap->texel conversion code

16 years agogallium: create a new texture each time we init/flush the bitmap cache
Brian Paul [Wed, 30 Apr 2008 16:00:44 +0000 (10:00 -0600)]
gallium: create a new texture each time we init/flush the bitmap cache

16 years agogallium: simplify texture format selection
Brian Paul [Wed, 30 Apr 2008 15:41:55 +0000 (09:41 -0600)]
gallium: simplify texture format selection

16 years agogallium: init hw_key with memset() to silence valgrind warnings
Brian Paul [Wed, 30 Apr 2008 00:34:14 +0000 (18:34 -0600)]
gallium: init hw_key with memset() to silence valgrind warnings

We shouldn't be hashing with keys that have uninitialized memory.

16 years agogallium: updated comment in xm_flush_frontbuffer()
Brian Paul [Fri, 25 Apr 2008 23:50:48 +0000 (17:50 -0600)]
gallium: updated comment in xm_flush_frontbuffer()

16 years agogallium: test for new PIPE_ARCH_X86
Brian Paul [Fri, 25 Apr 2008 22:50:56 +0000 (16:50 -0600)]
gallium: test for new PIPE_ARCH_X86

16 years agogallium: flush pipe before updating bitmap texture
Brian Paul [Tue, 29 Apr 2008 23:29:33 +0000 (17:29 -0600)]
gallium: flush pipe before updating bitmap texture

Fixes duplicated text bug in progs/tests/texwrap.c

16 years agosilence p_debug.h:63: warning: ISO C forbids forward references to ‘enum’ types
Zack Rusin [Tue, 29 Apr 2008 21:21:10 +0000 (17:21 -0400)]
silence p_debug.h:63: warning: ISO C forbids forward references to ‘enum’ types

16 years agodisable GL_TEXTURE_1D at end of frame to fix failed assertion
Brian Paul [Tue, 29 Apr 2008 21:03:06 +0000 (15:03 -0600)]
disable GL_TEXTURE_1D at end of frame to fix failed assertion

16 years agogallium: declare pipe_format enum to silence warnings
Brian Paul [Tue, 29 Apr 2008 20:39:42 +0000 (14:39 -0600)]
gallium: declare pipe_format enum to silence warnings

16 years agogallium: add pack for _FLOAT formats to pack_ub
Keith Whitwell [Tue, 29 Apr 2008 20:30:31 +0000 (21:30 +0100)]
gallium: add pack for _FLOAT formats to pack_ub

16 years agogallium: fix pack for A1R5B5G5
Keith Whitwell [Tue, 29 Apr 2008 20:30:04 +0000 (21:30 +0100)]
gallium: fix pack for A1R5B5G5

16 years agogallium: add pack for A4R4G4B4
Keith Whitwell [Tue, 29 Apr 2008 20:05:48 +0000 (21:05 +0100)]
gallium: add pack for A4R4G4B4

16 years agogallium: add pack for A1R5B5G5
Keith Whitwell [Tue, 29 Apr 2008 19:42:35 +0000 (20:42 +0100)]
gallium: add pack for A1R5B5G5

16 years agogallium: add debug_print_format() make it easier to print format error messages
Keith Whitwell [Tue, 29 Apr 2008 19:33:37 +0000 (20:33 +0100)]
gallium: add debug_print_format() make it easier to print format error messages

16 years agogallium: added some assertions to be sure the blit's surface formats are suitable
Brian Paul [Tue, 29 Apr 2008 18:55:41 +0000 (12:55 -0600)]
gallium: added some assertions to be sure the blit's surface formats are suitable

16 years agogallium: added some assertions to st_render_texture() to check surface format
Brian Paul [Tue, 29 Apr 2008 18:54:52 +0000 (12:54 -0600)]
gallium: added some assertions to st_render_texture() to check surface format

Make sure we can really render to the texture surface given its format.

16 years agogallium: fix broken GL_DEPTH_COMPONENT case in fallback_copy_texsubimage()
Brian Paul [Tue, 29 Apr 2008 18:53:37 +0000 (12:53 -0600)]
gallium: fix broken GL_DEPTH_COMPONENT case in fallback_copy_texsubimage()

Also, make sure surfaces are suitable for blitting before calling util_blit_pixels().

16 years agomesa: added _mesa_scale_and_bias_depth_uint()
Brian Paul [Tue, 29 Apr 2008 18:51:06 +0000 (12:51 -0600)]
mesa: added _mesa_scale_and_bias_depth_uint()

16 years agogallium: add \n to error strings
Brian Paul [Mon, 28 Apr 2008 22:33:15 +0000 (16:33 -0600)]
gallium: add \n to error strings

16 years agogallium: fix error msg typo
Brian Paul [Mon, 28 Apr 2008 22:32:42 +0000 (16:32 -0600)]
gallium: fix error msg typo

16 years agogallium: set border color
Roland Scheidegger [Tue, 29 Apr 2008 15:54:38 +0000 (17:54 +0200)]
gallium: set border color

16 years agomesa: explicitly delete textures before creating new ones
Brian Paul [Mon, 28 Apr 2008 20:20:11 +0000 (14:20 -0600)]
mesa: explicitly delete textures before creating new ones

Also, call glutDestroyWindow() upon exit.

16 years agogallium: fix incorrect level param in copy_image_data_to_texture()
Brian Paul [Mon, 28 Apr 2008 20:04:19 +0000 (14:04 -0600)]
gallium: fix incorrect level param in copy_image_data_to_texture()

This fixes a weird conform test failure that depended on something that
happened several tests earlier.  This took waaaaaay too long to find/fix.

16 years agotgsi: make loop structure clearer, use x86_lea for increments
Keith Whitwell [Mon, 28 Apr 2008 17:50:31 +0000 (18:50 +0100)]
tgsi: make loop structure clearer, use x86_lea for increments

16 years agotsgi: add a makefile
Keith Whitwell [Mon, 28 Apr 2008 17:43:27 +0000 (18:43 +0100)]
tsgi: add a makefile

16 years agotranslate: squash warnings
Keith Whitwell [Fri, 25 Apr 2008 14:28:54 +0000 (15:28 +0100)]
translate: squash warnings

16 years agopb: remove unused variable, squash warning
Keith Whitwell [Fri, 25 Apr 2008 14:27:33 +0000 (15:27 +0100)]
pb: remove unused variable, squash warning

16 years agogallium: Set SSE_SWIZZLES to 0 by default.
Michal Krol [Mon, 28 Apr 2008 17:03:20 +0000 (19:03 +0200)]
gallium: Set SSE_SWIZZLES to 0 by default.

16 years agogallium: Generate SSE code to swizzle and unswizzle vs inputs and outputs.
Michal Krol [Mon, 28 Apr 2008 16:50:27 +0000 (18:50 +0200)]
gallium: Generate SSE code to swizzle and unswizzle vs inputs and outputs.

Change SSE_SWIZZLES #define to 0 to disable it.

16 years agogallium: check for PIPE_FORMAT_X8Z24_UNORM format
Brian Paul [Mon, 28 Apr 2008 15:40:26 +0000 (09:40 -0600)]
gallium: check for PIPE_FORMAT_X8Z24_UNORM format

16 years agogallium: replace some code with a call to st_choose_format()
Brian Paul [Mon, 28 Apr 2008 15:39:48 +0000 (09:39 -0600)]
gallium: replace some code with a call to st_choose_format()

16 years agogallium: return enum pipe_format, not uint, for a few functions
Brian Paul [Mon, 28 Apr 2008 15:38:18 +0000 (09:38 -0600)]
gallium: return enum pipe_format, not uint, for a few functions

16 years agogallium: add cases for PIPE_FORMAT_X8Z24_UNORM
Brian Paul [Mon, 28 Apr 2008 15:33:20 +0000 (09:33 -0600)]
gallium: add cases for PIPE_FORMAT_X8Z24_UNORM

16 years agopipebuffer: Be extra cautious with the incoming buffers.
José Fonseca [Sun, 27 Apr 2008 12:19:34 +0000 (21:19 +0900)]
pipebuffer: Be extra cautious with the incoming buffers.

A common mistake is trying to fence user or malloc buffers. So don't let
the crash happen inside pipebuffer lib.

16 years agortasm: Implement x86_retw.
José Fonseca [Sun, 27 Apr 2008 12:09:45 +0000 (21:09 +0900)]
rtasm: Implement x86_retw.

16 years agogallium: fix broken SGT, SLE
Brian [Sat, 26 Apr 2008 01:25:26 +0000 (19:25 -0600)]
gallium: fix broken SGT, SLE

16 years agouse PIPE_ARCH_X86
Brian [Sat, 26 Apr 2008 00:46:29 +0000 (18:46 -0600)]
use PIPE_ARCH_X86

16 years agogallium: tweak comments, minor var renaming
Brian Paul [Fri, 25 Apr 2008 21:59:55 +0000 (15:59 -0600)]
gallium: tweak comments, minor var renaming

16 years agogallium: tweak comments, minor var renaming
Brian Paul [Fri, 25 Apr 2008 21:55:47 +0000 (15:55 -0600)]
gallium: tweak comments, minor var renaming

16 years agogallium: remove unneeded st->bitmap_texcoord_bias
Brian Paul [Fri, 25 Apr 2008 22:12:11 +0000 (16:12 -0600)]
gallium: remove unneeded st->bitmap_texcoord_bias

16 years agogallium: use simple color pass-through fragment shader if textures don't exist
Brian Paul [Fri, 25 Apr 2008 21:23:21 +0000 (15:23 -0600)]
gallium: use simple color pass-through fragment shader if textures don't exist

If we run out of texture memory we may not have the texture needed by the
fragment shader.  If this happens, plug in a color passthrough shader.
So instead of crashing, we just don't see the texture.
GL_OUT_OF_MEMORY is raised, of course.

16 years agogallium: added null ptr check
Brian Paul [Fri, 25 Apr 2008 21:21:00 +0000 (15:21 -0600)]
gallium: added null ptr check

16 years agogallium: added a null ptr check
Brian Paul [Fri, 25 Apr 2008 18:00:18 +0000 (12:00 -0600)]
gallium: added a null ptr check

16 years agogallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/
Brian Paul [Fri, 25 Apr 2008 20:15:42 +0000 (14:15 -0600)]
gallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/

16 years agogallium: consolidate quad drawing code
Brian Paul [Fri, 25 Apr 2008 20:14:09 +0000 (14:14 -0600)]
gallium: consolidate quad drawing code

16 years agogallium: remove unused st_draw_vertices()
Brian Paul [Fri, 25 Apr 2008 20:00:40 +0000 (14:00 -0600)]
gallium: remove unused st_draw_vertices()

16 years agogallium: use util_draw_vertex_buffer() instead of st_draw_vertices()
Brian Paul [Fri, 25 Apr 2008 19:59:25 +0000 (13:59 -0600)]
gallium: use util_draw_vertex_buffer() instead of st_draw_vertices()

16 years agoscons: Silent MSVC CRT security warnings.
José Fonseca [Fri, 25 Apr 2008 16:55:32 +0000 (01:55 +0900)]
scons: Silent MSVC CRT security warnings.

16 years agogallium: fix the compressed texture hack in st_texture_image_copy()
Brian Paul [Fri, 25 Apr 2008 16:33:48 +0000 (10:33 -0600)]
gallium: fix the compressed texture hack in st_texture_image_copy()

Actually, the hack is still there and needs to be revisited, but I get a bit
further with compressed textures now.

16 years agoscons: A few fixes for building mesa on windows.
José Fonseca [Fri, 25 Apr 2008 16:14:32 +0000 (01:14 +0900)]
scons: A few fixes for building mesa on windows.

16 years agodraw: emit extra flags whenever pipeline is active
Keith Whitwell [Fri, 25 Apr 2008 15:16:06 +0000 (16:16 +0100)]
draw: emit extra flags whenever pipeline is active

The assert was in fact over-sensitive, but emitting the extra flags
is pretty trivial & we may as well just do it whenever we know the
pipeline is running.

16 years agogallium: Use util_blit_pixels() for glCopyTexSubImage when appropriate.
Michel Dänzer [Fri, 25 Apr 2008 14:01:09 +0000 (15:01 +0100)]
gallium: Use util_blit_pixels() for glCopyTexSubImage when appropriate.

16 years agogallium: Add draw_pt_varray.c to scons build.
Michel Dänzer [Fri, 25 Apr 2008 13:57:50 +0000 (14:57 +0100)]
gallium: Add draw_pt_varray.c to scons build.

16 years agotgsi: fix compile when HIGH_PRECISION not defined
Keith Whitwell [Fri, 25 Apr 2008 13:20:02 +0000 (14:20 +0100)]
tgsi: fix compile when HIGH_PRECISION not defined

16 years agodraw: no need to special-case elts/get_elts for varray frontend
Keith Whitwell [Fri, 25 Apr 2008 13:10:32 +0000 (14:10 +0100)]
draw: no need to special-case elts/get_elts for varray frontend

16 years agodraw: remove unused vars
Keith Whitwell [Fri, 25 Apr 2008 13:10:02 +0000 (14:10 +0100)]
draw: remove unused vars

16 years agofrontend for rendering without elts
Zack Rusin [Thu, 24 Apr 2008 20:22:47 +0000 (16:22 -0400)]
frontend for rendering without elts

16 years agoscons: More windows userspace fixes.
José Fonseca [Fri, 25 Apr 2008 10:53:13 +0000 (19:53 +0900)]
scons: More windows userspace fixes.

16 years agogallium: Tell the driver the texture is updated when we finish rendering to it.
Michel Dänzer [Fri, 25 Apr 2008 09:34:20 +0000 (10:34 +0100)]
gallium: Tell the driver the texture is updated when we finish rendering to it.

16 years agogallium: Windows user mode portability fixes.
José Fonseca [Fri, 25 Apr 2008 09:19:51 +0000 (18:19 +0900)]
gallium: Windows user mode portability fixes.

16 years agogallium: New configuration header.
José Fonseca [Fri, 25 Apr 2008 09:18:48 +0000 (18:18 +0900)]
gallium: New configuration header.

To abstract all those weird #ifdef (__???__) checks.

It should typically be the first included header.

16 years agoscons: Teach scons about user-land windows.
José Fonseca [Fri, 25 Apr 2008 09:16:25 +0000 (18:16 +0900)]
scons: Teach scons about user-land windows.

Actually, more like get rid of all our hacks when compiling for
user-land windows.

Only MSVC is supported atm though.

16 years agogallium: fix an edgeflags crash
Brian Paul [Thu, 24 Apr 2008 22:40:08 +0000 (16:40 -0600)]
gallium: fix an edgeflags crash

16 years agodraw: remove old assignment of edgeflag value
Keith Whitwell [Thu, 24 Apr 2008 22:31:35 +0000 (23:31 +0100)]
draw: remove old assignment of edgeflag value

16 years agogallium: initial edgeflags code
Brian Paul [Thu, 24 Apr 2008 22:01:18 +0000 (16:01 -0600)]
gallium: initial edgeflags code

16 years agogallium: plug in softpipe_set_edgeflags() function
Brian Paul [Thu, 24 Apr 2008 21:59:08 +0000 (15:59 -0600)]
gallium: plug in softpipe_set_edgeflags() function

16 years agogallium: comments
Brian Paul [Thu, 24 Apr 2008 21:58:46 +0000 (15:58 -0600)]
gallium: comments

16 years agodraw: default edgeflag should be one
Keith Whitwell [Thu, 24 Apr 2008 20:13:56 +0000 (21:13 +0100)]
draw: default edgeflag should be one

16 years agogallium: disable the bitmap/texcoord bias
Brian Paul [Thu, 24 Apr 2008 19:44:40 +0000 (13:44 -0600)]
gallium: disable the bitmap/texcoord bias

Doesn't seem to be needed after fixing the float->int conversion problem.

16 years agomesa: adjust glBitmap coords by a small epsilon
Brian Paul [Thu, 24 Apr 2008 19:36:26 +0000 (13:36 -0600)]
mesa: adjust glBitmap coords by a small epsilon

Fixes problem with bitmaps jumping around by one pixel depending on window
size.  The rasterpos is often X.9999 instead of X+1.
Run progs/redbook/drawf and resize window to check.

16 years agogallium: use cso_destroy_vertex/fragment_shader() functions
Brian Paul [Thu, 24 Apr 2008 18:11:24 +0000 (12:11 -0600)]
gallium: use cso_destroy_vertex/fragment_shader() functions

Also, rearrange the st_destroy_context() code a bit to prevent some
invalid/NULL ptr derefs during tear-down.

16 years agogallium: make cso_release_all() public
Brian Paul [Thu, 24 Apr 2008 18:10:14 +0000 (12:10 -0600)]
gallium: make cso_release_all() public

16 years agogallium: minor clean-ups, comments
Brian Paul [Thu, 24 Apr 2008 17:59:22 +0000 (11:59 -0600)]
gallium: minor clean-ups, comments

16 years agogallium: tweak the new shader delete funcs
Brian Paul [Thu, 24 Apr 2008 17:56:06 +0000 (11:56 -0600)]
gallium: tweak the new shader delete funcs

16 years agogallium: added cso_delete_vertex_fragment_shader() functions
Brian Paul [Thu, 24 Apr 2008 17:52:37 +0000 (11:52 -0600)]
gallium: added cso_delete_vertex_fragment_shader() functions

The state tracker now uses these functions to free shaders, rather than
the pipe->delete_vs/fs-state() functions.  Before, we could get in a situation
where we free() a shader and happen to alloc() a new one at the same address.
The cso_set_vertex/fragment_shader() function would no-op the state change
since the pointers were the same.  This led to problems elsewhere, of course.

The new delete functions null-out the CSO's current shader pointers.

16 years agogallium: Make sure the size of non-existent storage components is set to 0.
Michel Dänzer [Thu, 24 Apr 2008 17:39:25 +0000 (18:39 +0100)]
gallium: Make sure the size of non-existent storage components is set to 0.

Before adding support for formats with unused storage components, the size of
components swizzled to 0 or 1 was ignored, so this didn't matter.

16 years agoi915: Fix for wrong texture in texobj with VBUF
Jakob Bornecrantz [Thu, 24 Apr 2008 15:07:45 +0000 (17:07 +0200)]
i915: Fix for wrong texture in texobj with VBUF

16 years agotranslate: Actually return a value from translate_cache_create().
Michal Krol [Thu, 24 Apr 2008 12:05:39 +0000 (14:05 +0200)]
translate: Actually return a value from translate_cache_create().

16 years agotrivial: simple edgeflag test
Keith Whitwell [Thu, 24 Apr 2008 11:38:58 +0000 (12:38 +0100)]
trivial: simple edgeflag test

16 years agodraw: handle edgeflags and reset-line-stipple again
Keith Whitwell [Thu, 24 Apr 2008 11:38:15 +0000 (12:38 +0100)]
draw: handle edgeflags and reset-line-stipple again

16 years agoxlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates...
Keith Whitwell [Thu, 24 Apr 2008 11:36:04 +0000 (12:36 +0100)]
xlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates fail