mesa.git
17 years agosimplify code which access the current vertex/fragment shaders
Brian [Mon, 29 Oct 2007 15:24:29 +0000 (09:24 -0600)]
simplify code which access the current vertex/fragment shaders

17 years agoDisable the else clause which assigns the default fragment program to ctx->FragmentPr...
Brian [Mon, 29 Oct 2007 15:23:46 +0000 (09:23 -0600)]
Disable the else clause which assigns the default fragment program to ctx->FragmentProgram._Current

The _Current field should either point to the fragment program which is to be
run (GLSL, ARB_f_p, fixed-func-generated, etc) or be NULL if conventional
fixed-function code is to be used.  Matches TNL program code.

17 years agoRemove conditionals from the makefiles.
Zack Rusin [Mon, 29 Oct 2007 14:01:29 +0000 (10:01 -0400)]
Remove conditionals from the makefiles.

17 years agoRemove typedefs from enums.
Zack Rusin [Mon, 29 Oct 2007 12:35:08 +0000 (08:35 -0400)]
Remove typedefs from enums.

typedefs are rather evil, remove them and use the enum
keyword explicitely.

17 years agoRefactor the LLVM code a bit.
Zack Rusin [Mon, 29 Oct 2007 12:27:32 +0000 (08:27 -0400)]
Refactor the LLVM code a bit.

Move the CPU vertex shader execution code to the draw
module, remove traces of LLVM from the state tracker,
abstract execution engine for the purposes of the draw module.

17 years agoMake sure the swizzling vector is being recreated for each function. This makes
Zack Rusin [Fri, 26 Oct 2007 23:53:53 +0000 (19:53 -0400)]
Make sure the swizzling vector is being recreated for each function. This makes

GLSL bricks work.

17 years agoAdd SSE dump facilities.
Michal Krol [Mon, 29 Oct 2007 13:21:17 +0000 (13:21 +0000)]
Add SSE dump facilities.

Wrap x86_, sse_ and sse2 rtasm calls in emit_ calls.
Those emit_ calls, if required, dump instructions to stdout.
SSE dumping disabled by default.

17 years agoCode re-org. Add comments.
Michal Krol [Mon, 29 Oct 2007 12:14:54 +0000 (12:14 +0000)]
Code re-org. Add comments.

17 years agoImplement RET opcode.
Michal Krol [Mon, 29 Oct 2007 11:45:42 +0000 (11:45 +0000)]
Implement RET opcode.

17 years agoRemove TGSI_INTERPOLATE_ATTRIB.
Michal Krol [Mon, 29 Oct 2007 11:40:09 +0000 (11:40 +0000)]
Remove TGSI_INTERPOLATE_ATTRIB.

17 years agoFix i915simple build.
José Fonseca [Mon, 29 Oct 2007 12:29:06 +0000 (12:29 +0000)]
Fix i915simple build.

17 years agoReuse hardware vertice representation.
José Fonseca [Mon, 29 Oct 2007 12:14:52 +0000 (12:14 +0000)]
Reuse hardware vertice representation.

17 years agoEnable the vertex buffer stage according to the I915_VBUF environment var.
José Fonseca [Mon, 29 Oct 2007 11:51:04 +0000 (11:51 +0000)]
Enable the vertex buffer stage according to the I915_VBUF environment var.

17 years agoGet vertex buffer stage in a minimally working state.
José Fonseca [Mon, 29 Oct 2007 11:49:59 +0000 (11:49 +0000)]
Get vertex buffer stage in a minimally working state.

17 years agoReserve the accurate number of dwords in the batch buffer.
José Fonseca [Mon, 29 Oct 2007 10:25:02 +0000 (10:25 +0000)]
Reserve the accurate number of dwords in the batch buffer.

17 years agoStart a vertex buffer constuction stage for i915 based on Keith's draft done on softpipe.
José Fonseca [Fri, 26 Oct 2007 18:30:04 +0000 (19:30 +0100)]
Start a vertex buffer constuction stage for i915 based on Keith's draft done on softpipe.

17 years agoFix newlines.
Michal Krol [Mon, 29 Oct 2007 11:03:37 +0000 (11:03 +0000)]
Fix newlines.

17 years agoRemove unused static functions.
Michal Krol [Sun, 28 Oct 2007 17:53:02 +0000 (17:53 +0000)]
Remove unused static functions.

17 years agoUpdate comments.
Michal Krol [Sun, 28 Oct 2007 17:48:46 +0000 (17:48 +0000)]
Update comments.

