Commit Graph

657 Commits

Author SHA1 Message Date
Brian Paul
55770d09c1 Merge branch 'mesa_7_6_branch'
Conflicts:

	src/gallium/auxiliary/util/u_cpu_detect.c
2009-10-05 14:42:08 -06:00
Brian Paul
63064cf7c3 mesa: add missing return when out of memory 2009-10-01 14:51:43 -06:00
Chia-I Wu
a73ba2d31b mesa/main: Make FEATURE_dlist follow feature conventions.
As shown in mfeatures.h, this allows users of dlist.h to work without
knowing if the feature is available.
2009-09-30 08:31:56 -06:00
Chia-I Wu
aefa1f6ab1 mesa/main: Make FEATURE_evaluators follow feature conventions.
As shown in mfeatures.h, this allows users of eval.h to work without
knowing if the feature is available.
2009-09-30 08:31:55 -06:00
Chia-I Wu
42fac11d43 mesa/main: New feature FEATURE_queryobj.
It merges FEATURE_ARB_occlusion_query and FEATURE_EXT_timer_query, and
follows the feature conventions.
2009-09-30 08:31:55 -06:00
Chia-I Wu
301a510092 mesa/main: Make FEATURE_feedback follow feature conventions.
As shown in mfeatures.h, this allows users of feedback.h to work without
knowing if the feature is available.
2009-09-30 08:31:55 -06:00
Chia-I Wu
d25080074f mesa/main: New feature FEATURE_rastpos.
It is separated from FEATURE_drawpix and made to follow the feature
conventions.
2009-09-30 08:31:55 -06:00
Chia-I Wu
cab7ea0368 mesa/main: Make FEATURE_histogram follow feature conventions.
As shown in mfeatures.h, this allows users of histogram.h to work without
knowing if the feature is available.
2009-09-30 08:31:55 -06:00
Chia-I Wu
2b36db496d mesa/main: Make FEATURE_attrib_stack follow feature conventions.
As shown in mfeatures.h, this allows users of attrib.h to work without
knowing if the feature is available.
2009-09-30 08:31:55 -06:00
Chia-I Wu
a833ff0f53 mesa/main: Make FEATURE_accum follow feature conventions.
As shown in mfeatures.h, this allows users of accum.h to work without
knowing if the feature is available.
2009-09-30 08:31:55 -06:00
Chia-I Wu
cb4f24e51d mesa/main: Make FEATURE_colortable follow feature conventions.
As shown in mfeatures.h, this allows users of colortab.h to work
without knowing if the feature is available.
2009-09-24 21:48:22 -06:00
Brian Paul
da9d8f1924 Revert "mesa: move _mesa_meta_init/free() calls to core Mesa"
This reverts commit 651cffd626.

The commit inadvertantly introduced a new gallium dependency on the meta code.
2009-09-20 22:06:03 -06:00
Brian Paul
651cffd626 mesa: move _mesa_meta_init/free() calls to core Mesa 2009-09-19 16:43:16 -06:00
Ian Romanick
f37070bab6 ARB sync: Add support for GL_ARB_sync to swrast
This isn't quite right yet.  The delete behavior and the context
clean-up needs some work.
2009-09-03 11:22:46 -07:00
Ian Romanick
eabe12df44 ARB prog: Change handling of program parameter limits
Several changes are made to program parameter limits.  Several of the
non-NATIVE limits are set higher.  All of the NATIVE limits are set to
zero in the core Mesa code.  Each driver must set the actual value in
its context creation routine.  If the NATIVE value remains zero, this
indicates that hardware shaders may not be supported.

Each of the preceeding changes matches the bahavior of Apple's shader
assembler, so it seems safe.

Finally, we limit the value of MaxEnvParams to be no greater than
MaxNativeAttribs.  At least one case has been found where an
application does the wrong thing if MaxNativeAttribs < MaxEnvParams.

