mesa.git
16 years agogallium: Fix memory leak.
Michal Krol [Thu, 14 Feb 2008 20:03:12 +0000 (21:03 +0100)]
gallium: Fix memory leak.

16 years agogallium: Fix memory leak.
Michal Krol [Thu, 14 Feb 2008 19:48:40 +0000 (20:48 +0100)]
gallium: Fix memory leak.

16 years agogallium: Use align_free() to free aligned memories.
Michal Krol [Thu, 14 Feb 2008 16:36:47 +0000 (17:36 +0100)]
gallium: Use align_free() to free aligned memories.

16 years agogallium: Fix build on Windows.
Michal Krol [Wed, 13 Feb 2008 16:51:41 +0000 (17:51 +0100)]
gallium: Fix build on Windows.

16 years agogallium: Use MALLOC().
Michal Krol [Thu, 7 Feb 2008 09:26:08 +0000 (10:26 +0100)]
gallium: Use MALLOC().

16 years agogallium: Fix MSVC compiler warnings.
José Fonseca [Tue, 12 Feb 2008 06:35:18 +0000 (15:35 +0900)]
gallium: Fix MSVC compiler warnings.

16 years agogallium: remove some debug assertions in vertex format validation
Brian [Fri, 15 Feb 2008 02:18:09 +0000 (19:18 -0700)]
gallium: remove some debug assertions in vertex format validation

If a fragment shader references an input for which there's no vertex
shader output (ex: texcoord3), use vertex output 0 by default.
Basically, the attribute's value will be undefined.  The shader writer
should never rely on undefined fragment shader inputs anyway.

16 years agogallium: rearrange vertex info/layout validation
Brian [Fri, 15 Feb 2008 01:58:50 +0000 (18:58 -0700)]
gallium: rearrange vertex info/layout validation

Delay validation until someone really needs the vertex layout (vbuf alloc
vertex buffer or point/line/tri setup/rendering).
This will allow the vertex size to change depending on whether we're
drawing points, lines or triangles.

16 years agogallium: include draw_context.h to silence warning
Brian [Fri, 15 Feb 2008 01:53:18 +0000 (18:53 -0700)]
gallium: include draw_context.h to silence warning

16 years agogallium: minor function renaming
Brian [Fri, 15 Feb 2008 01:03:38 +0000 (18:03 -0700)]
gallium: minor function renaming

16 years agogallium: new tgsi_transform_shader() function
Brian [Fri, 15 Feb 2008 01:02:36 +0000 (18:02 -0700)]
gallium: new tgsi_transform_shader() function

Used to apply transformations to TGSI shaders, such as register search and
replace.

16 years agogallium: new pgon-mode.c test
Brian [Thu, 14 Feb 2008 21:54:37 +0000 (14:54 -0700)]
gallium: new pgon-mode.c test

A two-triangle strip is drawn such that the first tri is front-facing and
the second tri is back-facing.  Use different front/back polygon modes.

16 years agogallium: call draw_flush() in softpipe_flush()
Brian [Thu, 14 Feb 2008 21:48:35 +0000 (14:48 -0700)]
gallium: call draw_flush() in softpipe_flush()

Without this, we might not get any rendering at SwapBuffers time when using the vbuf path.

16 years agogallium: fix some "instruction"/"declaration" mix-ups in tgsi_exec_prepare().
Brian [Thu, 14 Feb 2008 21:22:22 +0000 (14:22 -0700)]
gallium: fix some "instruction"/"declaration" mix-ups in tgsi_exec_prepare().

16 years agogallium: replace "interpolate" terminology with "eval" to better reflect what's being...
Brian [Thu, 14 Feb 2008 21:20:51 +0000 (14:20 -0700)]
gallium: replace "interpolate" terminology with "eval" to better reflect what's being done.

16 years agogallium: changes to polygon mode weren't detected in draw_unfilled stage.
Brian [Thu, 14 Feb 2008 21:15:52 +0000 (14:15 -0700)]
gallium: changes to polygon mode weren't detected in draw_unfilled stage.

Need to reset stage->tri = unfilled_first_try in unfilled_flush() so that the
front/back state is picked up.

16 years agogallium: rename draw_free_tmps->draw_free_temp_verts, draw_alloc_tmps->draw_alloc_tem...
Brian [Wed, 13 Feb 2008 17:25:38 +0000 (10:25 -0700)]
gallium: rename draw_free_tmps->draw_free_temp_verts, draw_alloc_tmps->draw_alloc_temp_verts

16 years agogalllium: comments, minor clean-ups
Brian [Wed, 13 Feb 2008 15:20:51 +0000 (08:20 -0700)]
galllium: comments, minor clean-ups