17 years agoReplace supported_formats with is_format_supported interface.
Michal Krol [Sun, 28 Oct 2007 17:19:39 +0000 (17:19 +0000)]
Replace supported_formats with is_format_supported interface.

The old supported_formats interface returned a list of formats
supported by a pipe/winsys implementation. This was reasonable
when gallium had a fixed list of predefined format.
Now things has changed and the definition of PIPE_FORMAT is
more flexible.
The new shiny is_format_supported interface gets PIPE_FORMAT
as an argument and returns a boolean whether this particular
format is supported.

17 years agoUse FREE and MALLOC instead of free and malloc.
Michal Krol [Sun, 28 Oct 2007 16:36:07 +0000 (16:36 +0000)]
Use FREE and MALLOC instead of free and malloc.

17 years agoRework sse-utility function calls.
Michal Krol [Sun, 28 Oct 2007 16:16:28 +0000 (16:16 +0000)]
Rework sse-utility function calls.

17 years agoDeclare temporaries in a more compact fashion.
michal [Sun, 28 Oct 2007 14:42:26 +0000 (14:42 +0000)]
Declare temporaries in a more compact fashion.

The following declarations:
   DCL TEMP[0]
   DCL TEMP[1]
   DCL TEMP[2]
   DCL TEMP[4]
become:
   DCL TEMP[0..2]
   DCL TEMP[4]

17 years agoDeclare temporaries in a more compact fashion.
michal [Sun, 28 Oct 2007 14:42:26 +0000 (14:42 +0000)]
Declare temporaries in a more compact fashion.

The following declarations:
   DCL TEMP[0]
   DCL TEMP[1]
   DCL TEMP[2]
   DCL TEMP[4]
become:
   DCL TEMP[0..2]
   DCL TEMP[4]

17 years agoControl FS TGSI dumping with GALLIUM_DUMP_FS env variable.
michal [Sun, 28 Oct 2007 14:27:02 +0000 (14:27 +0000)]
Control FS TGSI dumping with GALLIUM_DUMP_FS env variable.

17 years agoFix newlines.
michal [Sun, 28 Oct 2007 14:26:04 +0000 (14:26 +0000)]
Fix newlines.

17 years agoUse FREE instead of free. Fix newlines.
michal [Sat, 27 Oct 2007 17:53:38 +0000 (18:53 +0100)]
Use FREE instead of free. Fix newlines.

17 years agoEnable SSE path.
michal [Sat, 27 Oct 2007 17:43:49 +0000 (18:43 +0100)]
Enable SSE path.

17 years agoFix fragment shader.
michal [Sat, 27 Oct 2007 17:42:20 +0000 (18:42 +0100)]
Fix fragment shader.

17 years agoOptimize fragment program.
michal [Sat, 27 Oct 2007 17:41:47 +0000 (18:41 +0100)]
Optimize fragment program.

17 years agoUse PIPE_FORMAT in state tracker.
michal [Sat, 27 Oct 2007 16:30:23 +0000 (17:30 +0100)]
Use PIPE_FORMAT in state tracker.

Fix PIPE_FORMAT field encoding.
Re-implement st_get_format_info.

17 years agoRefactor supported format queries.
michal [Sat, 27 Oct 2007 14:55:11 +0000 (15:55 +0100)]
Refactor supported format queries.

17 years agoRespect use_sse flag.
michal [Sat, 27 Oct 2007 14:08:00 +0000 (15:08 +0100)]
Respect use_sse flag.

17 years agoFix SSE bug.
michal [Sat, 27 Oct 2007 14:07:09 +0000 (15:07 +0100)]
Fix SSE bug.

17 years agoAdd #ifs.
michal [Sat, 27 Oct 2007 13:42:17 +0000 (14:42 +0100)]
Add #ifs.

17 years agovertex_element::src_format needs 32 bits.
michal [Sat, 27 Oct 2007 13:41:16 +0000 (14:41 +0100)]
vertex_element::src_format needs 32 bits.

17 years agoRespect use_sse flag.
michal [Sat, 27 Oct 2007 13:40:22 +0000 (14:40 +0100)]
Respect use_sse flag.

17 years agoRemove PIPE_FORMAT_COUNT references.
michal [Sat, 27 Oct 2007 13:06:14 +0000 (14:06 +0100)]
Remove PIPE_FORMAT_COUNT references.

17 years agoEnable SSE2 for fragment shaders.
michal [Sat, 27 Oct 2007 13:05:13 +0000 (14:05 +0100)]
Enable SSE2 for fragment shaders.

