mesa.git
14 years agosoftpipe: Adverstise (tgsi_exec's) shader limits.
José Fonseca [Wed, 12 May 2010 13:10:10 +0000 (14:10 +0100)]
softpipe: Adverstise (tgsi_exec's) shader limits.

14 years agomesa/st: Expose pipe driver's shader limits.
José Fonseca [Wed, 12 May 2010 13:09:14 +0000 (14:09 +0100)]
mesa/st: Expose pipe driver's shader limits.

14 years agogallium: Add new fine grained PIPE_CAP_xx for shader limits.
José Fonseca [Wed, 12 May 2010 13:08:22 +0000 (14:08 +0100)]
gallium: Add new fine grained PIPE_CAP_xx for shader limits.

PIPE_CAP_GLSL and PIPE_CAP_SM3 not removed yet, as opcode support is not
yet covered.

14 years agogallium: Make PIPE_CAP_xxx enums.
José Fonseca [Tue, 11 May 2010 10:11:03 +0000 (11:11 +0100)]
gallium: Make PIPE_CAP_xxx enums.

14 years agost/egl: Link egl-apis to LLVM when enabled.
Chia-I Wu [Wed, 12 May 2010 07:46:57 +0000 (15:46 +0800)]
st/egl: Link egl-apis to LLVM when enabled.

This is required when a client API (i.e. OpenGL) uses the draw module.

14 years agost/mesa: Do not use draw module in OpenGL ES build.
Chia-I Wu [Wed, 12 May 2010 07:39:27 +0000 (15:39 +0800)]
st/mesa: Do not use draw module in OpenGL ES build.

This removes references to symbols in draw module for OpenGL ES build.
As OpenGL ES does not support feedback/selection mode, draw module is
used in pathes that will never be reached.  However, if the symbols are
referenced, it will bloat the final shared libraries unnecessarily.
This is serious when LLVM is enabled.

14 years agomesa/es: Merge back to core mesa.
Chia-I Wu [Wed, 12 May 2010 06:17:17 +0000 (14:17 +0800)]
mesa/es: Merge back to core mesa.

With the omit list gone, there are not too many differences in building
core mesa and ES overlay.  Remove the mesa/es and build both of them in
src/mesa/Makefile.

14 years agomesa/es: Remove omit list.
Chia-I Wu [Wed, 12 May 2010 05:37:37 +0000 (13:37 +0800)]
mesa/es: Remove omit list.

vbo/vbo_save* are the last members on the omit list.  Test FEATURE_dlist
in the sources and remove the omit list.

14 years agomesa: Make FEATURE_ATI_fragment_shader more modular.
Chia-I Wu [Wed, 12 May 2010 05:26:14 +0000 (13:26 +0800)]
mesa: Make FEATURE_ATI_fragment_shader more modular.

This allows atifragshader.h to be used without knowing if
FEATURE_ATI_fragment_shader is enabled.  As a result, atifragshader.c is
removed from the omit list in ES overlay.

14 years agomesa/es: Remove sources.mak.
Chia-I Wu [Wed, 12 May 2010 04:51:05 +0000 (12:51 +0800)]
mesa/es: Remove sources.mak.

All ES overlay sources have been merged into core Mesa.  Not much is
left in sources.mak so merge it into Makefile.

14 years agomesa/es: Update sources.mak and fix the build.
Chia-I Wu [Wed, 31 Mar 2010 04:44:26 +0000 (12:44 +0800)]
mesa/es: Update sources.mak and fix the build.

Remove sources that are feature-aware from the omit list.  x86 -O0 build
is ~12KiB smaller afther making those sources feature-aware.

Also, remove get.c from the omit list as get_es[12].c have been merged
to it.

14 years agost/mesa: Make st_cb_drawtex.h FEATURE_OES_draw_texture aware.
Chia-I Wu [Tue, 11 May 2010 05:20:40 +0000 (13:20 +0800)]
st/mesa: Make st_cb_drawtex.h FEATURE_OES_draw_texture aware.

This change allows st_cb_drawtex.h to be used without knowing if
FEATURE_OES_draw_texture is enabled.

14 years agomesa: Add dummy _mesa_lookup_query_object to queryobj.h.
Chia-I Wu [Wed, 31 Mar 2010 04:56:45 +0000 (12:56 +0800)]
mesa: Add dummy _mesa_lookup_query_object to queryobj.h.

This allows condrender.c to be compiled without FEATURE_queryobj.

14 years agost/mesa: Make st_cb_blit.h FEATURE_EXT_framebuffer_blit aware.
Chia-I Wu [Wed, 31 Mar 2010 04:33:26 +0000 (12:33 +0800)]
st/mesa: Make st_cb_blit.h FEATURE_EXT_framebuffer_blit aware.

This change allows st_cb_blit.h to be used without knowing if
FEATURE_EXT_framebuffer_blit is enabled.

14 years agost/mesa: Make st_cb_queryobj.h FEATURE_queryobj aware.
Chia-I Wu [Wed, 31 Mar 2010 04:29:05 +0000 (12:29 +0800)]
st/mesa: Make st_cb_queryobj.h FEATURE_queryobj aware.

This change allows st_cb_queryobj.h to be used without knowing if
FEATURE_queryobj is enabled.

14 years agost/mesa: Make FEATURE_feedback and FEATURE_rastpos more modular.
Chia-I Wu [Wed, 31 Mar 2010 04:01:16 +0000 (12:01 +0800)]
st/mesa: Make FEATURE_feedback and FEATURE_rastpos more modular.

Make st_cb_feedback.h FEATURE_feedback aware and st_cb_rastpos.h
FEATURE_rastpos aware.  Move creation of selection/feedback draw context
to st_init_draw.

14 years agost/mesa: Make st_cb_{bitmap,drawpixels}.h FEATURE_drawpix aware.
Chia-I Wu [Wed, 31 Mar 2010 03:54:20 +0000 (11:54 +0800)]
st/mesa: Make st_cb_{bitmap,drawpixels}.h FEATURE_drawpix aware.

This change allows st_cb_{bitmap,drawpixels}.h to be used without
knowing if FEATURE_drawpix is enabled.

14 years agost/mesa: Make st_cb_accum.h FEATURE_accum aware.
Chia-I Wu [Wed, 31 Mar 2010 03:43:49 +0000 (11:43 +0800)]
st/mesa: Make st_cb_accum.h FEATURE_accum aware.

This change allows st_cb_accum.h to be used without knowing if
FEATURE_accum is enabled.

14 years agomesa: Make FEATURE_EXT_transform_feedback more modular.
Chia-I Wu [Tue, 11 May 2010 05:20:40 +0000 (13:20 +0800)]
mesa: Make FEATURE_EXT_transform_feedback more modular.

This allows transformfeedback.h and st_cb_xformfb.h to be included and
used without knowing if FEATURE_EXT_transform_feedback is enabled.  Fix
build of ES overlay.

14 years agoglapi: fix generator scripts w.r.t. GLX_USE_APPLEGL
Brian Paul [Wed, 12 May 2010 03:40:25 +0000 (21:40 -0600)]
glapi: fix generator scripts w.r.t. GLX_USE_APPLEGL

Commit 80b280db883edc9550484dba03bd5c124b6a9bf9 changed the .c files
instead of the .py generator scripts.

14 years agoglapi: added GL_ARB_transform_feedback2 entrypoints
Brian Paul [Wed, 12 May 2010 03:31:08 +0000 (21:31 -0600)]
glapi: added GL_ARB_transform_feedback2 entrypoints

14 years agoprogs/tests: disable invalid 3D texture compression tests
Brian Paul [Wed, 12 May 2010 03:27:31 +0000 (21:27 -0600)]
progs/tests: disable invalid 3D texture compression tests

14 years agoprogs/tests: fix a couple bugs in the getprocaddress.c test
Brian Paul [Wed, 12 May 2010 03:21:26 +0000 (21:21 -0600)]
progs/tests: fix a couple bugs in the getprocaddress.c test

14 years agomesa: fix error message strings
Brian Paul [Wed, 12 May 2010 03:13:21 +0000 (21:13 -0600)]
mesa: fix error message strings

14 years agoprogs/tests: update getprocaddress test since moving glapi files
Brian Paul [Wed, 12 May 2010 03:09:20 +0000 (21:09 -0600)]
progs/tests: update getprocaddress test since moving glapi files

14 years agomesa: added glGet code for GL_ARB_transform_feedback2
Brian Paul [Wed, 12 May 2010 03:08:08 +0000 (21:08 -0600)]
mesa: added glGet code for GL_ARB_transform_feedback2

14 years agomesa: remove unused header
Brian Paul [Wed, 12 May 2010 03:07:16 +0000 (21:07 -0600)]
mesa: remove unused header

14 years agomesa: remove unused header
Brian Paul [Wed, 12 May 2010 03:07:00 +0000 (21:07 -0600)]
mesa: remove unused header

14 years agoglew: update to version 1.5.4
Brian Paul [Wed, 12 May 2010 03:06:31 +0000 (21:06 -0600)]
glew: update to version 1.5.4

14 years agost/mesa: update query code for transform feedback
Brian Paul [Wed, 12 May 2010 03:04:43 +0000 (21:04 -0600)]
st/mesa: update query code for transform feedback

14 years agodocs: update GL3.txt w/ GL 3.3, 4.0 lists
Brian Paul [Wed, 12 May 2010 03:03:53 +0000 (21:03 -0600)]
docs: update GL3.txt w/ GL 3.3, 4.0 lists

14 years agomesa/st+tgsi: Provide a free callback to match with ureg_get_tokens().
José Fonseca [Tue, 11 May 2010 20:27:05 +0000 (21:27 +0100)]
mesa/st+tgsi: Provide a free callback to match with ureg_get_tokens().

This fixes crashes with the memory debugging routines on Windows.

NOTE: This is a candidate for the 7.8 stable branch

14 years agoautoconf: Also strip '\r' character in version scrape.
Vinson Lee [Tue, 11 May 2010 19:33:30 +0000 (12:33 -0700)]
autoconf: Also strip '\r' character in version scrape.

Fixes autoconf GCC conftest.c test on Cygwin.

14 years agomesa: Optimize get.c by using a table-driven approach
Kristian Høgsberg [Tue, 11 May 2010 16:07:10 +0000 (12:07 -0400)]
mesa: Optimize get.c by using a table-driven approach

14 years agollvmpipe: fix texture image size calculation
Brian Paul [Tue, 11 May 2010 17:48:35 +0000 (11:48 -0600)]
llvmpipe: fix texture image size calculation

We were allocating too much memory for linear layouts.  The block_size
factor is already included in the row_stride and should not be used in
the img_stride calculation.  This is typically a 4x savings!

14 years agollvmpipe: add a simple resource tracking/debug feature
Brian Paul [Tue, 11 May 2010 17:50:43 +0000 (11:50 -0600)]
llvmpipe: add a simple resource tracking/debug feature

If debug build, keep a linked list of all allocated resources (textures).
The llvmipe_print_resources() function can be called from a debugger to
print a list of all resources, their sizes, total size, etc.

14 years agollvmpipe: remove trailing whitespace, rewrap comment
Brian Paul [Tue, 11 May 2010 16:22:54 +0000 (10:22 -0600)]
llvmpipe: remove trailing whitespace, rewrap comment

14 years agoscons: Export shouldn't be part of the if stanza.
José Fonseca [Tue, 11 May 2010 16:44:52 +0000 (17:44 +0100)]
scons: Export shouldn't be part of the if stanza.

14 years agost/mesa: Remove unnecessary header.
Vinson Lee [Tue, 11 May 2010 16:03:42 +0000 (09:03 -0700)]
st/mesa: Remove unnecessary header.

14 years agointel: Don't update renderbuffers in intelSetTexBuffer2 if we have invalidate
Kristian Høgsberg [Tue, 11 May 2010 14:32:40 +0000 (10:32 -0400)]
intel: Don't update renderbuffers in intelSetTexBuffer2 if we have invalidate

14 years agointel: Drop viewport hack when we can
Kristian Høgsberg [Tue, 11 May 2010 14:23:34 +0000 (10:23 -0400)]
intel: Drop viewport hack when we can

14 years agoglx: Provide the __DRI_USE_INVALIDATE extension to the driver when we can
Kristian Høgsberg [Tue, 11 May 2010 13:42:57 +0000 (09:42 -0400)]
glx: Provide the __DRI_USE_INVALIDATE extension to the driver when we can

When we have DRI2 protocol at least 2.3, we get an event from the
server when the back buffers get invalidated.  When that's the case
let the driver know that it can rely on invalidate instead of the
glViewport polling.

14 years agodri_interface.h: Add new __DRI_USE_INVALIDATE extension
Kristian Høgsberg [Tue, 11 May 2010 13:09:30 +0000 (09:09 -0400)]
dri_interface.h: Add new __DRI_USE_INVALIDATE extension

The presence of this extension indicates to the DRI driver that the
loader will call invalidate in the __DRI2_FLUSH extension, whenever
the needs to query for new buffers.  This means that the DRI driver
can drop the polling in glViewport().

14 years agost/xorg: Fix SCons build.
Michel Dänzer [Tue, 11 May 2010 14:02:42 +0000 (16:02 +0200)]
st/xorg: Fix SCons build.

14 years agomesa/st: Remove internal flushes from Mesa state tracker.
José Fonseca [Tue, 11 May 2010 12:57:11 +0000 (13:57 +0100)]
mesa/st: Remove internal flushes from Mesa state tracker.

Now that transfers are context operations it is the driver's
responsibility to ensure that transfers happen in order with all other
context operations, so flushes and finishes inside Mesa should be no
longer necessary. The attached patch implements that.

This should proportionate significant improvements for hardware drivers
which are able to stream transfers in the command buffers.

You can use the softpipe/llvmpipe_flush_resource() as reference
implementation of the worst case scenario, where the driver is not able
to streamline transfers. But the expectation is that driver
implementators will want to avoid flushing as much as possible.

14 years agotests/graw: raw -> graw
José Fonseca [Mon, 10 May 2010 23:36:15 +0000 (00:36 +0100)]
tests/graw: raw -> graw

for consistency

14 years agomesa: s/uint/GLuint/ in _mesa_BindTransformFeedback prototype.
Vinson Lee [Tue, 11 May 2010 05:58:23 +0000 (22:58 -0700)]
mesa: s/uint/GLuint/ in _mesa_BindTransformFeedback prototype.

From http://www.opengl.org/registry/api/glext.h
GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);

Fixes MinGW build.

14 years agogallium: Add llvmpipe support to st/egl.
Chia-I Wu [Tue, 11 May 2010 04:36:49 +0000 (12:36 +0800)]
gallium: Add llvmpipe support to st/egl.

Update Makefile rules for st/egl.

14 years agomesa: more transform feedback infrastructure
Brian Paul [Tue, 11 May 2010 03:11:21 +0000 (21:11 -0600)]
mesa: more transform feedback infrastructure

Includes GL_ARB_transform_feedback2 which encapsulates transform feedback
state in objects.

14 years agointel: Also flush front buffer in glFinish()
Kristian Høgsberg [Tue, 11 May 2010 01:10:24 +0000 (21:10 -0400)]
intel: Also flush front buffer in glFinish()

14 years agollvmpipe: enable PIPE_CAP_INDEP_BLEND_ENABLE
Brian Paul [Mon, 10 May 2010 23:03:10 +0000 (17:03 -0600)]
llvmpipe: enable PIPE_CAP_INDEP_BLEND_ENABLE

This enables the GL_EXT_draw_buffers2 extension.
Tested with progs/tests/drawbuffers2.

14 years agollvmpipe: fix up indexing of blend/colormask state for render targets
Brian Paul [Mon, 10 May 2010 23:02:06 +0000 (17:02 -0600)]
llvmpipe: fix up indexing of blend/colormask state for render targets

14 years agollvmpipe: update image dump/debug code
Brian Paul [Mon, 10 May 2010 22:45:25 +0000 (16:45 -0600)]
llvmpipe: update image dump/debug code

14 years agollvmpipe: add, update, rewrap comments
Brian Paul [Mon, 10 May 2010 22:01:09 +0000 (16:01 -0600)]
llvmpipe: add, update, rewrap comments

14 years agogallivm/llvmpipe: move an old comment to a better location
Brian Paul [Mon, 10 May 2010 21:41:22 +0000 (15:41 -0600)]
gallivm/llvmpipe: move an old comment to a better location

14 years agost/mesa: rename vars, added comments
Brian Paul [Mon, 10 May 2010 19:46:39 +0000 (13:46 -0600)]
st/mesa: rename vars, added comments

14 years agoi915: Drop intelFlush().
Vinson Lee [Mon, 10 May 2010 22:41:22 +0000 (15:41 -0700)]
i915: Drop intelFlush().

This was missed in commit c4775a27e3aaa2006b98f225387499b79bc609ef.
Fixes i915 build.

14 years agointel: Drop intelFlush()
Kristian Høgsberg [Mon, 10 May 2010 21:42:43 +0000 (17:42 -0400)]
intel: Drop intelFlush()

Now that intel_flush() deosn't use the needs_mi_flush argument, we can
finally drop one of the two flush functions.

14 years agointel: Only flush fake front buffer on API level glFlush()
Kristian Høgsberg [Mon, 10 May 2010 20:18:55 +0000 (16:18 -0400)]
intel: Only flush fake front buffer on API level glFlush()

Without this patch, any old intel_flush() call will cause a round trip to
the server and do a copy from fake to real front.  We only actually
guarantee that frontbuffer results show up when glFlush() ia called, so
move the flushing to intel_glFlush().

We also need to flush fake to front before getting new buffers, but
we just handle that manually.

14 years agointel: Don't mark front buffer dirty if we're only reading
Kristian Høgsberg [Mon, 10 May 2010 20:01:38 +0000 (16:01 -0400)]
intel: Don't mark front buffer dirty if we're only reading

When we call intel_prepare_render() from intelReadPixels(), we'll mark
the front buffer dirty.  That's silly, since we're only reading from it
and marking it dirty will cause us to copy from fake front to front
eventually.

Just clear the dirty flag after doing the read.

14 years agointel: Mark frontbuffer dirty in intel_prepare_render()
Kristian Høgsberg [Mon, 10 May 2010 19:58:06 +0000 (15:58 -0400)]
intel: Mark frontbuffer dirty in intel_prepare_render()

Now that we have intel_prepare_render() in place, we can use it to mark
the front buffer dirty if we're rendering to the front buffer once we
get there.

14 years agoglx: Only call DRI2 invalidate when necessary
Kristian Høgsberg [Mon, 10 May 2010 19:51:31 +0000 (15:51 -0400)]
glx: Only call DRI2 invalidate when necessary

We only need this when the server may have swapped the buffers or
when we receive an invalidate event from the server.  The default
behaviour is still that the DRI driver will invalidate its own buffers
when glViewport is called.

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

14 years agosvga: Fill in is_resource_referenced callback.
José Fonseca [Mon, 10 May 2010 20:20:26 +0000 (21:20 +0100)]
svga: Fill in is_resource_referenced callback.

14 years agogallivm: Silent warning.
José Fonseca [Mon, 10 May 2010 16:10:02 +0000 (17:10 +0100)]
gallivm: Silent warning.

14 years agogallivm: Add missing lvalue.
José Fonseca [Sun, 9 May 2010 18:00:50 +0000 (19:00 +0100)]
gallivm: Add missing lvalue.

14 years agost/mesa: only set prevInstWrotePsiz if translating a vertex program
Brian Paul [Mon, 10 May 2010 18:35:27 +0000 (12:35 -0600)]
st/mesa: only set prevInstWrotePsiz if translating a vertex program

14 years agost/mesa: additional assertions in dst_register()
Brian Paul [Mon, 10 May 2010 18:31:35 +0000 (12:31 -0600)]
st/mesa: additional assertions in dst_register()

14 years agoi965g: link with software- wrapper winsys and drm api helper
Jakob Bornecrantz [Mon, 10 May 2010 16:03:46 +0000 (17:03 +0100)]
i965g: link with software- wrapper winsys and drm api helper

14 years agogallium: Add software drm api helper to scons build
Jakob Bornecrantz [Mon, 10 May 2010 16:03:13 +0000 (17:03 +0100)]
gallium: Add software drm api helper to scons build

14 years agogallium: Add pipe wrapper software winsys to scons build
Jakob Bornecrantz [Mon, 10 May 2010 16:02:15 +0000 (17:02 +0100)]
gallium: Add pipe wrapper software winsys to scons build

14 years agoi965g: fix resource creation recursion bug
Roland Scheidegger [Mon, 10 May 2010 15:42:28 +0000 (17:42 +0200)]
i965g: fix resource creation recursion bug

14 years agoi965g: add brw_state_debug.c to SConscript
Roland Scheidegger [Mon, 10 May 2010 15:42:12 +0000 (17:42 +0200)]
i965g: add brw_state_debug.c to SConscript

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).