See also bugzilla #23490.
2009-08-26 22:05:53 -07:00
Brian Paul
a088e5631d mesa: validate shader before drawing (for debugging, disabled) 2009-08-25 17:46:10 -06:00
Brian Paul
71b1610941 mesa: append uniform values to the log file the first time we use a shader
This info is essential to using/debugging a shader outside of its normal
application.
2009-08-14 12:58:21 -06:00
Brian Paul
56c4226fcc mesa: new _mesa_valid_to_render() function
Tests if the current shader/program is valid and that the framebuffer is
complete.  To be called by glBegin, glDrawArrays, etc.
2009-08-14 11:27:33 -06:00
Brian Paul
f57280cc73 Merge branch 'arb_vertex_array_object' 2009-06-26 17:49:14 -06:00
Brian Paul
12cf98f5fc mesa: move vertex array objects from shared state to per-context
The ARB version requires VAOs to be per-context while the Apple extension
was ambiguous.
2009-06-19 18:11:52 -06:00
Brian Paul
9038b6c8bb Merge branch 'ext-provoking-vertex'
Conflicts:

	docs/relnotes-7.6.html
	progs/tests/Makefile
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/glx/x11/indirect.c
	src/mesa/glapi/Makefile
	src/mesa/glapi/dispatch.h
	src/mesa/glapi/glapioffsets.h
	src/mesa/glapi/glapitable.h
	src/mesa/glapi/glapitemp.h
	src/mesa/glapi/glprocs.h
	src/mesa/main/dlist.c
	src/mesa/main/enums.c
	src/mesa/sparc/glapi_sparc.S
	src/mesa/x86-64/glapi_x86-64.S
	src/mesa/x86/glapi_x86.S
2009-06-19 09:15:34 -06:00
Brian Paul
a04af335a4 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/drivers/dri/i915/i915_tex_layout.c
	src/mesa/drivers/dri/i965/brw_wm_glsl.c
	src/mesa/drivers/dri/intel/intel_buffer_objects.c
	src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
	src/mesa/drivers/dri/intel/intel_pixel_draw.c
	src/mesa/main/enums.c
	src/mesa/main/texstate.c
	src/mesa/vbo/vbo_exec_array.c
2009-06-24 08:54:37 -06:00
Brian Paul
3f856c6b6b mesa: rework viewport/scissor initialization code
The first time a context is bound to a drawable, the viewport and scissor
bounds are initialized to the buffer's size.  This is actually a bit tricky.

A new _mesa_check_init_viewport() function is called in several places
to check if the viewport has been initialized.  We also use a new
ctx->ViewportInitialized flag instead of the overloaded
ctx->FirstTimeCurrent flag.
2009-06-17 08:38:38 -06:00
Brian Paul
9d58724c51 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/main/context.c
2009-06-04 13:16:13 -06:00
Brian Paul
12e94d892e mesa: release VBO and PBO references upon context destruction 2009-06-02 10:29:39 -06:00
Brian Paul
9f6ec50f8c Merge branch 'mesa_7_5_branch' 2009-06-01 15:01:33 -06:00
José Fonseca
29c6c8eb18 mesa: Add success/failures return value to _mesa_make_current. 2009-05-30 20:29:02 -07:00
Brian Paul
89966cdb1b mesa: data structure updates for GL_EXT_provoking_vertex 2009-05-28 12:30:25 -06:00
Brian Paul
ce7a049191 mesa: use Elements() for loop limit 2009-05-22 14:32:37 -06:00
Brian Paul
3e74faa029 mesa: delete array objects before buffer objects during context tear-down
The former may point to the later.
2009-05-13 09:47:13 -06:00
Brian Paul
17a354a119 mesa: assertions to check for too many vertex outputs or fragment inputs 2009-05-08 14:35:48 -06:00
José Fonseca
d88faf91e9 mesa: Make _mesa_share_state thread safe. 2009-05-08 14:57:29 +01:00
Keith Whitwell
b6e8256899 mesa: more complete fix for transform_invarient glitches
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-08 14:57:28 +01:00
José Fonseca
b25168c34c mesa: Make _mesa_share_state thread safe. 2009-05-08 10:04:13 +01:00
Brian Paul
4f6b704f97 mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
2009-05-07 14:34:09 -06:00
Keith Whitwell
113403ef51 mesa: more complete fix for transform_invarient glitches
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-05 13:14:53 +01:00
Keith Whitwell
c0bff53334 mesa/main: protect driver.finish with FLUSH_CURRENT
Already doing this for driver.flush()
2009-04-28 18:15:18 +01:00
Brian Paul
1c9786894c mesa: fix up error/warning/debug output newlines
As of commit 23ad86cfb9 all messages go
through output_if_debug().