17 years agoEnable SSE2 for vertex shaders.
michal [Sat, 27 Oct 2007 13:01:39 +0000 (14:01 +0100)]
Enable SSE2 for vertex shaders.

17 years agoFix YCBCR macro.
michal [Sat, 27 Oct 2007 12:35:46 +0000 (13:35 +0100)]
Fix YCBCR macro.

Fix line endings.

17 years agoFix alignment problems.
michal [Fri, 26 Oct 2007 17:00:35 +0000 (18:00 +0100)]
Fix alignment problems.

Remove NOP opcode.
TEX opcode returns solid white (a hack for D3D state tracker).

17 years agoRemove GL dependencies.
michal [Fri, 26 Oct 2007 16:53:56 +0000 (17:53 +0100)]
Remove GL dependencies.

17 years agoDefine destroy method called by softpipe's destructor.
michal [Fri, 26 Oct 2007 16:25:09 +0000 (17:25 +0100)]
Define destroy method called by softpipe's destructor.

17 years agoSilence compiler warnings.
michal [Fri, 26 Oct 2007 16:21:30 +0000 (17:21 +0100)]
Silence compiler warnings.

17 years agoSilence compiler warnings.
michal [Fri, 26 Oct 2007 16:20:53 +0000 (17:20 +0100)]
Silence compiler warnings.

17 years agoCall quad stage destructors.
michal [Fri, 26 Oct 2007 16:20:11 +0000 (17:20 +0100)]
Call quad stage destructors.

17 years agoRemove llvm and sse2 dependencies.
michal [Fri, 26 Oct 2007 16:19:20 +0000 (17:19 +0100)]
Remove llvm and sse2 dependencies.

17 years agoMove format definitions from p_defines.h to p_format.h.
michal [Fri, 26 Oct 2007 16:17:52 +0000 (17:17 +0100)]
Move format definitions from p_defines.h to p_format.h.

PIPE_FORMAT is not an ordinary enum -- it encodes its
format description in the value that defines it.

17 years agoAdd sse2_program to draw_vertex_shader.
michal [Fri, 26 Oct 2007 16:15:30 +0000 (17:15 +0100)]
Add sse2_program to draw_vertex_shader.

17 years agoSilence compiler warnings.
michal [Fri, 26 Oct 2007 16:14:29 +0000 (17:14 +0100)]
Silence compiler warnings.

17 years agoRemove llvm dependencies.
michal [Fri, 26 Oct 2007 16:12:25 +0000 (17:12 +0100)]
Remove llvm dependencies.

17 years agoNew comments, replace //-style with /* */
Brian [Sat, 27 Oct 2007 15:43:28 +0000 (09:43 -0600)]
New comments, replace //-style with /* */

17 years agoindentation fixes
Brian [Sat, 27 Oct 2007 15:38:41 +0000 (09:38 -0600)]
indentation fixes

17 years agos/GLbitfield/uint/
Brian [Sat, 27 Oct 2007 15:37:40 +0000 (09:37 -0600)]
s/GLbitfield/uint/

17 years agoremove #define MESA stuff
Brian [Sat, 27 Oct 2007 15:36:43 +0000 (09:36 -0600)]
remove #define MESA stuff

17 years agos/256/TGSI_EXEC_NUM_IMMEDIATES/
Brian [Sat, 27 Oct 2007 15:35:51 +0000 (09:35 -0600)]
s/256/TGSI_EXEC_NUM_IMMEDIATES/

17 years agoindentation fixes
Brian [Sat, 27 Oct 2007 15:33:50 +0000 (09:33 -0600)]
indentation fixes

17 years agoComments about texture instructions and the src regs
Brian [Sat, 27 Oct 2007 15:32:50 +0000 (09:32 -0600)]
Comments about texture instructions and the src regs

17 years agoRemove remnants of softpipe_surface.
Brian [Sat, 27 Oct 2007 15:26:59 +0000 (09:26 -0600)]
Remove remnants of softpipe_surface.

This is the last of the clean-up following the change which moved surface
allocation to the winsys layer.

17 years agoObsolete
Brian [Sat, 27 Oct 2007 15:04:43 +0000 (09:04 -0600)]
Obsolete

17 years agoMove mesa_to_tgsi.[ch] to state_tracker
Brian [Sat, 27 Oct 2007 15:03:15 +0000 (09:03 -0600)]
Move mesa_to_tgsi.[ch] to state_tracker

