mesa.git
14 years agoi965g: avoid void * arithmetic
Roland Scheidegger [Mon, 10 May 2010 15:40:44 +0000 (17:40 +0200)]
i965g: avoid void * arithmetic

14 years agogallivm: Temporarily disable custom LLVMDumpValue on MSVC.
José Fonseca [Mon, 10 May 2010 13:43:47 +0000 (14:43 +0100)]
gallivm: Temporarily disable custom LLVMDumpValue on MSVC.

Seeing very weird crashes during std::cout initialization.

The fault probably lies in the way I build LLVM on MSVC, but disable for
now to allow more time to investigate.

14 years agogallivm: cosf/sinf are macros on MSVC.
José Fonseca [Mon, 10 May 2010 07:30:28 +0000 (08:30 +0100)]
gallivm: cosf/sinf are macros on MSVC.

So taking the function address does not work.

14 years agomesa: Update comments in get_gen_es.py.
Vinson Lee [Mon, 10 May 2010 05:22:53 +0000 (22:22 -0700)]
mesa: Update comments in get_gen_es.py.

14 years agoswrast: fix 16-bit/channel rendering
Brian Paul [Mon, 10 May 2010 04:08:54 +0000 (22:08 -0600)]
swrast: fix 16-bit/channel rendering

NOTE: This is a candidate for the 7.8 stable branch

14 years agoosmesa: use unsigned 16-bit/channel format
Brian Paul [Mon, 10 May 2010 04:08:33 +0000 (22:08 -0600)]
osmesa: use unsigned 16-bit/channel format

14 years agoosmesa: add mapi/glapi to SRC_DIRS to fix build
Brian Paul [Mon, 10 May 2010 03:13:54 +0000 (21:13 -0600)]
osmesa: add mapi/glapi to SRC_DIRS to fix build

14 years agomesa: fix typos, comment in signed 16-bit tex fetch code
Brian Paul [Mon, 10 May 2010 00:31:05 +0000 (18:31 -0600)]
mesa: fix typos, comment in signed 16-bit tex fetch code

14 years agomesa: added unsigned 16-bit/channel tex format
Brian Paul [Mon, 10 May 2010 01:28:10 +0000 (19:28 -0600)]
mesa: added unsigned 16-bit/channel tex format

14 years agomesa: added comments for signed 16-bit formats
Brian Paul [Mon, 10 May 2010 01:21:53 +0000 (19:21 -0600)]
mesa: added comments for signed 16-bit formats

14 years agomesa: use GL_RGBA16_SNORM for accum buffer
Brian Paul [Mon, 10 May 2010 00:42:14 +0000 (18:42 -0600)]
mesa: use GL_RGBA16_SNORM for accum buffer

14 years agomesa: added texstore function for signed 16-bit formats
Brian Paul [Mon, 10 May 2010 00:32:32 +0000 (18:32 -0600)]
mesa: added texstore function for signed 16-bit formats

14 years agomesa: added UNCLAMPED_FLOAT_TO_SHORT macro
Brian Paul [Mon, 10 May 2010 01:25:52 +0000 (19:25 -0600)]
mesa: added UNCLAMPED_FLOAT_TO_SHORT macro

14 years agomesa: add missing cases for signed 16-bit formats
Brian Paul [Mon, 10 May 2010 00:30:03 +0000 (18:30 -0600)]
mesa: add missing cases for signed 16-bit formats

14 years agost/mesa: Ignore internal_format in st_context_teximage.
Chia-I Wu [Fri, 7 May 2010 09:34:15 +0000 (17:34 +0800)]
st/mesa: Ignore internal_format in st_context_teximage.

When internal_format and tex->format differ, st_finailize_texture will
surface_copy between surfaces with different formats.  This commit works
around the issue by ignoring internal_format.  A sane fix is needed
here.

14 years agogallivm: Add an alternative to LLVMDumpValue that works with Windows GUI apps.
José Fonseca [Sat, 8 May 2010 22:23:41 +0000 (23:23 +0100)]
gallivm: Add an alternative to LLVMDumpValue that works with Windows GUI apps.

14 years agogallivm: Fix mipfiltering with negative lod bias.
José Fonseca [Sat, 8 May 2010 22:16:38 +0000 (23:16 +0100)]
gallivm: Fix mipfiltering with negative lod bias.

