mesa.git
14 years agost/wgl: Include main/core.h.
Chia-I Wu [Mon, 23 Aug 2010 09:31:27 +0000 (17:31 +0800)]
st/wgl: Include main/core.h.

Make st/wgl include only main/core.h from core mesa.

14 years agost/glx: Include main/core.h.
Chia-I Wu [Mon, 23 Aug 2010 09:31:38 +0000 (17:31 +0800)]
st/glx: Include main/core.h.

Make st/glx include only main/core.h from core mesa.

14 years agoglsl: Include main/core.h.
Chia-I Wu [Mon, 23 Aug 2010 09:51:42 +0000 (17:51 +0800)]
glsl: Include main/core.h.

Make glsl include only main/core.h from core mesa.

14 years agomesa: Add core.h.
Chia-I Wu [Mon, 23 Aug 2010 09:39:15 +0000 (17:39 +0800)]
mesa: Add core.h.

core.h is the public header of core mesa.  GLX, WGL, and GLSL are
supposed to include this header file.  It should be noted that headers
included by core.h must not perform feature tests (#if FEATURE_xxx).
Otherwise, we cannot, for example, mix a FEATURE_ES2 libmesagallium.a
with a FEATURE_GL libglsl.a.

14 years agotranslate_sse: clear state for each function emission
Luca Barbieri [Tue, 24 Aug 2010 02:16:42 +0000 (04:16 +0200)]
translate_sse: clear state for each function emission

Fixes #29771.

14 years agoglsl: Rely on talloc_autofree_context() instead of trying to free on our own.
Eric Anholt [Tue, 24 Aug 2010 00:16:25 +0000 (17:16 -0700)]
glsl: Rely on talloc_autofree_context() instead of trying to free on our own.

Because the static types talloc their names at dlopen time,
talloc_freeing the types at DRI driver screen teardown means that if
the screen gets brought back up again, the names will point at freed
memory.  talloc_autofree_context() exists to do just what we want
here: Free memory referenced across the program's lifetime so that we
avoid noise in memory leak checkers.

Fixes: bug #29722 (assertion failure in unigine).
14 years agointel: Add support for MAX_SAMPLES=1 EXT_framebuffer_multisample.
Eric Anholt [Mon, 23 Aug 2010 22:53:16 +0000 (15:53 -0700)]
intel: Add support for MAX_SAMPLES=1 EXT_framebuffer_multisample.

The spec specifically sets the minimum MAX_SAMPLES at 1 to allow exposing
the extension on all implementations, so do so.

14 years agoradeon: print chip family for evergreen in renderer string
Alex Deucher [Tue, 24 Aug 2010 00:18:28 +0000 (20:18 -0400)]
radeon: print chip family for evergreen in renderer string

14 years agor600g: add XPD support
Dave Airlie [Mon, 23 Aug 2010 23:56:22 +0000 (09:56 +1000)]
r600g: add XPD support

ported from r600c.

14 years agor600g: add CMP support.
Dave Airlie [Mon, 23 Aug 2010 23:18:32 +0000 (09:18 +1000)]
r600g: add CMP support.

ported from r600c, fixes fp-cmp, glsl1-sqrt*

14 years agonvfx: don't emit dummy commands on nv30
Luca Barbieri [Mon, 23 Aug 2010 22:03:28 +0000 (00:03 +0200)]
nvfx: don't emit dummy commands on nv30

Should fix errors on the original nv30, reported by pmdata.

14 years agoglsl: When unable to assign the initializer for a const variable, set it to 0.
Eric Anholt [Mon, 23 Aug 2010 21:54:06 +0000 (14:54 -0700)]
glsl: When unable to assign the initializer for a const variable, set it to 0.

This prevents assertion failures or cascading errors after we've
logged the fact that we were unable to handle the initializer.

Fixes unsized-array-non-const-index-2.vert

14 years agotranslate_sse: fix x86-64
Luca Barbieri [Mon, 23 Aug 2010 21:21:18 +0000 (23:21 +0200)]
translate_sse: fix x86-64

14 years agoglsl: Cleanly fail when a function has an unknown return type.
Eric Anholt [Mon, 23 Aug 2010 20:26:52 +0000 (13:26 -0700)]
glsl: Cleanly fail when a function has an unknown return type.

Bug #29608.

14 years agor600g: Add support for PIPE_CAP_DEPTH_CLAMP.
Henri Verbeet [Mon, 23 Aug 2010 19:13:59 +0000 (21:13 +0200)]
r600g: Add support for PIPE_CAP_DEPTH_CLAMP.

14 years agoglsl: Rebuild builtins for any() change.
Eric Anholt [Mon, 23 Aug 2010 19:54:55 +0000 (12:54 -0700)]
glsl: Rebuild builtins for any() change.

14 years agomesa: Add new ir_unop_any() expression operation.
Eric Anholt [Mon, 23 Aug 2010 19:21:33 +0000 (12:21 -0700)]
mesa: Add new ir_unop_any() expression operation.

The previous any() implementation would generate arg0.x || arg0.y ||
arg0.z.  Having an expression operation for this makes it easy for the
backend to generate something easier (DPn + SNE for 915 FS, .any
predication on 965 VS)

14 years agoglsl: Regenerate builtins with the new sorting.
Eric Anholt [Mon, 23 Aug 2010 19:39:35 +0000 (12:39 -0700)]
glsl: Regenerate builtins with the new sorting.

14 years agoir_to_mesa: Implement f2b by comparing the arg to 0, not the result.
Eric Anholt [Mon, 23 Aug 2010 19:53:39 +0000 (12:53 -0700)]
ir_to_mesa: Implement f2b by comparing the arg to 0, not the result.

Fixes: glsl-fs-any
14 years agoglsl: Count function call outvals as writing to variables for linker checks.
Eric Anholt [Mon, 23 Aug 2010 18:29:25 +0000 (11:29 -0700)]
glsl: Count function call outvals as writing to variables for linker checks.

Fixes: glsl-vs-position-outval. Bug #28138 (regnum online)
14 years agoglsl2: Include imports.h to get snprintf wrapper for MSVC
Ian Romanick [Fri, 13 Aug 2010 00:57:07 +0000 (17:57 -0700)]
glsl2: Include imports.h to get snprintf wrapper for MSVC

Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agomesa: Fix msvc build of glsl.
Aras Pranckevicius [Mon, 23 Aug 2010 06:19:51 +0000 (09:19 +0300)]
mesa: Fix msvc build of glsl.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
14 years agoauxiliary: fix nvfx/nv50 primitive splitting for line loops
Luca Barbieri [Mon, 23 Aug 2010 19:43:11 +0000 (21:43 +0200)]
auxiliary: fix nvfx/nv50 primitive splitting for line loops

s->close_first was on the wrong side of the inequality.

Caught by blender.
Thanks to AndrewR for reporting this.

14 years agor600g: export one component per pixel + r7xx uncompression shader
Jerome Glisse [Mon, 23 Aug 2010 19:39:39 +0000 (15:39 -0400)]
r600g: export one component per pixel + r7xx uncompression shader

We need to always at least export one component (wether it's depth
or color. Add valid r7xx shader program for depth decompression.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agogenerate_builtins.py: Generate output in sorted order.
Kenneth Graunke [Mon, 23 Aug 2010 19:36:40 +0000 (12:36 -0700)]
generate_builtins.py: Generate output in sorted order.

14 years agonvfx: improve fp temp accounting
Luca Barbieri [Mon, 23 Aug 2010 18:27:40 +0000 (20:27 +0200)]
nvfx: improve fp temp accounting

14 years agotgsi: fix false CondStackTop==0 assertion
Brian Paul [Mon, 23 Aug 2010 00:40:48 +0000 (18:40 -0600)]
tgsi: fix false CondStackTop==0 assertion

14 years agoir_to_mesa: Fix constant array handling to return the temp we created.
Eric Anholt [Mon, 23 Aug 2010 17:57:54 +0000 (10:57 -0700)]
ir_to_mesa: Fix constant array handling to return the temp we created.

We ended up returning CONST[loc] rather than TEMP[loc2].  Things would
*usually* end up working out OK, since the constants often ended up
getting allocated to CONST[loc..loc+columns] with no swizzle.  But for
the case where the contigous temporary copy of the swizzled constant
vec4 args was actually needed, we'd end up reading some other constant
values, possibly including ones not actually allocated.

Fixes: glsl-varying-mat3x2.
14 years agoglcpp: Make standalone preprocessor work with a tty as stdin
Carl Worth [Mon, 23 Aug 2010 17:43:27 +0000 (10:43 -0700)]
glcpp: Make standalone preprocessor work with a tty as stdin

Previously glcpp would silently abort if it couldn't fstat the file being
read, (so it would work with stdin redirected from a file, but would not
work with stdin as a tty). The stat was so that glcpp could allocate
a buffer for the file content in a single call.

We now use talloc_realloc instead, (even if the fstat is
possible). This is theoretically less efficient, but quite irrelevant,
(particularly because the standalone preprocessor is used only for
testing).

14 years agoglcpp: Fix test suite to avoid flagging failed tests as valgrind errors.
Carl Worth [Mon, 23 Aug 2010 17:41:30 +0000 (10:41 -0700)]
glcpp: Fix test suite to avoid flagging failed tests as valgrind errors.

We recently added several tests that intentionally trigger
preprocessor errors. During valgrind-based testing, our test script
was noticing the non-zero return value from the preprocessor and
incorrectly flagging the valgrind-based test as failing.

To fix this, we make valgrind return an error code that is otherwise
unused by the preprocessor.

14 years agoglcpp: Fix segfault in standalone preprocessor for "file not found", etc.
Carl Worth [Mon, 23 Aug 2010 16:42:14 +0000 (09:42 -0700)]
glcpp: Fix segfault in standalone preprocessor for "file not found", etc.

This error message was missing so that the program would simply
segfault if the provided filename could not be opened for some reason.

While we're at it, we add explicit support for a filename of "-" to
indicate input from stdin.

14 years agoglcpp: Update generated glcpp-lex.c for the last two changes.
Carl Worth [Mon, 23 Aug 2010 16:35:24 +0000 (09:35 -0700)]
glcpp: Update generated glcpp-lex.c for the last two changes.

This fixes both "#line 0" and "#line XXX YYY" as described in the two
most recent commits.

14 years agoglcpp: Fix handling of "#line 0"
Carl Worth [Mon, 23 Aug 2010 16:31:42 +0000 (09:31 -0700)]
glcpp: Fix handling of "#line 0"

The existing DECIMAL_INTEGER pattern is the correct thing to use when
looking for a C decimal integer, (that is, a digit-sequence not
starting with 0 which would instead be an octal integer).

But for #line, we really want to accept any digit sequence, (including
"0"), and always interpret it as a decimal constant. So we add a new
DIGITS pattern for this case.

This should fix the compilation failure noted in bug #28138

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

(Though the generated file will not be updated until the next commit.)

14 years agoglcpp: Fix source numbers set with "#line LINE_NUMBER SOURCE_NUMBER"
Carl Worth [Mon, 23 Aug 2010 16:29:49 +0000 (09:29 -0700)]
glcpp: Fix source numbers set with "#line LINE_NUMBER SOURCE_NUMBER"

Previously, the YY_USER_ACTION was overwriting the yylloc->source value
in every action, (after that value had been carefully set by the handling
of the #line directive). Instead, we want to initialize it once in
YY_USER_INIT and then not touch it at all in YY_USER_ACTION.

14 years agoglcpp: Add new test for #line directive.
Carl Worth [Mon, 23 Aug 2010 16:26:44 +0000 (09:26 -0700)]
glcpp: Add new test for #line directive.

This test exposes two current bugs:

1. The source number is not being correctly emitted in error
   messages (instead, it's always 0).

2. A directive of "#line 0" is resulting in the following
   parse error:

preprocessor error: Invalid tokens after #

14 years agoglcpp: Update README file (new specifications and fewer limitations).
Carl Worth [Mon, 23 Aug 2010 16:06:11 +0000 (09:06 -0700)]
glcpp: Update README file (new specifications and fewer limitations).

The README file had grown a little bit stale. We've been using newer
versions of both the GLSL and C99 specifications, so list those. Also,
several of the documented known limitations have since been fixed, so
remove those.

14 years agoglcpp: Add test for the #error directive.
Carl Worth [Mon, 23 Aug 2010 15:54:06 +0000 (08:54 -0700)]
glcpp: Add test for the #error directive.

This directive is already implemented nicely, but wasn't previously tested.
It will be convenient to use this directive in further tests that rely
on error messages, (such as ensuring that #line correctly sets the line
number in the error message).

14 years agoglsl: Trim the size of uniform arrays to the maximum element used.
Eric Anholt [Mon, 23 Aug 2010 17:32:01 +0000 (10:32 -0700)]
glsl: Trim the size of uniform arrays to the maximum element used.

Fixes glsl-getactiveuniform-array-size.

14 years agomesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.
Eric Anholt [Mon, 23 Aug 2010 16:47:15 +0000 (09:47 -0700)]
mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.

Fixes: glsl-getactiveuniform-length.
14 years agoutil: fix util_fill_rect to take util_color instead of u32 param
Roland Scheidegger [Mon, 23 Aug 2010 15:55:16 +0000 (17:55 +0200)]
util: fix util_fill_rect to take util_color instead of u32 param

util_fill_rect could not handle formats with more than 32 bits,
since the fill color was a uint32_t value. Fix this by using
a util_color union instead, and also expand the union so it
works with formats which have up to 256 bits (the max of any
format currently defined).

14 years agonvfx: emit bo relocations only when needed
Luca Barbieri [Mon, 23 Aug 2010 14:43:04 +0000 (16:43 +0200)]
nvfx: emit bo relocations only when needed

Should improve performance, possibly significantly.

14 years agoglsl2: Add missing sig_iter.next() to the no-constant-folding-to-outvals fix.
Eric Anholt [Mon, 23 Aug 2010 14:05:07 +0000 (07:05 -0700)]
glsl2: Add missing sig_iter.next() to the no-constant-folding-to-outvals fix.

14 years agonvfx: match Gallium's gl_PointCoord brokenness
Luca Barbieri [Mon, 23 Aug 2010 13:20:31 +0000 (15:20 +0200)]
nvfx: match Gallium's gl_PointCoord brokenness

Gallium always puts gl_PointCoord in GENERIC[0] if
point_quad_rasterization is enabled.

This is silly, but for now it makes mesa-demos/glsl/pointcoord work.

14 years agonvfx: support clip planes sensibly and fix them on nv30
Luca Barbieri [Sun, 22 Aug 2010 22:31:08 +0000 (00:31 +0200)]
nvfx: support clip planes sensibly and fix them on nv30

Before, we were discarding the compiled vertex program on each
vertex program change.

Now we compile the program as if there were 6 clip planes and
dynamically patch in an "end program" bit at the right place.

Also, nv30 should now work.

14 years agor300g: avoid stall in no-tcl drawing when mapping vbo
Dave Airlie [Mon, 23 Aug 2010 10:28:02 +0000 (20:28 +1000)]
r300g: avoid stall in no-tcl drawing when mapping vbo

the current code reuses the same vbo over and over, however after a flush
we'd stall and wait for mapping on the vbo when we should just fire and forget.

On a gears test this brings me from ~620 to ~750 on my rv530 in swtcl mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoglapi: Clean up header inclusions.
Chia-I Wu [Mon, 23 Aug 2010 08:13:12 +0000 (16:13 +0800)]
glapi: Clean up header inclusions.

Do not rely on PUBLIC being defined in glapi.h.  Do not include core
mesa headers.

14 years agomesa: Assorted fixes for es_generator.py on win32.
Chia-I Wu [Sat, 21 Aug 2010 10:20:39 +0000 (18:20 +0800)]
mesa: Assorted fixes for es_generator.py on win32.

Fix mixed use of GL_APIENTRY and GLAPIENTRY.  Parameter list of a function
prototype should never be empty.

14 years agoi965: Add sandybridge D0 pci ids
Zhenyu Wang [Mon, 23 Aug 2010 02:16:45 +0000 (10:16 +0800)]
i965: Add sandybridge D0 pci ids

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
14 years agomesa: Fix typo in autoconf.in that made talloc cflags still detect at runtime.
Eric Anholt [Mon, 23 Aug 2010 01:53:33 +0000 (18:53 -0700)]
mesa: Fix typo in autoconf.in that made talloc cflags still detect at runtime.

14 years agost/mesa: implement depth-only blit for BlitFramebuffer
Marek Olšák [Sat, 14 Aug 2010 15:47:34 +0000 (08:47 -0700)]
st/mesa: implement depth-only blit for BlitFramebuffer

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agoutil: implement depth blitting in u_blit
Marek Olšák [Mon, 23 Aug 2010 01:29:32 +0000 (19:29 -0600)]
util: implement depth blitting in u_blit

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agost/mesa: fix BlitFramebuffer for D24S8 textures
Marek Olšák [Sat, 14 Aug 2010 15:47:32 +0000 (08:47 -0700)]
st/mesa: fix BlitFramebuffer for D24S8 textures

This is the same issue as in the previous patch, but here the Blit is not
implemented for separate depth and stencil buffers at all (such
a configuration is not supported in Gallium) and the code incorrectly treated
a D24S8 texture as two separate buffers, making this Blit a no-op.

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agost/mesa: added st_is_depth_stencil_combined() function
Brian Paul [Mon, 23 Aug 2010 01:34:53 +0000 (19:34 -0600)]
st/mesa: added st_is_depth_stencil_combined() function

This code is part of a patch by Marek Olšák.

14 years agoglsl: Don't constant-fold in a constant in place of a function outval.
Eric Anholt [Mon, 23 Aug 2010 01:26:42 +0000 (18:26 -0700)]
glsl: Don't constant-fold in a constant in place of a function outval.

14 years agoglsl: Convert constant folding to the rvalue visitor.
Eric Anholt [Mon, 23 Aug 2010 01:15:20 +0000 (18:15 -0700)]
glsl: Convert constant folding to the rvalue visitor.

This should be mostly a noop, except that a plain dereference of a
variable that is not part of a constant expression could now get
"constant folded".  I expect that for all current backends this will
be either a noop, or possibly a win when it provokes more
ir_algebraic.  It'll also ensure that when new features are added,
tree walking will work normally.  Before this, constants weren't
getting folded inside of loops.

14 years agoglsl: Don't tree-graft in an expression in place of a function outval.
Eric Anholt [Mon, 23 Aug 2010 01:25:55 +0000 (18:25 -0700)]
glsl: Don't tree-graft in an expression in place of a function outval.

Fixes: glsl-constant-folding-call-1 (bug #29737)
14 years agost/mesa: fix ReadPixels crashes when reading depth/stencil from a FBO
Brian Paul [Mon, 23 Aug 2010 01:04:47 +0000 (19:04 -0600)]
st/mesa: fix ReadPixels crashes when reading depth/stencil from a FBO

This is based on a patch from Marek Olšák.

NOTE: This is a candidate for the Mesa 7.8 branch.

14 years agomesa: use driver hook for creating new renderbuffers
Brian Paul [Mon, 23 Aug 2010 00:54:50 +0000 (18:54 -0600)]
mesa: use driver hook for creating new renderbuffers

14 years agost/mesa: clean-up pipe_get_transfer() calls
Brian Paul [Mon, 23 Aug 2010 00:48:28 +0000 (18:48 -0600)]
st/mesa: clean-up pipe_get_transfer() calls

14 years agomesa: AC_SUBST the talloc libs/cflags so the ./configure results are saved.
Eric Anholt [Mon, 23 Aug 2010 00:34:18 +0000 (17:34 -0700)]
mesa: AC_SUBST the talloc libs/cflags so the ./configure results are saved.

I had used pkg-config from the Makefile because I didn't want to screw
around with the non-autoconf build, but that doesn't work because the
PKG_CONFIG_PATH or TALLOC_LIBS/TALLOC_CFLAGS that people set at
configure time needs to be respected and may not be present at build
time.

Bug #29585

14 years agonvfx: fix minor memory leak
Luca Barbieri [Sun, 22 Aug 2010 22:16:23 +0000 (00:16 +0200)]
nvfx: fix minor memory leak

14 years agonvfx: support both sprite coord origins
Luca Barbieri [Sun, 22 Aug 2010 21:29:34 +0000 (23:29 +0200)]
nvfx: support both sprite coord origins

Now we lie less when claiming OpenGL 2 support.

Also, first piglit result group is now all green, except for
fdo25614-genmipmap, which seems mesa/st's fault.

14 years agonvfx: use 64-bit bitmasks for temps
Luca Barbieri [Sun, 22 Aug 2010 19:41:49 +0000 (21:41 +0200)]
nvfx: use 64-bit bitmasks for temps

14 years agor600g: fix DB decompression
Jerome Glisse [Sun, 22 Aug 2010 21:13:58 +0000 (17:13 -0400)]
r600g: fix DB decompression

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agonvfx: Include missing header in nvfx_vertprog.c.
Vinson Lee [Sun, 22 Aug 2010 19:45:04 +0000 (12:45 -0700)]
nvfx: Include missing header in nvfx_vertprog.c.

Include draw_context.h for draw_*_vertex_shader symbols.

Fixes the following GCC warning.
nvfx_vertprog.c: In function 'nvfx_vp_state_create':
nvfx_vertprog.c:1276: warning: implicit declaration of function 'draw_create_vertex_shader'
nvfx_vertprog.c:1276: warning: assignment makes pointer from integer without a cast
nvfx_vertprog.c: In function 'nvfx_vp_state_delete':
nvfx_vertprog.c:1298: warning: implicit declaration of function 'draw_delete_vertex_shader'

14 years agotranslate_sse: add R32G32B32A32_FLOAT -> X8X8X8X8_UNORM for EMIT_4UB
Jakob Bornecrantz [Sun, 22 Aug 2010 17:58:57 +0000 (19:58 +0200)]
translate_sse: add R32G32B32A32_FLOAT -> X8X8X8X8_UNORM for EMIT_4UB

Changed by me to use movd instead of movss to avoid penalties.

14 years agotranslate_sse: refactor constant management
Luca Barbieri [Sun, 22 Aug 2010 16:11:22 +0000 (17:11 +0100)]
translate_sse: refactor constant management

14 years agonvfx: refactor to support multiple fragment program versions
Luca Barbieri [Sun, 22 Aug 2010 14:15:51 +0000 (16:15 +0200)]
nvfx: refactor to support multiple fragment program versions

14 years agonvfx: move stuff around
Luca Barbieri [Sun, 22 Aug 2010 13:48:41 +0000 (15:48 +0200)]
nvfx: move stuff around

14 years agor600g: depth buffer likely needs decompression when used as texture
Jerome Glisse [Sun, 22 Aug 2010 18:22:00 +0000 (14:22 -0400)]
r600g: depth buffer likely needs decompression when used as texture

Before using depth buffer as texture, it needs to be decompressed
(tile pattern of db are different from one used for colorbuffer
like texture)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoglx/xlib: configurable strict/non-strict buffer size invalidate
Keith Whitwell [Sun, 22 Aug 2010 13:14:55 +0000 (14:14 +0100)]
glx/xlib: configurable strict/non-strict buffer size invalidate

Introduce a new configuration option XMESA_STRICT_INVALIDATE to switch
between swapbuffers-based and glViewport-based buffer invalidation.

Default strict invalidate to false, ie glViewport-based invalidation,
aka ST_MANAGER_BROKEN_INVALIDATE.

This means we will not call XGetGeometry after every swapbuffers,
which allows swapbuffers to remain asynchronous.  For apps running at
100fps with synchronous swapping, a 10% boost is typical.  For gears,
I see closer to 20% speedup.

Note that the work of copying data on swapbuffers doesn't disappear -
this change just allows the X server to execute the PutImage
asynchronously without us effectively blocked until its completion.

This applies even to llvmpipe's threaded rasterization as the
swapbuffers operation was a large part of the serial component of an
llvmpipe frame.

The downside of this is correctness - applications which don't call
glViewport on window resizes will get incorrect rendering, unless
XMESA_STRICT_INVALIDATE is set.

The ultimate solution would be to have per-frame but asynchronous
invalidation.  Xcb almost looks as if it could provide this, but the
API doesn't seem to quite be there.

14 years agollvmpipe: reduce size of fragment shader variant key
Keith Whitwell [Sun, 22 Aug 2010 11:31:18 +0000 (12:31 +0100)]
llvmpipe: reduce size of fragment shader variant key

Don't spend as much time comparing them.

14 years agollvmpipe: remove unused member from lp_fragment_shader_variant_key
Keith Whitwell [Sun, 22 Aug 2010 11:16:45 +0000 (12:16 +0100)]
llvmpipe: remove unused member from lp_fragment_shader_variant_key

14 years agollvmpipe: don't clear unused bins
Keith Whitwell [Sun, 22 Aug 2010 10:43:01 +0000 (11:43 +0100)]
llvmpipe: don't clear unused bins

If bins outside the current scene bounds are being corrupted, we'll
need to fix that separately.  Currently seems ok though.

14 years agodraw: reduce the size of the llvm variant key
Keith Whitwell [Sat, 21 Aug 2010 21:51:38 +0000 (22:51 +0100)]
draw: reduce the size of the llvm variant key

14 years agoglx/xlib: remove another XSync
Keith Whitwell [Thu, 19 Aug 2010 23:14:47 +0000 (00:14 +0100)]
glx/xlib: remove another XSync

With this change, xmesa_get_window_size still does one round trip, but
that's better than doing two.

14 years agoglx/xlib: no need to call XSync from XMesaFlush
Keith Whitwell [Thu, 19 Aug 2010 23:08:22 +0000 (00:08 +0100)]
glx/xlib: no need to call XSync from XMesaFlush

Try to eliminate some unnecessary X server round trips.

14 years agonvfx: simplify and correct fragment program update logic
Luca Barbieri [Sun, 22 Aug 2010 10:02:41 +0000 (12:02 +0200)]
nvfx: simplify and correct fragment program update logic

This version should hopefully be much clearer and thus less likely
to be subtly broken.

Also fixes point sprites on nv40 and possibly some other bugs too.

14 years agonvfx: make stipple setting independent of enable
Luca Barbieri [Sun, 22 Aug 2010 09:58:54 +0000 (11:58 +0200)]
nvfx: make stipple setting independent of enable

14 years agonvfx: fix vertex programs
Luca Barbieri [Sun, 22 Aug 2010 12:53:49 +0000 (14:53 +0200)]
nvfx: fix vertex programs

14 years agonvfx: use relocations array for vp constants
Luca Barbieri [Sat, 21 Aug 2010 22:21:55 +0000 (00:21 +0200)]
nvfx: use relocations array for vp constants

14 years agor600g: Don't blindly unmap NULL->size.
Henri Verbeet [Mon, 16 Aug 2010 20:18:37 +0000 (22:18 +0200)]
r600g: Don't blindly unmap NULL->size.

There may actually be something mapped in that range, especially for large
buffers like e.g. the GL Drawable.

14 years agosvga: Do not shortcut NULL surface relocations with SVGA3D_INVALID_ID.
José Fonseca [Sun, 15 Aug 2010 12:36:02 +0000 (13:36 +0100)]
svga: Do not shortcut NULL surface relocations with SVGA3D_INVALID_ID.

How to cope with NULL surface relocations should be entirely at winsys'
discretion.

14 years agoi965: Fix 8-wide FB writes on gen6.
Eric Anholt [Sun, 22 Aug 2010 07:47:45 +0000 (00:47 -0700)]
i965: Fix 8-wide FB writes on gen6.

My merge of Zhenyu's patch on top of my previous patches broke it by
my code expecting simd16 single write and Zhenyu's simd8 path being
disabled by mine.  Merge the two for success.

14 years agoi965: Fix brw_math1 with scalar argument in gen6 FS.
Eric Anholt [Sun, 22 Aug 2010 07:44:28 +0000 (00:44 -0700)]
i965: Fix brw_math1 with scalar argument in gen6 FS.

The docs claim two conflicting things: One, that a scalar source is
supported.  Two, source hstride must be 1 and width must be exec size.
So splat a constant argument out into a full reg to operate on, since
violating the second set of constraints is clearly failing.

The alternative here might be to do a 1-wide exec on a constant
argument for math1.  It would probably save cycles too.  But I'll
leave that for the glsl2-965 branch.

Fixes glsl-algebraic-div-one-2.shader_test.

14 years agoi965: Fix up WM push constant setup on gen6.
Eric Anholt [Sun, 22 Aug 2010 07:26:09 +0000 (00:26 -0700)]
i965: Fix up WM push constant setup on gen6.

Fixes glsl-algebraic-add-add-1.

14 years agoi965: Use intel->gen >= 6 instead of IS_GEN6.
Eric Anholt [Sun, 22 Aug 2010 06:47:06 +0000 (23:47 -0700)]
i965: Use intel->gen >= 6 instead of IS_GEN6.

14 years agolibgl-xlib: Include missing header in xlib.c.
Vinson Lee [Sun, 22 Aug 2010 07:30:47 +0000 (00:30 -0700)]
libgl-xlib: Include missing header in xlib.c.

Include st_api.h for st_api_create_OpenGL symbol.

14 years agonvfx: Silence unused variable warning.
Vinson Lee [Sun, 22 Aug 2010 07:16:54 +0000 (00:16 -0700)]
nvfx: Silence unused variable warning.

The variable is used but only in the body of an assert.

14 years agomesa: Initialize member variables in ir_to_mesa_src_reg constructor.
Vinson Lee [Sun, 22 Aug 2010 07:09:43 +0000 (00:09 -0700)]
mesa: Initialize member variables in ir_to_mesa_src_reg constructor.

The default constructor did not initialize some member variables.

14 years agomesa: Initialize variables in mesa_src_reg_from_ir_src_reg.
Vinson Lee [Sun, 22 Aug 2010 06:56:24 +0000 (23:56 -0700)]
mesa: Initialize variables in mesa_src_reg_from_ir_src_reg.

14 years agoutil: Use #ifdef instead of #if.
Vinson Lee [Sun, 22 Aug 2010 06:36:30 +0000 (23:36 -0700)]
util: Use #ifdef instead of #if.

This is a typo fix of earlier commit 0f3b3751b8643352dcc242567b3696bd1505df1d.

14 years agoutil: Define dump_cpu only for DEBUG builds.
Vinson Lee [Sun, 22 Aug 2010 06:28:52 +0000 (23:28 -0700)]
util: Define dump_cpu only for DEBUG builds.

dump_cpu is used only when DEBUG is defined.

Fixes the following GCC warning on builds without DEBUG defined.
util/u_cpu_detect.c:76: warning: 'debug_get_option_dump_cpu' defined but not used

14 years agotranslate_sse: Silence uninitialized variable warnings.
Vinson Lee [Sun, 22 Aug 2010 06:24:28 +0000 (23:24 -0700)]
translate_sse: Silence uninitialized variable warnings.

Initialize variables on error paths.

14 years agonvfx: Silence uninitialized variable warnings.
Vinson Lee [Sun, 22 Aug 2010 05:59:46 +0000 (22:59 -0700)]
nvfx: Silence uninitialized variable warnings.

Variables weren't initialized on the error paths.

14 years agoi965g: Silence printf format warnings on 64-bit builds.
Vinson Lee [Sun, 22 Aug 2010 05:45:09 +0000 (22:45 -0700)]
i965g: Silence printf format warnings on 64-bit builds.

14 years agonvfx: Silence uninitialized variable warnings.
Vinson Lee [Sun, 22 Aug 2010 05:09:47 +0000 (22:09 -0700)]
nvfx: Silence uninitialized variable warnings.

Silence the following i686-apple-darwin10-gcc-4.2.1 warnings.
nv04_2d.c: In function 'nv04_region_copy_cpu':
nv04_2d.c:560: warning: 'dswy' may be used uninitialized in this function
nv04_2d.c:559: warning: 'dswx' may be used uninitialized in this function
nv04_2d.c:562: warning: 'sswy' may be used uninitialized in this function
nv04_2d.c:561: warning: 'sswx' may be used uninitialized in this function

14 years agonv50: Silence incompatible pointer type initialization warning.
Vinson Lee [Sun, 22 Aug 2010 05:01:04 +0000 (22:01 -0700)]
nv50: Silence incompatible pointer type initialization warning.

Silence the following GCC warning.
warning: initialization from incompatible pointer type

14 years agonv50: Disable unused code.
Vinson Lee [Sun, 22 Aug 2010 04:42:17 +0000 (21:42 -0700)]
nv50: Disable unused code.

Disable release_hw and emit_mov_from_pred functions as they are
currently not being used.

14 years agoi965g: Fix printf format warning on 32-bit platforms.
Vinson Lee [Sun, 22 Aug 2010 04:27:43 +0000 (21:27 -0700)]
i965g: Fix printf format warning on 32-bit platforms.

Fixes the following GCC warning on 32-bit platforms.
warning: format '%li' expects type 'long int', but argument 4 has type 'int'