Commit graph

115447 commits

Author SHA1 Message Date
Brian
783cedcdc1 simplify getting of current frag prog 2007-10-29 15:15:34 -06:00
Brian
27153bf02d Refactor _tnl_UpdateFixedFunctionProgram().
New _mesa_get_fixed_func_vertex_program() function...
2007-10-29 15:15:34 -06:00
Brian
83ce6c51d7 Refactor _mesa_UpdateTexEnvProgram()
Will be replaced by _mesa_get_fixed_func_fragment_program().
2007-10-29 15:15:34 -06:00
Eric Anholt
dc1264970e [i915] Include header to pick up intel_ttm_bo_create_from_handle() proto. 2007-10-29 13:24:29 -07:00
Eric Anholt
b0edb9c38a Merge branch 'origin' 2007-10-29 13:24:27 -07:00
Michal Krol
918ea5168b Rename 'mms-config.' to 'mms.config'.
It looks like Windows does not like filenames ending with a dot,
in effect renaming it to 'mms-config'.
2007-10-29 19:50:10 +00:00
Jesse Barnes
ad8ee7db3b Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa 2007-10-29 12:06:36 -07:00
Jesse Barnes
38fdb47d26 Refactor and fix core vblank support
Consolidate support for synchronizing to and retrieving vblank counters.  Also
fix the core vblank code to return monotonic MSC counters, which are required
by some GLX extensions.  Adding support for multiple pipes to a low level
driver is fairly easy, the Intel 965 driver provides simple example code (see
intel_buffers.c:intelWindowMoved()).

The new code bumps the media stream counter extension version to 2 and adds a
new getDrawableMSC callback.  This callback takes a drawablePrivate pointer,
which is used to calculate the MSC value seen by clients based on the actual
vblank counter(s) returned from the kernel.  The new drawable private fields
are as follows:
  - vblSeq - used for tracking vblank counts for buffer swapping
  - vblFlags - flags (e.g. current pipe), updated by low level driver
  - msc_base - MSC counter from the last time the current pipe changed
  - vblank_base - kernel DRM vblank counter from the last time the pipe changed

Using the above variables, the core vblank code (in vblank.c) can calculate a
monotonic MSC value.  The low level DRI drivers are responsible for updating
the current pipe (by setting VBLANK_FLAG_SECONDARY for example in vblFlags)
along with msc_base and vblank_base whenever the pipe associated with a given
drawable changes (again, see intelWindowMoved for an example of this).