16 years agoMore name typeo fixes.
Ian Romanick [Fri, 15 Feb 2008 01:42:34 +0000 (17:42 -0800)]
More name typeo fixes.

16 years agos/spu_/spe_/g Ugh.
Ian Romanick [Fri, 15 Feb 2008 01:06:13 +0000 (17:06 -0800)]
s/spu_/spe_/g  Ugh.

16 years agoCell: pass pointers to stored memory values
Ian Romanick [Fri, 15 Feb 2008 00:53:05 +0000 (16:53 -0800)]
Cell: pass pointers to stored memory values

Several routines use shuffle patterns that are stored in memory.  For
code gen, it is difficult to directly access the data segments.  The
routines have been modified to be passed a pointer to a global table
of shuffle patterns.

This *should* be the last change to this file before switching over to
code gen.

16 years agoCell: Fix unintended breakage from commit 1d62a057bcb3ee4ef6ebedd93f62ed2e0d8061ba
Ian Romanick [Thu, 14 Feb 2008 19:55:19 +0000 (11:55 -0800)]
Cell: Fix unintended breakage from commit 1d62a057bcb3ee4ef6ebedd93f62ed2e0d8061ba

16 years agoReal-time assembler for Cell SPE.
Ian Romanick [Thu, 14 Feb 2008 18:08:11 +0000 (10:08 -0800)]
Real-time assembler for Cell SPE.

16 years agoFetch routines convert and transpose all 4 vertices at once.
Ian Romanick [Tue, 12 Feb 2008 19:29:34 +0000 (11:29 -0800)]
Fetch routines convert and transpose all 4 vertices at once.

16 years agoRemove open-coded fetch functions
Ian Romanick [Tue, 12 Feb 2008 19:18:53 +0000 (11:18 -0800)]
Remove open-coded fetch functions

16 years agoInitial pass at vertex cache, more vertex fetch changes
Ian Romanick [Tue, 12 Feb 2008 19:16:38 +0000 (11:16 -0800)]
Initial pass at vertex cache, more vertex fetch changes

This is just another step towards dynamic generate of vertex fetch code.

16 years agoVectorize a couple fetch functions
Ian Romanick [Mon, 11 Feb 2008 23:27:13 +0000 (15:27 -0800)]
Vectorize a couple fetch functions

These C-coded vectorized functions are expected to be short lived.
They're basically a proof-of-concept for dynamically generated fetch
routines.

16 years agointel_winsys: Call st_notify_swapbuffers_complete() after buffer swap.
Michel Dänzer [Thu, 14 Feb 2008 17:42:52 +0000 (17:42 +0000)]
intel_winsys: Call st_notify_swapbuffers_complete() after buffer swap.

16 years agogallium: Cleanups related to clears.
Keith Whitwell [Thu, 14 Feb 2008 16:53:51 +0000 (16:53 +0000)]
gallium: Cleanups related to clears.

16 years agomake swizzling on incoming arguments work
Zack Rusin [Wed, 13 Feb 2008 14:26:56 +0000 (09:26 -0500)]
make swizzling on incoming arguments work

16 years agoget rid of the terrible auto-generated entry point
Zack Rusin [Wed, 13 Feb 2008 13:46:05 +0000 (08:46 -0500)]
get rid of the terrible auto-generated entry point

it's not used anymore.

16 years agoimplement immediates and make them work
Zack Rusin [Wed, 13 Feb 2008 13:31:13 +0000 (08:31 -0500)]
implement immediates and make them work

16 years agotry to load the consts correctly
Zack Rusin [Wed, 13 Feb 2008 12:28:26 +0000 (07:28 -0500)]
try to load the consts correctly

16 years agox86: remove debug
Keith Whitwell [Wed, 13 Feb 2008 12:37:42 +0000 (12:37 +0000)]
x86: remove debug

16 years agox86: emit absolute calls, as reallocating exec mem breaks relative ones
Keith Whitwell [Wed, 13 Feb 2008 12:35:16 +0000 (12:35 +0000)]
x86: emit absolute calls, as reallocating exec mem breaks relative ones

16 years agotgsi: fail gracefully when sse code can't emit shader
Keith Whitwell [Wed, 13 Feb 2008 11:39:34 +0000 (11:39 +0000)]
tgsi: fail gracefully when sse code can't emit shader

16 years agox86: reallocate exec mem when we run out
Keith Whitwell [Wed, 13 Feb 2008 11:35:54 +0000 (11:35 +0000)]
x86: reallocate exec mem when we run out