17 years agoMove mesa_to_tgsi.[ch] into state tracker.
Brian [Sat, 27 Oct 2007 15:02:40 +0000 (09:02 -0600)]
Move mesa_to_tgsi.[ch] into state tracker.

17 years agoFix up handling of immediate values for TGSI shaders.
Brian [Sat, 27 Oct 2007 01:31:35 +0000 (19:31 -0600)]
Fix up handling of immediate values for TGSI shaders.

Still disabled pending LLVM updates.

17 years agoturn off debug output
Brian [Sat, 27 Oct 2007 01:29:38 +0000 (19:29 -0600)]
turn off debug output

17 years agoRe-implement GLSL texture sampler variables.
Brian [Sat, 27 Oct 2007 01:19:09 +0000 (19:19 -0600)]
Re-implement GLSL texture sampler variables.

GLSL sampler variables indicate which texture unit to use for TEX instructions.
Previously, this was baked into the fragment/vertex program and couldn't be
readily changed once set.
Now, SamplerUnits[] array indicates which texture unit is to be used for
each sampler variable.  These values are set with glUniform1i().
This is extra state that must be passed to the fragment/vertex program
executor at runtime.

17 years agoHold a stack of temporaries so that we can redeclare them
Zack Rusin [Fri, 26 Oct 2007 23:12:02 +0000 (19:12 -0400)]
Hold a stack of temporaries so that we can redeclare them
for all defined functions. Fixes crashes in function calls.

17 years agoconvert OPCODE_END -> TGSI_OPCODE_RET
Brian [Fri, 26 Oct 2007 19:02:40 +0000 (13:02 -0600)]
convert OPCODE_END -> TGSI_OPCODE_RET

17 years agoif we hit RET w/ empty call stack, halt
Brian [Fri, 26 Oct 2007 18:24:28 +0000 (12:24 -0600)]
if we hit RET w/ empty call stack, halt

17 years agoInitial support for immediate values in TGSI programs.
Brian [Fri, 26 Oct 2007 18:20:17 +0000 (12:20 -0600)]
Initial support for immediate values in TGSI programs.

These can be evaluated at compile time.
Code disabled pending clarifications of TGSI immediate data structures.

17 years agoGet basic function calls working in the shaders.
Zack Rusin [Fri, 26 Oct 2007 18:52:10 +0000 (14:52 -0400)]
Get basic function calls working in the shaders.

17 years agoFix swizzle fetching in tgsi_util_get_full_src_register_extswizzle. Shorten
Zack Rusin [Fri, 26 Oct 2007 12:20:55 +0000 (08:20 -0400)]
Fix swizzle fetching in tgsi_util_get_full_src_register_extswizzle. Shorten
the swizzle coding in LLVM compilation using it and fix some warnings.

17 years agoMake ret part of the instruction block instead of implicitely
Zack Rusin [Thu, 25 Oct 2007 16:14:07 +0000 (12:14 -0400)]
Make ret part of the instruction block instead of implicitely
closing at the end of parsing.

17 years agosurface_alloc() is now a winsys function.
Brian [Fri, 26 Oct 2007 16:45:42 +0000 (10:45 -0600)]
surface_alloc() is now a winsys function.

This allows surfaces to be allocated without a rendering context.
A few loose ends to resolve, but in working condition.

17 years agoActually move region_alloc() and region_release() to intel_winsys.
José Fonseca [Fri, 26 Oct 2007 12:31:04 +0000 (13:31 +0100)]
Actually move region_alloc() and region_release() to intel_winsys.

17 years agoclean-up, simplify some tile code, more to come
Brian [Fri, 26 Oct 2007 02:31:13 +0000 (20:31 -0600)]
clean-up, simplify some tile code, more to come

17 years agoMove region_alloc() and region_release() to pipe_winsys.
Brian [Fri, 26 Oct 2007 01:27:29 +0000 (19:27 -0600)]
Move region_alloc() and region_release() to pipe_winsys.

This allows regions to be allocated w/out a rendering context.

17 years agosilence warning
Brian [Fri, 26 Oct 2007 01:19:51 +0000 (19:19 -0600)]
silence warning

17 years agoMove the get/put_tile() functions to pipe_context.
Brian [Fri, 26 Oct 2007 00:50:15 +0000 (18:50 -0600)]
Move the get/put_tile() functions to pipe_context.

The _rgba versions are temporary until the state tracker is updated.

17 years agotex comments
Brian [Fri, 26 Oct 2007 00:30:06 +0000 (18:30 -0600)]
tex comments