In particular, don't use the clamped lod to compute level + 1, or
lod in [-1, 0] range will actually interpolate with level 1.

This makes Mipfilter DCT pass 100%.

14 years agogallivm: Actually do floor/ceil/trunc for scalars.
José Fonseca [Sat, 8 May 2010 22:07:09 +0000 (23:07 +0100)]
gallivm: Actually do floor/ceil/trunc for scalars.

Also start axing the code duplication for scalar case. The olution is to
treat the scalar case specially in a few innermost functions, and leave
outer functions untouched.

14 years agogallivm: Import the code to compute the minimax polynomials.
José Fonseca [Sat, 8 May 2010 20:44:58 +0000 (21:44 +0100)]
gallivm: Import the code to compute the minimax polynomials.

It's quite a pain to remember the details after a while, and it is quite
likely we'll want to use this again, either for different polynomial
orders or different functions, so commit it here.

14 years agogallivm: Use a minimax polynomial for exp2 in range [0,1] instead [-0.5,5].
José Fonseca [Sat, 8 May 2010 20:42:55 +0000 (21:42 +0100)]
gallivm: Use a minimax polynomial for exp2 in range [0,1] instead [-0.5,5].

The advantage of range[-0.5, 0.5] is that it doesn't require floor (for
which intrinsics are only available in SSE4.1).

But the EXP opcode pretty much forces us to use floor, and there is a
good floor approximation around truncation available anyway.

This fixes EXP failures in VShader DCT.

14 years agogallivm: Don't hardcode number of args twice.
José Fonseca [Sat, 8 May 2010 18:26:55 +0000 (19:26 +0100)]
gallivm: Don't hardcode number of args twice.

14 years agor300g: follow pipe_rasterizer_state::light_twoside
Marek Olšák [Sat, 8 May 2010 20:50:49 +0000 (22:50 +0200)]
r300g: follow pipe_rasterizer_state::light_twoside

14 years agor300g: follow pipe_rasterizer_state::point_size_per_vertex
Marek Olšák [Sat, 8 May 2010 20:20:39 +0000 (22:20 +0200)]
r300g: follow pipe_rasterizer_state::point_size_per_vertex

14 years agor300g: move GA_POINT_MINMAX back to rs_state
Marek Olšák [Sat, 8 May 2010 18:52:24 +0000 (20:52 +0200)]
r300g: move GA_POINT_MINMAX back to rs_state

This basically reverts commit 74f94e8fdfe035fa68acdc19e6b0afc2957a4264.

14 years agor300g: fix glean/pointSprite using lodbias correction
Marek Olšák [Sat, 8 May 2010 17:51:48 +0000 (19:51 +0200)]
r300g: fix glean/pointSprite using lodbias correction

14 years agor300g: pass depth texture swizzle to the compiler if compare mode is enabled
Marek Olšák [Sat, 8 May 2010 16:51:03 +0000 (18:51 +0200)]
r300g: pass depth texture swizzle to the compiler if compare mode is enabled

14 years agor300g: respect compare mode regardless of sampler type
Marek Olšák [Sat, 8 May 2010 03:59:28 +0000 (05:59 +0200)]
r300g: respect compare mode regardless of sampler type

14 years agor300/compiler: fake equal/notequal for shadow samplers
Marek Olšák [Sat, 8 May 2010 03:26:31 +0000 (05:26 +0200)]
r300/compiler: fake equal/notequal for shadow samplers