16 years agotgsi: include more of the register info in debug dumps
Keith Whitwell [Wed, 13 Feb 2008 10:02:59 +0000 (10:02 +0000)]
tgsi: include more of the register info in debug dumps

16 years agogallium: pipe->surface_copy can flip the contents vertically when necessary.
Michel Dänzer [Wed, 13 Feb 2008 11:39:58 +0000 (11:39 +0000)]
gallium: pipe->surface_copy can flip the contents vertically when necessary.

Fixes gears being upside down on the box in demos/gearbox.

16 years agohandle temporaries in llvm code generated paths
Zack Rusin [Wed, 13 Feb 2008 09:38:10 +0000 (04:38 -0500)]
handle temporaries in llvm code generated paths

16 years agoimplement add
Zack Rusin [Wed, 13 Feb 2008 09:37:40 +0000 (04:37 -0500)]
implement add

16 years agoimplement mul
Zack Rusin [Wed, 13 Feb 2008 08:18:37 +0000 (03:18 -0500)]
implement mul

16 years agoget mov working
Zack Rusin [Wed, 13 Feb 2008 05:48:08 +0000 (00:48 -0500)]
get mov working

16 years agofix fetching input elements and generate a ret on end
Zack Rusin [Wed, 13 Feb 2008 05:36:31 +0000 (00:36 -0500)]
fix fetching input elements and generate a ret on end

16 years agoadd functiontype for the llvm native vs entry point
Zack Rusin [Wed, 13 Feb 2008 05:21:24 +0000 (00:21 -0500)]
add functiontype for the llvm native vs entry point

16 years agodisable llvm code in fs
Zack Rusin [Wed, 13 Feb 2008 05:21:03 +0000 (00:21 -0500)]
disable llvm code in fs

16 years agostop generate llvm entry points
Zack Rusin [Wed, 13 Feb 2008 04:08:42 +0000 (23:08 -0500)]
stop generate llvm entry points

entrypoints are useless because we use the same paths as all other
code. also simplify llvm swizzling code

16 years agollvm ir code to fetch the elements
Zack Rusin [Tue, 12 Feb 2008 10:35:51 +0000 (05:35 -0500)]
llvm ir code to fetch the elements

16 years agogallium: initial code for wide/AA line drawing
Brian [Wed, 13 Feb 2008 02:14:58 +0000 (19:14 -0700)]
gallium: initial code for wide/AA line drawing

16 years agogallium: fix/finish glReadPixels(GL_DEPTH_COMPONENT).
Brian [Wed, 13 Feb 2008 00:44:57 +0000 (17:44 -0700)]
gallium: fix/finish glReadPixels(GL_DEPTH_COMPONENT).

This fixes demos/reflect ('d' key) and tests/zreaddraw.c

16 years agogallium: clamp min_lod so it's never negative
Brian [Wed, 13 Feb 2008 00:07:27 +0000 (17:07 -0700)]
gallium: clamp min_lod so it's never negative

16 years agoFix broken test.
Brian [Tue, 12 Feb 2008 23:56:18 +0000 (16:56 -0700)]
Fix broken test.

As-is, if the texture was too large for the target, an assertion would fail.
Now check proxy texture first and if it works, then test non-proxy target.

16 years agogallium: remove dead code
Brian [Tue, 12 Feb 2008 23:38:56 +0000 (16:38 -0700)]
gallium: remove dead code

16 years agogallium: added null ptr check
Brian [Tue, 12 Feb 2008 23:37:49 +0000 (16:37 -0700)]
gallium: added null ptr check

16 years agogallium: rename st_fragment_program's fs field to cso to match st_vertex_program
Brian [Tue, 12 Feb 2008 23:10:11 +0000 (16:10 -0700)]
gallium: rename st_fragment_program's fs field to cso to match st_vertex_program

16 years agogallium: move gen-mipmap global/static vars into st_context
Brian [Tue, 12 Feb 2008 23:06:51 +0000 (16:06 -0700)]
gallium: move gen-mipmap global/static vars into st_context

This fixes potential problems with multi-context programs.

16 years agoSet Min/MaxLod with glTexParameterf, not glTexParameteri
Brian [Tue, 12 Feb 2008 22:53:37 +0000 (15:53 -0700)]
Set Min/MaxLod with glTexParameterf, not glTexParameteri

16 years agopress 0,1,2,etc keys for specific bias values
Brian [Mon, 11 Feb 2008 16:46:10 +0000 (09:46 -0700)]
press 0,1,2,etc keys for specific bias values