Drivers should fill in the GetDrawableMSC DriverAPIRec field to point to
driDrawableGetMSC32 and add code for pipe switching as outlined above to fully
support the new scheme.
2007-10-29 12:06:00 -07:00
Dan Nicholson
06ca14543e Build xdemos programs by default on linux-dri
Since libglut is no longer hardcoded, we can build the xdemos programs
so long as a GLX enabled libGL and libGLU have been built.
2007-10-29 11:43:20 -07:00
Chris Rankin
1421bffb18 Remember to call XSync() before resetting X error handler. 2007-10-29 14:37:32 -04:00
Dan Nicholson
3b9e28d507 linux-dri-xcb: Fix undefined refs when linking with libGL
GL_LIB_DEPS was missing -lXdamage and -lXfixes, which was causing
linker errors when trying to build the programs.
2007-10-29 11:17:04 -07:00
José Fonseca
f33ced441c Update intel_is_format_supported. 2007-10-29 17:37:05 +00:00
Michal Krol
da9815e17f Add detailed comments. 2007-10-29 17:36:20 +00:00
Michal Krol
7de874ec2c Make it compile under linux.
Move pipe_region/surface_reference functions to pipe/p_inlines.h.
Remove #include "p_util.h" from pipe/p_context.h.
2007-10-29 17:05:38 +00:00
Michal Krol
ee295fccdd Make gallium compile in win32.
Use FREE, MALLOC, CALLOC, GETENV wrappers.
Silence compiler warnings.
Add proper copyrights.
2007-10-29 17:05:38 +00:00
Brian
d37eb130c0 remove dead code 2007-10-29 10:37:12 -06:00
Brian
ebe1642d7a check for signed vs. unsigned in st_get_format_info() - fixes accum buffer failure 2007-10-29 10:36:10 -06:00
Brian
40133487db disable ctx->Driver.NewProgram() call in _mesa_new_program()
This was causing infinite recursive calls w/ software drivers.
All vertex/fragment shaders should be allocated by calling
ctx->Driver.NewProgram(), not by calling _mesa_new_program().
2007-10-29 10:01:15 -06:00
Brian
b58b64f361 fix bad fragment shader pointer assignment 2007-10-29 09:41:53 -06:00
Brian
cc0b55c242 simplify code which access the current vertex/fragment shaders 2007-10-29 09:25:00 -06:00
Brian
2a3f3679eb 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.
2007-10-29 09:25:00 -06:00
Zack Rusin
a6a3d8cb75 Remove conditionals from the makefiles. 2007-10-29 16:14:10 +00:00
Zack Rusin
a70c5e37f1 Remove typedefs from enums.
typedefs are rather evil, remove them and use the enum
keyword explicitely.
2007-10-29 16:14:10 +00:00
Zack Rusin
25b17b213b 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.
2007-10-29 16:14:10 +00:00
Zack Rusin
abe8cd1917 Make sure the swizzling vector is being recreated for each function. This makes
GLSL bricks work.
2007-10-29 16:14:10 +00:00
Dan Nicholson
162914675a update APP_LIB_DEPS for static library configs (patch 3/3) 2007-10-29 09:05:13 -06:00
Dan Nicholson
9ef1d9f03a simplify APP_LIB_DEPS (patch 2/3) 2007-10-29 09:04:30 -06:00
Dan Nicholson
c05aa5ec4c specify app lib dependencies in Makefiles (patch 1/3) 2007-10-29 09:03:01 -06:00
Michal Krol
3b25ce9eca 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.
2007-10-29 13:25:00 +00:00
Michal Krol
1eabc29ed1 Code re-org. Add comments. 2007-10-29 13:25:00 +00:00
Michal Krol
bd922c6437 Implement RET opcode. 2007-10-29 13:25:00 +00:00
Michal Krol
e15ca7963e Remove TGSI_INTERPOLATE_ATTRIB. 2007-10-29 13:25:00 +00:00
José Fonseca
242b8659e4 Fix i915simple build. 2007-10-29 12:29:06 +00:00
José Fonseca
1039a75514 Reuse hardware vertice representation. 2007-10-29 12:15:57 +00:00
José Fonseca
a9e1fcf98a Enable the vertex buffer stage according to the I915_VBUF environment var. 2007-10-29 12:15:57 +00:00
José Fonseca
46aeff5814 Get vertex buffer stage in a minimally working state. 2007-10-29 12:15:57 +00:00
José Fonseca
02091e0f9c Reserve the accurate number of dwords in the batch buffer. 2007-10-29 12:15:57 +00:00
José Fonseca
dbb33a9710 Start a vertex buffer constuction stage for i915 based on Keith's draft done on softpipe. 2007-10-29 12:15:57 +00:00
Michal Krol
af5061cf5a Fix newlines. 2007-10-29 11:03:37 +00:00
Alan Hourihane
b59dbd822f Only set R_MODE with NV_point_sprite 2007-10-28 20:07:37 +00:00
Michal Krol
c1b9f0eb7a Remove unused static functions. 2007-10-28 17:53:02 +00:00
Michal Krol
2bbd714fda Update comments. 2007-10-28 17:48:46 +00:00
Michal Krol
3c81219672 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.
2007-10-28 17:34:39 +00:00
Michal Krol
b85cd7b700 Use FREE and MALLOC instead of free and malloc. 2007-10-28 17:34:36 +00:00
Michal Krol
2953415223 Rework sse-utility function calls. 2007-10-28 17:34:35 +00:00
michal
c5ad88e9f1 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]
2007-10-28 17:34:33 +00:00
michal
e420e9d485 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]
2007-10-28 16:53:11 +00:00
michal
80ab2ab335 Control FS TGSI dumping with GALLIUM_DUMP_FS env variable. 2007-10-28 16:53:11 +00:00
michal
90e47c8c7b Fix newlines. 2007-10-28 16:53:11 +00:00
michal
f93b9dc09a Use FREE instead of free. Fix newlines. 2007-10-27 19:04:20 +01:00