This is actually better than a real implementation, which would be useless
due to inaccuracy (I know because I've tried to implement it).

14 years agor300/compiler: use perspective division only for TXP in shadow samplers
Marek Olšák [Sat, 8 May 2010 02:00:38 +0000 (04:00 +0200)]
r300/compiler: use perspective division only for TXP in shadow samplers

14 years agor300/compiler: make shadow sampler codegen more readable, add comments
Marek Olšák [Sat, 8 May 2010 01:39:35 +0000 (03:39 +0200)]
r300/compiler: make shadow sampler codegen more readable, add comments

14 years agor300/compiler: shorten RC_*SWIZZLE* expressions
Marek Olšák [Fri, 7 May 2010 23:34:38 +0000 (01:34 +0200)]
r300/compiler: shorten RC_*SWIZZLE* expressions

14 years agor300/compiler: generalize depth texture mode to support arbitrary swizzles
Marek Olšák [Fri, 7 May 2010 23:19:59 +0000 (01:19 +0200)]
r300/compiler: generalize depth texture mode to support arbitrary swizzles

14 years agor300/compiler: fix LIT instruction case 0^0 = 1
Marek Olšák [Fri, 7 May 2010 17:25:11 +0000 (19:25 +0200)]
r300/compiler: fix LIT instruction case 0^0 = 1

14 years agor300g: consolidate common render code into one function
Marek Olšák [Fri, 7 May 2010 19:46:09 +0000 (21:46 +0200)]
r300g: consolidate common render code into one function

This reduces redundant code by moving:
- CS space reservation
- buffer validation
- dirty state emission
- index bias emission
- AOS emission
into r300_prepare_for_rendering.

14 years agogallivm: The the JIT engine to use our sinf()/cosf() on Windows.
José Fonseca [Sat, 8 May 2010 17:36:22 +0000 (18:36 +0100)]
gallivm: The the JIT engine to use our sinf()/cosf() on Windows.

A quick hack to get the right results, as there are many DCT tests
which use these opcodes to generate data to test other opcodes.

14 years agogallivm: Fix BREAK/CONT translation.
José Fonseca [Sat, 8 May 2010 15:17:09 +0000 (16:17 +0100)]
gallivm: Fix BREAK/CONT translation.

The cont_mask must be restored and exec mask recomputed in order to decide
whether to repeat the loop or not.

Unlike the continue mask, the break_mask must be preserved across loop
iterations.

Fixes several VShader DCT cases, and no regressions with glean.

14 years agollvmpipe: Cover more formats in unit test.
José Fonseca [Sat, 8 May 2010 12:18:14 +0000 (13:18 +0100)]
llvmpipe: Cover more formats in unit test.

14 years agogallivm: Fix segfaul when inserting allocas in an empty function.
José Fonseca [Sat, 8 May 2010 12:02:46 +0000 (13:02 +0100)]
gallivm: Fix segfaul when inserting allocas in an empty function.

14 years agogallivm: Centralize SoA swizzling into a single place.
José Fonseca [Sat, 8 May 2010 11:52:50 +0000 (12:52 +0100)]
gallivm: Centralize SoA swizzling into a single place.

14 years agogallivm: Support predicates.
José Fonseca [Sat, 8 May 2010 11:50:52 +0000 (12:50 +0100)]
gallivm: Support predicates.

14 years agollvmpipe: Match p_screen.h's function prototype.
José Fonseca [Fri, 7 May 2010 18:35:10 +0000 (19:35 +0100)]
llvmpipe: Match p_screen.h's function prototype.

14 years agoUpdate file list for the tarballs.
Chia-I Wu [Fri, 7 May 2010 14:09:45 +0000 (22:09 +0800)]
Update file list for the tarballs.

Mainly for the recent work on mapi and gles.  The latter adds some
sources to src/mesa/main that are generated on the fly.  This makes
python a requirement for building Mesa.  An alternative is to package
those sources into the tarballs.  That may be done in another commit.

14 years agollvmpipe: Remove unnecessary header.
Vinson Lee [Sat, 8 May 2010 07:37:38 +0000 (00:37 -0700)]
llvmpipe: Remove unnecessary header.

14 years agodocs: Update EGL and OpenGL ES docs.
Chia-I Wu [Fri, 7 May 2010 06:13:08 +0000 (14:13 +0800)]
docs: Update EGL and OpenGL ES docs.

Update to reflect recent gles and mapi works.

14 years agoegl: Build drivers in $(TOP)/$(LIB_DIR)/egl.
Chia-I Wu [Fri, 7 May 2010 07:42:32 +0000 (15:42 +0800)]
egl: Build drivers in $(TOP)/$(LIB_DIR)/egl.

There are enough EGL modules that they deserve a subdirectory, to avoid
polluting $(TOP)/$(LIB_DIR).

14 years agogallium: Add egl-apis target.
Chia-I Wu [Wed, 5 May 2010 07:38:02 +0000 (15:38 +0800)]
gallium: Add egl-apis target.

The new target installs client API modules to EGL_DRIVER_INSTALL_DIR.
They are used by st/egl.

The client APIs are built from OpenGL and OpenVG state trackers.  For
this to work, st/vega is modified to produce a static library,
libvega.a, instead.  st/es is also not needed any more.  It is removed
and --with-state-trackers=es is replaced by --enable-gles-overlay.

As st/egl now has its own client API modules, this solves the ABI issue
between st/egl and client APIs, as long as the client API modules are
distributed with st/egl.  Plus, this allows st/egl to support OpenGL
with non-Gallium libGL.so.

14 years agomapi: Add install rules for OpenGL ES.
Chia-I Wu [Thu, 6 May 2010 02:46:51 +0000 (10:46 +0800)]
mapi: Add install rules for OpenGL ES.

Move the install rules for OpenGL ES from src/mesa/Makefile to mapi.

14 years agomapi: Install .pc file for OpenVG.
Chia-I Wu [Thu, 6 May 2010 03:03:00 +0000 (11:03 +0800)]
mapi: Install .pc file for OpenVG.

14 years agomapi: Update vgapi to build libOpenVG.so.
Chia-I Wu [Wed, 5 May 2010 10:37:35 +0000 (18:37 +0800)]
mapi: Update vgapi to build libOpenVG.so.

Unlike the one produced by st/vega, this is a dispatch-only library.

14 years agomapi: Merge src/gles/.
Chia-I Wu [Wed, 5 May 2010 10:56:31 +0000 (18:56 +0800)]
mapi: Merge src/gles/.

Remove src/gles and have mapi/{es1api,es2api} build libGLESv1_CM.so and
libGLESv2.so.

14 years agoDefine OpenGL ES and OpenVG library names.
Chia-I Wu [Tue, 4 May 2010 14:43:05 +0000 (22:43 +0800)]
Define OpenGL ES and OpenVG library names.

Define <API>_LIB, <API>_LIB_NAME, <API>_LIB_GLOB, and some other
variables in the configs.  Fix a typo in glesv1_cm.pc.in where an
inexistent variable is used.

14 years agoegl_g3d: Check external modules for client APIs first.
Chia-I Wu [Wed, 5 May 2010 10:27:29 +0000 (18:27 +0800)]
egl_g3d: Check external modules for client APIs first.

dlopen api_<API>.so before dlopening the process itself in case the
client APIs are implemented in external modules.

14 years agoegl: Add _eglSearchPathForEach.
Chia-I Wu [Wed, 5 May 2010 09:37:19 +0000 (17:37 +0800)]
egl: Add _eglSearchPathForEach.

The function can be used by a driver to check each search path of EGL.

14 years agogallium/draw: additional comments in the clipping code
Brian Paul [Fri, 7 May 2010 23:13:16 +0000 (17:13 -0600)]
gallium/draw: additional comments in the clipping code

14 years agomesa: remove driver hooks for GetFloat/Integer/Doublev, etc
Brian Paul [Fri, 7 May 2010 23:10:03 +0000 (17:10 -0600)]
mesa: remove driver hooks for GetFloat/Integer/Doublev, etc

Once upon a time some drivers hooked into these for GL_HP_occlusion_test
and GL_OES_read_format.  They're not being used anymore so get rid of them.

14 years agoglx: Get GLX_SCREEN first in __glXQueryContextInfo()
Kristian Høgsberg [Fri, 7 May 2010 22:38:35 +0000 (18:38 -0400)]
glx: Get GLX_SCREEN first in __glXQueryContextInfo()

And lookup the GLX screen for the context.  Otherwise we'll end up
jumping through a NULL-pointer once we try to look up the visual
or config for the shared context.

https://bugs.freedesktop.org/show_bug.cgi?id=14245

14 years agomesa: fpclassify dummy definition is not needed on cygwin
Jon TURNEY [Fri, 7 May 2010 17:59:53 +0000 (18:59 +0100)]
mesa: fpclassify dummy definition is not needed on cygwin

fpclassify is provided by math.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agotgis: fix SOA aliasing for MUL instruction in SSE codegen
Brian Paul [Fri, 7 May 2010 16:40:55 +0000 (10:40 -0600)]
tgis: fix SOA aliasing for MUL instruction in SSE codegen

Part of a fix for piglit trinity-fp1 test failure.

14 years agoapple: Move glapi to mapi.
Vinson Lee [Fri, 7 May 2010 06:39:33 +0000 (23:39 -0700)]
apple: Move glapi to mapi.

This was missed in commit 296adbd545b8efd38c9ed508166b2de2764a444b.
Fixes darwin build.

14 years agomapi/glapi: Don't allocate a page for every function on windows.
José Fonseca [Fri, 7 May 2010 06:31:44 +0000 (07:31 +0100)]
mapi/glapi: Don't allocate a page for every function on windows.

14 years agomapi: Avoid Data Execution Prevention on windows.
José Fonseca [Fri, 7 May 2010 05:57:11 +0000 (06:57 +0100)]
mapi: Avoid Data Execution Prevention on windows.

14 years agowgl: Add mapi to includes.
José Fonseca [Fri, 7 May 2010 05:45:20 +0000 (06:45 +0100)]
wgl: Add mapi to includes.

14 years agomapi: Add x86-64 dispatcher.
Chia-I Wu [Thu, 22 Apr 2010 08:22:13 +0000 (16:22 +0800)]
mapi: Add x86-64 dispatcher.

14 years agomapi: Add x86 dispatcher.
Chia-I Wu [Thu, 22 Apr 2010 07:33:43 +0000 (15:33 +0800)]
mapi: Add x86 dispatcher.

14 years agost/vega: Use vgapi.
Chia-I Wu [Fri, 16 Apr 2010 10:12:37 +0000 (18:12 +0800)]
st/vega: Use vgapi.

Rename vgFooBar to vegaFooBar and use vgapi as the dispatcher.  This
makes sure there is always a current context when the internal functions
are called.  And eglGetProcAddress is finally supported.

14 years agomapi: Add vgapi.
Chia-I Wu [Mon, 26 Apr 2010 08:48:59 +0000 (16:48 +0800)]
mapi: Add vgapi.

vgapi is a dispatcher for OpenVG.

14 years agomapi: Add a generic C dispatcher.
Chia-I Wu [Fri, 23 Apr 2010 08:07:47 +0000 (16:07 +0800)]
mapi: Add a generic C dispatcher.

The idea is to have an API generate a header using mapi_abi.py.  The API
can then use the header to build a dispatcher.

14 years agomapi: Add mapi and share the code with glapi.
Chia-I Wu [Fri, 23 Apr 2010 08:06:26 +0000 (16:06 +0800)]
mapi: Add mapi and share the code with glapi.

Specifically, move all or most of

      glapi/glapi.c         to mapi/u_current.c,
      glapi/glapi_execmem.c to mapi/u_execmem.c,
      glapi/glthread.[ch]   to mapi/u_thread.[ch]

and remove their dependencies on core Mesa headers.

14 years agoglapi: Move to src/mapi/.
Chia-I Wu [Mon, 26 Apr 2010 04:56:44 +0000 (12:56 +0800)]
glapi: Move to src/mapi/.

Move glapi to src/mapi/{glapi,es1api,es2api}.

14 years agoglapi: Move assembly dispatchers back into glapi/.
Chia-I Wu [Mon, 26 Apr 2010 04:47:07 +0000 (12:47 +0800)]
glapi: Move assembly dispatchers back into glapi/.

14 years agogallivm: Require SSE2 for draw_llvm/llvmpipe due to LLVM PR6960.
Török Edwin [Thu, 6 May 2010 21:19:57 +0000 (22:19 +0100)]
gallivm: Require SSE2 for draw_llvm/llvmpipe due to LLVM PR6960.

Note that this also requires X86 for llvm, if llvmpipe/draw_llvm works
on PPC then the condition should be extended to include && x86.

Signed-off-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agosoftpipe: fix dangling references to shaders in the TGSI executor
Brian Paul [Thu, 6 May 2010 21:10:51 +0000 (15:10 -0600)]
softpipe: fix dangling references to shaders in the TGSI executor

If a shader was bound to the fragment shader TGSI executor and it was
then deleted and a new shader was allocated at the same address as the
old shader, the new fragment shader would not get properly bound to
the TGSI machine and we'd wind up using the old one.

This would not have been a problem if shaders were refcounted.

Now the TGSI machine is owned by the context rather than the quad
pipeline's shader stage so that the softpipe_delete_fs_state()
function can access it.

Fixes sporadic failures of the piglit fp-long-alu test (fd.o bug 27989).

14 years agotgsi: make SSE ADD instruction SOA-safe
Brian Paul [Thu, 6 May 2010 21:04:19 +0000 (15:04 -0600)]
tgsi: make SSE ADD instruction SOA-safe

To properly execute an instruction such as "ADD tmp, tmp.wzyx, foo;"
with SOA we (sometimes) need to put the results into temporaries before
writing the results to the destination register.

This patch fixes the ADD instruction but this needs to be done for
many more instructions.

Helps to fix piglit fp-long-alu test (fd.o bug 27989).

14 years agotgsi: code refactoring
Brian Paul [Thu, 6 May 2010 20:56:59 +0000 (14:56 -0600)]
tgsi: code refactoring

14 years agotgsi: added tgsi_get_processor_name()
Brian Paul [Thu, 6 May 2010 20:55:40 +0000 (14:55 -0600)]
tgsi: added tgsi_get_processor_name()

14 years agotgsi: fix tgsi_exec_machine_bind_shader() to handle NULL tokens, samplers
Brian Paul [Thu, 6 May 2010 20:38:55 +0000 (14:38 -0600)]
tgsi: fix tgsi_exec_machine_bind_shader() to handle NULL tokens, samplers

This lets us unbind a shader from the tgsi_exec_machine.  Since
shaders aren't ref counted we need this to properly clean up when
deleting shaders elsewhere.

14 years agogallium/tgsi: remove unused tgsi_exec_labels code
Brian Paul [Thu, 6 May 2010 20:37:07 +0000 (14:37 -0600)]
gallium/tgsi: remove unused tgsi_exec_labels code

14 years agollvmpipe: Fix fence wait.
José Fonseca [Thu, 6 May 2010 20:33:01 +0000 (21:33 +0100)]
llvmpipe: Fix fence wait.

Avoids crashing when fence is NULL (LP_NUM_THREADS=0) and leaking when
it is not.

14 years agost/mesa: fix compressed mipmap generation for small image sizes
Brian Paul [Thu, 6 May 2010 20:24:45 +0000 (14:24 -0600)]
st/mesa: fix compressed mipmap generation for small image sizes

When the mipmap level is smaller than the compression block width, height
we need to fill in / replicate pixels so that we don't get garbage values.

Fixes piglit gen-compressed-teximage test.

14 years agost/mesa: fix bug in compute_num_levels()
Brian Paul [Thu, 6 May 2010 19:33:37 +0000 (13:33 -0600)]
st/mesa: fix bug in compute_num_levels()

Fix more fall-out from the "ignore BaseLevel" change.
This may help with fd.o bug 27991.

14 years agost/mesa: when copying mipmap levels between textures, start at BaseLevel
Brian Paul [Thu, 6 May 2010 19:31:37 +0000 (13:31 -0600)]
st/mesa: when copying mipmap levels between textures, start at BaseLevel

Saves some work and avoids potential issue with inconsistant mipmap
level sizes.  As long as the mipmap levels from BaseLevel to MaxLevel
are consistant, we don't care about the other levels.

14 years agoscons: Disable graw-null on msvc until linkage works.
José Fonseca [Thu, 6 May 2010 20:19:35 +0000 (21:19 +0100)]
scons: Disable graw-null on msvc until linkage works.

14 years agograw-null: Try to fix MSVC linkage problems.
José Fonseca [Thu, 6 May 2010 20:06:10 +0000 (21:06 +0100)]
graw-null: Try to fix MSVC linkage problems.

14 years agoes: Ignores
Jakob Bornecrantz [Thu, 6 May 2010 19:02:43 +0000 (20:02 +0100)]
es: Ignores

14 years agosvga: Fix scons build
Jakob Bornecrantz [Thu, 6 May 2010 18:59:54 +0000 (19:59 +0100)]
svga: Fix scons build

14 years agollvmpipe: implement occlusion query
Qicheng Christopher Li [Thu, 6 May 2010 17:45:42 +0000 (11:45 -0600)]
llvmpipe: implement occlusion query

OpenGL occlusion queries work now.  The Mesa demos, glean test and piglit
tests all pass.  A few enhancements are possible in the future. -Brian

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agoutil: Recognize FALSE and F in debug_get_bool_option
Jakob Bornecrantz [Thu, 6 May 2010 14:42:18 +0000 (15:42 +0100)]
util: Recognize FALSE and F in debug_get_bool_option

Concidering that we actually print FALSE when displaying the
option we should also accept that value.

14 years agogallium: untrack u_indices_gen.c and u_indices_gen.c
José Fonseca [Thu, 6 May 2010 13:23:04 +0000 (14:23 +0100)]
gallium: untrack u_indices_gen.c and u_indices_gen.c

These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agoraw/clear: Make it portable.
José Fonseca [Thu, 6 May 2010 13:20:28 +0000 (14:20 +0100)]
raw/clear: Make it portable.

14 years agograw-null: New target to ensure we always have a graw implementation available.
José Fonseca [Thu, 6 May 2010 13:20:13 +0000 (14:20 +0100)]
graw-null: New target to ensure we always have a graw implementation available.

14 years agograw-xlib: Remove duplicate graw.h file.
José Fonseca [Thu, 6 May 2010 12:08:39 +0000 (13:08 +0100)]
graw-xlib: Remove duplicate graw.h file.

14 years agoRevert "gallium: untrack u_indices_gen.c and u_indices_gen.c"
José Fonseca [Thu, 6 May 2010 11:47:23 +0000 (12:47 +0100)]
Revert "gallium: untrack u_indices_gen.c and u_indices_gen.c"

This incomplete patch got commited by mistake.

This reverts commit 2142c769a4ebfe1a7c3facb036af8b75c5288616.

14 years agogallium: untrack u_indices_gen.c and u_indices_gen.c
Xavier Chantry [Sun, 2 May 2010 22:56:50 +0000 (15:56 -0700)]
gallium: untrack u_indices_gen.c and u_indices_gen.c

These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agogallium: untrack u_indices_gen.c and u_indices_gen.c
Xavier Chantry [Sun, 2 May 2010 22:56:50 +0000 (15:56 -0700)]
gallium: untrack u_indices_gen.c and u_indices_gen.c

These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agodarwin: Fix build
Jeremy Huddleston [Sat, 1 May 2010 20:59:30 +0000 (13:59 -0700)]
darwin: Fix build

This is a regression from e42d84eaba228d4d96a46d116c6ca24581e29439

https://bugs.freedesktop.org/show_bug.cgi?id=27929

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4d63be67f320839d115987211d0d9b4297f6d17d)