Add new parameter to output_if_debug() to indicate whether to emit a newline.

_mesa_warning() and _mesa_error() calls should not end their strings with \n.
_mesa_debug() calls should end their text with \n.
2009-04-24 10:50:40 -06:00
Keith Whitwell
009749b4a8 mesa: protect driver.flush() with FLUSH_CURRENT
Need to do this to ensure vbo code unmaps its buffers before calling
the driver, which may be sitting on top of a memory manager which
objects to firing commands from a mapped buffer.
2009-04-22 09:03:17 +01:00
Brian Paul
36b0f26721 mesa: suppress extra newline 2009-04-17 16:10:26 -06:00
Vinson Lee
1eee1bac1f mesa: update/fix doxygen comments 2009-03-17 09:34:30 -06:00
Roland Scheidegger
114152e068 mesa: add support for ATI_envmap_bumpmap
add new entrypoints, new texture format, etc
translate in texenvprogram.c for drivers using the mesa-generated tex env
fragment program
also handled in swrast, but not tested (cannot work due to negative texel
results not handled correctly)
2009-03-12 15:01:16 +01:00
Brian Paul
4045a2c7d3 mesa: move shared context state functions to new shared.c file 2009-03-07 13:14:37 -07:00
Brian Paul
2c37851595 mesa: move glViewport and glDepthRange functions into new viewport.c file
A bit of refactoring with an eye toward ES2 and GL 3.1
2009-03-07 12:33:11 -07:00
José Fonseca
8bbb6b352a mesa: Reads must also be done with lock held.
Otherwise two threads might think each made the refcount go zero.
2009-03-06 14:03:04 +00:00
Brian Paul
7979c6024c mesa: call _mesa_get_cpu_features() during one-time-init 2009-03-04 16:43:39 -07:00
Brian Paul
4c4268dd31 mesa: convert some #defines to enums
This makes debugging with gdb a bit easier.
Ex:
(gdb) p ctx->DrawBuffer.Attachment[BUFFER_STENCIL]

Note however that gdb only seems to recognize enum types that are actually
used to declare a variable somewhere.  For example, gl_buffer_index isn't
used to declare any vars so it's invisible to gdb.  Work around this by
adding a dummy function in context.c that declares some vars with these
new types.
2009-02-28 11:17:26 -07:00
David S. Miller
857ac1e817 mesa: Resurrect SPARC asm code.
This rewrites the sparc GLAPI code so that it's PIC friendly and works
with all of the TLS/PTHREADS/64-bit/32-bit combinations properly.

As a result we can turn SPARC asm back on.  Currently it's only
enabled on Linux, as that's the only place where I can test this
stuff out.

For the moment the cliptest SPARC asm routines are disabled as they
are non-working.  The problem is that they use register %g7 as a
temporary which is where the threading libraries store the thread
pointer on SPARC.  I will fix that code up in a future change as it's
a pretty important routine to optimize.

Like x86 we do the runtime patch as a pthread once-invoked initializer
in init_glapi_relocs().

Unlike x86, however, our GLAPI stubs on SPARC are just two instruction
sequences that branch to a trampoline and put the GLAPI offset into a
register.  The trampoline is what we run-time patch.  The stubs thus
all look like:

glFoo:
	ba		__glapi_sparc_foo_stub
	 sethi		GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3

This actually makes generate_entrypoint() a lot simpler on SPARC.  For
this case in generate_entrypoint() we generate stubs using a 'call'
instead of the 'ba' above to make sure it can reach.

In order to get a proper tail call going here, in the unpatched case,
we do several tricks.  To get the current PC, for example, we save the
return address register into a temporary, do a call, save the return
address register written by the call to another temporary, then
restore the original return address register value.  This is to
avoid having to allocate a stack frame.

This is necessary for PIC address formation.

This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in
__glXInitialize() and one_time_init().

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 18:29:48 -07:00
Brian Paul
f2c023291a mesa: move a bunch of compiler-related stuff into new compiler.h header
This trims down and cleans up imports.h and glheader.h quite a bit.
2009-02-22 15:43:29 -07:00
Brian Paul
d059d03034 mesa: use enums for TEXTURE_x_INDEX values
Plus, put them in the order of highest to lowest priority to simplify
the texture_override() loop.
2009-02-21 15:15:20 -07:00