17 years agoadded some comments
Brian [Wed, 24 Oct 2007 23:01:23 +0000 (17:01 -0600)]
added some comments

17 years agoupdate TILE_TOP/BOTTOM_* values to match softpipe
Brian [Wed, 24 Oct 2007 22:58:47 +0000 (16:58 -0600)]
update TILE_TOP/BOTTOM_* values to match softpipe

17 years agos/GLfloat/float/, s/GLint/int/, etc
Brian [Wed, 24 Oct 2007 22:58:00 +0000 (16:58 -0600)]
s/GLfloat/float/, s/GLint/int/, etc

17 years agoBriefly describe the buffer management interface.
José Fonseca [Thu, 11 Oct 2007 23:23:17 +0000 (00:23 +0100)]
Briefly describe the buffer management interface.

17 years agoExpand pkg-config flags before invoking the compiler.
José Fonseca [Thu, 25 Oct 2007 14:46:40 +0000 (15:46 +0100)]
Expand pkg-config flags before invoking the compiler.

This allows IDEs such as Eclipse to get the correct c-preprocessor flags used
from the build output.

17 years agoIgnore generated files.
José Fonseca [Fri, 19 Oct 2007 10:37:45 +0000 (11:37 +0100)]
Ignore generated files.

17 years agoLLVM requires linking with the C++ compiler.
Michel Dänzer [Thu, 25 Oct 2007 16:24:51 +0000 (18:24 +0200)]
LLVM requires linking with the C++ compiler.

It's basically luck if it works with the C compiler on some platforms...

17 years agoImplement loops
Zack Rusin [Thu, 25 Oct 2007 15:47:25 +0000 (11:47 -0400)]
Implement loops

17 years agoFix nested swizzles. Actually fetch the destination contents
Zack Rusin [Thu, 25 Oct 2007 13:03:53 +0000 (09:03 -0400)]
Fix nested swizzles. Actually fetch the destination contents
instead of input.

17 years agoFix nested conditionals
Zack Rusin [Thu, 25 Oct 2007 11:52:59 +0000 (07:52 -0400)]
Fix nested conditionals

17 years agoTest some functionality of vp using GLSL that pure vp isn't testing.
Zack Rusin [Thu, 25 Oct 2007 11:19:02 +0000 (07:19 -0400)]
Test some functionality of vp using GLSL that pure vp isn't testing.

17 years agoImplement else ops.
Zack Rusin [Thu, 25 Oct 2007 11:18:01 +0000 (07:18 -0400)]
Implement else ops.

17 years agoset vcache.referenced bit always
keithw [Thu, 25 Oct 2007 09:18:52 +0000 (10:18 +0100)]
set vcache.referenced bit always

17 years agoMake branching work :) Simply allow output variables as valid
Zack Rusin [Wed, 24 Oct 2007 23:26:09 +0000 (19:26 -0400)]
Make branching work :) Simply allow output variables as valid
operand inputs when they've been assigned already.

17 years agoSimplify branch handling. Prepare for proper decleration extraction.
Zack Rusin [Wed, 24 Oct 2007 23:20:19 +0000 (19:20 -0400)]
Simplify branch handling. Prepare for proper decleration extraction.

17 years agoFix glDrawElements + VBO rendering when ptr/offset is not zero.
Brian [Wed, 24 Oct 2007 20:40:09 +0000 (14:40 -0600)]
Fix glDrawElements + VBO rendering when ptr/offset is not zero.

When an index VBO is bound, glDrawElement's indices pointer is really an
offset into the element buffer.  Add that offset to the prims[i].start
value before calling pipe->draw_elements().
Fixes vbo.c conform test.

17 years agoRevert "Undo indexOffset change (I think, git???)"
Brian [Wed, 24 Oct 2007 20:35:40 +0000 (14:35 -0600)]
Revert "Undo indexOffset change (I think, git???)"

This reverts commit 11ce6244a79106c592364b30434b6ddade3fd6bb.

17 years agoUndo indexOffset change (I think, git???)
Brian [Wed, 24 Oct 2007 20:34:40 +0000 (14:34 -0600)]
Undo indexOffset change (I think, git???)

17 years agoadd to git
Brian [Wed, 24 Oct 2007 18:43:02 +0000 (12:43 -0600)]
add to git

17 years agoImplement gl_PointCoord attribute for GLSL fragment shaders.
Brian [Wed, 24 Oct 2007 17:37:05 +0000 (11:37 -0600)]
Implement gl_PointCoord attribute for GLSL fragment shaders.

Contains the normalized fragment position within a point sprite.