14 years agogallium: still more provoking vertex fixes
Brian Paul [Thu, 6 May 2010 00:46:05 +0000 (18:46 -0600)]
gallium: still more provoking vertex fixes

This fixes edge flags for polygons and provoking vertex for
filled quads.

14 years agogallium: added edge flag print/debug code (disabled)
Brian Paul [Thu, 6 May 2010 00:00:39 +0000 (18:00 -0600)]
gallium: added edge flag print/debug code (disabled)

14 years agogallium: rename draw() to draw_elements() in vbuf code
Brian Paul [Wed, 5 May 2010 20:00:58 +0000 (14:00 -0600)]
gallium: rename draw() to draw_elements() in vbuf code

Now we have draw_elements() and draw_arrays() to be consistent with the
pipe_context drawing functions.

14 years agollvmpipe: update driver's provoking vertex code
Brian Paul [Wed, 5 May 2010 19:52:05 +0000 (13:52 -0600)]
llvmpipe: update driver's provoking vertex code

Note that the lp_setup_vbuf.c code is very, very similar to the
corresponding code in softpipe.  It could probably be shared.

14 years agogallium: rework provoking vertex code
Brian Paul [Thu, 6 May 2010 00:19:06 +0000 (18:19 -0600)]
gallium: rework provoking vertex code

Builds on commit ddb0e18f6c5582d4d2cc59ffd16ad9c4639ed059 and fixes
regressions in glean clipFlat test.

We assume that Gallium drivers observe flatshade_first for all triangles
and that all the assorted per-triangle calls in the 'draw' module also
follow flatshade_first.  Everything else builds on those rules.

Gallium does not use follow flatshade_first for GL quads, quad strips
and polygons; the "last" vertex is always the provoking vertex for those
prims.  So now there are separate QUAD_FIRST_PV and QUAD_LAST_PV macros
in the draw primitive decomposition code instead of one QUAD macro.