16 years agotweak incr/decrements amounts for keyboard options
Brian [Tue, 12 Feb 2008 21:59:07 +0000 (14:59 -0700)]
tweak incr/decrements amounts for keyboard options

16 years agogallium: remove unused first_level param from st_texture_create()
Brian [Tue, 12 Feb 2008 21:55:51 +0000 (14:55 -0700)]
gallium: remove unused first_level param from st_texture_create()

16 years agogallium: clean-up, simplification of mipmapped textures
Brian [Tue, 12 Feb 2008 21:53:25 +0000 (14:53 -0700)]
gallium: clean-up, simplification of mipmapped textures

Remove pipe_texture->first_level (always implicitly zero).  This means there's
never any unused mipmap levels at the top.
In the state tracker, we no longer re-layout mipmapped textures if the
MinLod/MaxLod texture parameters change.  It's up to the driver to obey the
pipe_sampler->min/max_lod clamps.

16 years agogallium: take pitch/stride into account in mipmap generation
Brian [Mon, 11 Feb 2008 17:59:40 +0000 (10:59 -0700)]
gallium: take pitch/stride into account in mipmap generation

16 years agogallium: comments about mipmap gen
Brian [Mon, 11 Feb 2008 16:50:21 +0000 (09:50 -0700)]
gallium: comments about mipmap gen

16 years agocode refactoring, new next_mipmap_level_size() function
Brian [Mon, 11 Feb 2008 16:43:30 +0000 (09:43 -0700)]
code refactoring, new next_mipmap_level_size() function

16 years agogallium: implement software fallback for mipmap generation
Brian [Mon, 11 Feb 2008 16:42:02 +0000 (09:42 -0700)]
gallium: implement software fallback for mipmap generation

This is used when we can't render to the surface type of the texture (such
as luminance/alpha).

16 years agogallium: strip borders from textures passed to st_TexImage.
Brian [Mon, 11 Feb 2008 16:38:36 +0000 (09:38 -0700)]
gallium: strip borders from textures passed to st_TexImage.

Manipulate the unpack params to skip the border.  Gallium drivers won't support
texture borders.

16 years agogallium: use _mesa_tex_target_to_face()
Brian [Mon, 11 Feb 2008 16:35:28 +0000 (09:35 -0700)]
gallium: use _mesa_tex_target_to_face()

16 years agoadded _mesa_tex_target_to_face()
Brian [Mon, 11 Feb 2008 16:33:28 +0000 (09:33 -0700)]
added _mesa_tex_target_to_face()

16 years agogallium: update comment about buffer map flags
Brian [Mon, 11 Feb 2008 15:56:18 +0000 (08:56 -0700)]
gallium: update comment about buffer map flags

16 years agogallium: fix fragment/vertex typo
Brian [Mon, 11 Feb 2008 15:18:43 +0000 (08:18 -0700)]
gallium: fix fragment/vertex typo

16 years agorefactor code, export _mesa_generate_mipmap_level()
Brian [Fri, 8 Feb 2008 23:56:21 +0000 (16:56 -0700)]
refactor code, export _mesa_generate_mipmap_level()

16 years agomove _mesa_format_to_type_and_comps() to texformat.c
Brian [Fri, 8 Feb 2008 23:46:12 +0000 (16:46 -0700)]
move _mesa_format_to_type_and_comps() to texformat.c

16 years agoreorder cases in do_row()
Brian [Fri, 8 Feb 2008 23:42:50 +0000 (16:42 -0700)]
reorder cases in do_row()

16 years agore-indent do_row()
Brian [Fri, 8 Feb 2008 23:40:39 +0000 (16:40 -0700)]
re-indent do_row()

16 years agocheckpoint- consolidation in do_row()
Brian [Fri, 8 Feb 2008 23:38:28 +0000 (16:38 -0700)]
checkpoint- consolidation in do_row()

16 years agocheckpoint- remove dependencies on gl_texture_format to make code re-usable by state...
Brian [Fri, 8 Feb 2008 23:35:44 +0000 (16:35 -0700)]
checkpoint- remove dependencies on gl_texture_format to make code re-usable by state tracker

16 years agoremove seperate llvm vs entry points
Zack Rusin [Mon, 11 Feb 2008 15:47:28 +0000 (10:47 -0500)]
remove seperate llvm vs entry points

they're not necessary anymore. we use the same paths
as sse and tgsi code

16 years agostart genering soa type code in llvm paths
Zack Rusin [Mon, 11 Feb 2008 14:43:59 +0000 (09:43 -0500)]
start genering soa type code in llvm paths

16 years agodisable llvm for fragment shaders for now
Zack Rusin [Wed, 6 Feb 2008 11:12:34 +0000 (06:12 -0500)]
disable llvm for fragment shaders for now

16 years agorewrite the way cpu engine is handled
Zack Rusin [Tue, 5 Feb 2008 08:09:24 +0000 (03:09 -0500)]
rewrite the way cpu engine is handled

16 years agorewrite the way we handle ir in llvm code
Zack Rusin [Mon, 4 Feb 2008 15:07:02 +0000 (10:07 -0500)]
rewrite the way we handle ir in llvm code

introduce intermediate step gallivm_ir before compiling it
down to the final llvm ir.

16 years agoadd a stub of a lowering pass
Zack Rusin [Fri, 25 Jan 2008 11:36:35 +0000 (06:36 -0500)]
add a stub of a lowering pass

16 years agogallium: include st_cb_drawpixels.h
Brian [Fri, 8 Feb 2008 21:56:38 +0000 (14:56 -0700)]
gallium: include st_cb_drawpixels.h

16 years agofix comment typos
Brian [Fri, 8 Feb 2008 21:55:33 +0000 (14:55 -0700)]
fix comment typos

16 years agogallium: initial implemenation of auto mipmap generation in state tracker
Brian [Fri, 8 Feb 2008 21:54:18 +0000 (14:54 -0700)]
gallium: initial implemenation of auto mipmap generation in state tracker

Use hardware rendering to compute/render mipmap levels.
The fallback path (which will be used for non-renderable texture formats)
isn't working yet.

16 years agogallium: added inClipCoords param to st_draw_vertices() to indicate coord system...
Brian [Fri, 8 Feb 2008 21:51:32 +0000 (14:51 -0700)]
gallium: added inClipCoords param to st_draw_vertices() to indicate coord system of vertices

Also, export st_make_passthrough_vertex_shader() from st_cb_drawpixels.c

16 years agogallium: added draw_flush() call in softpipe_bind_sampler_state()
Brian [Fri, 8 Feb 2008 21:46:47 +0000 (14:46 -0700)]
gallium: added draw_flush() call in softpipe_bind_sampler_state()

16 years agoRemove unused texunit parameter to ctx->Driver.GenerateMipmap()
Brian [Fri, 8 Feb 2008 21:45:58 +0000 (14:45 -0700)]
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()

16 years agointel_winsys: remove leftover code
Jerome Glisse [Fri, 8 Feb 2008 17:47:25 +0000 (18:47 +0100)]
intel_winsys: remove leftover code

16 years agofailover: several fixes to failover pipe module
Jerome Glisse [Fri, 8 Feb 2008 17:25:49 +0000 (18:25 +0100)]
failover: several fixes to failover pipe module

16 years agotgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.
Michel Dänzer [Thu, 7 Feb 2008 19:44:42 +0000 (19:44 +0000)]
tgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.

16 years agopipebuffer: Fix reversed assertion.
Michel Dänzer [Thu, 7 Feb 2008 19:43:34 +0000 (19:43 +0000)]
pipebuffer: Fix reversed assertion.

16 years agogallium: Conditionally use posix libraries/includes.
José Fonseca [Thu, 7 Feb 2008 10:59:17 +0000 (19:59 +0900)]
gallium: Conditionally use posix libraries/includes.

16 years agoCell: silence unused var warnings
Brian [Wed, 6 Feb 2008 16:48:56 +0000 (09:48 -0700)]
Cell: silence unused var warnings

16 years agogallium: #include p_debug.h since we use assert
Brian [Wed, 6 Feb 2008 16:48:37 +0000 (09:48 -0700)]
gallium: #include p_debug.h since we use assert

16 years agoCell: use mem_dup()
Brian [Wed, 6 Feb 2008 16:35:33 +0000 (09:35 -0700)]
Cell: use mem_dup()

16 years agogallium: use mem_dup()
Brian [Wed, 6 Feb 2008 16:29:00 +0000 (09:29 -0700)]
gallium: use mem_dup()

16 years agogallium: added mem_dup()
Brian [Wed, 6 Feb 2008 16:28:20 +0000 (09:28 -0700)]
gallium: added mem_dup()

16 years agogallium: change pipe->texture_create() to operate like the CSO functions
Brian [Wed, 6 Feb 2008 16:24:30 +0000 (09:24 -0700)]
gallium: change pipe->texture_create() to operate like the CSO functions

Now, pass in a template object and return a new object.

16 years agoclean-ups in guess_and_alloc_texture()
Brian [Wed, 6 Feb 2008 15:44:19 +0000 (08:44 -0700)]
clean-ups in guess_and_alloc_texture()