mesa.git
13 years agoglx: Drop broken drawable garbage collection
Kristian Høgsberg [Fri, 27 Aug 2010 16:40:11 +0000 (12:40 -0400)]
glx: Drop broken drawable garbage collection

Doesn't work for pixmaps, was looking up the GLX XID and was never thread
safe.  Instead, just destroy the client side structures when the
drawable is no long current for a context.

13 years agodri: Unset current context and dispatch table when unbinding
Kristian Høgsberg [Wed, 8 Sep 2010 12:52:54 +0000 (08:52 -0400)]
dri: Unset current context and dispatch table when unbinding

Otherwise, when we switch to an indirect glx context and then back, it looks
like we're still current.

https://bugs.freedesktop.org/show_bug.cgi?id=29977#c7
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
13 years agoglsl: Support GLSL ES in the standalone compile.
Chia-I Wu [Wed, 8 Sep 2010 10:52:27 +0000 (18:52 +0800)]
glsl: Support GLSL ES in the standalone compile.

GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.

13 years agoglsl: Require a context in _mesa_glsl_parse_state.
Chia-I Wu [Wed, 8 Sep 2010 10:48:12 +0000 (18:48 +0800)]
glsl: Require a context in _mesa_glsl_parse_state.

Create a dummy context in the standalone compiler and pass it to
_mesa_glsl_parse_state.

13 years agost/dri: Call dri_init_extensions only for API_OPENGL.
Chia-I Wu [Wed, 8 Sep 2010 10:20:37 +0000 (18:20 +0800)]
st/dri: Call dri_init_extensions only for API_OPENGL.

libmesagallium.a that this state tracker will be linked to expects
OpenGL's _glapi_table.  That is, it expects libGL.so instead of
libGLESv1_CM.so or libGLESv2.so.  As there is no clean way to know the
shared library the app links to, use the api as a simple check.  It
might be as well to simply remove this function call though.

13 years agost/dri: Use enum st_api_type internally.
Chia-I Wu [Wed, 8 Sep 2010 09:41:43 +0000 (17:41 +0800)]
st/dri: Use enum st_api_type internally.

13 years agost/dri: Add multi-api support
nobled [Mon, 30 Aug 2010 20:23:54 +0000 (20:23 +0000)]
st/dri: Add multi-api support

Make st/dri screens capable of creating OpenGL ES and
OpenGL ES2 contexts.

TODO: Figure out the "get_current" problem with multiple
st_api's for real.

(s/API_OPENGLES1/API_OPENGLES/ by Chia-I Wu)

13 years agost/dri: Make clear which API's are supported
nobled [Tue, 7 Sep 2010 16:10:45 +0000 (12:10 -0400)]
st/dri: Make clear which API's are supported

If the caller requests a GLES context, don't silently create
a desktop GL context in its place.

13 years agor600g: add initial bank swizzle support.
Dave Airlie [Wed, 8 Sep 2010 04:09:40 +0000 (14:09 +1000)]
r600g: add initial bank swizzle support.

this is ported from r600c mostly, bank swizzling is real messy and I don't think
I got enough sleep last night to fully understand it.

13 years agoglcpp: Fix build on non-GCC compilers.
Kenneth Graunke [Wed, 8 Sep 2010 01:01:33 +0000 (18:01 -0700)]
glcpp: Fix build on non-GCC compilers.

13 years agoast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.
Kenneth Graunke [Tue, 7 Sep 2010 09:59:38 +0000 (02:59 -0700)]
ast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.

This allows them to be passed as out/inout parameters, but still
prevents them from being used as the target of an assignment.  This is
per section 5.8 of the GLSL ES 1.00 specification.

13 years agoglsl: Allow overloading of built-ins without hiding in GLSL ES.
Kenneth Graunke [Sun, 5 Sep 2010 08:51:28 +0000 (01:51 -0700)]
glsl: Allow overloading of built-ins without hiding in GLSL ES.

The rules are explicitly different from desktop GLSL.

13 years agoglsl: Move is_builtin flag back to ir_function_signature.
Kenneth Graunke [Sun, 5 Sep 2010 08:48:11 +0000 (01:48 -0700)]
glsl: Move is_builtin flag back to ir_function_signature.

This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c.

In desktop GLSL, defining a function with the same name as a built-in
hides that built-in function completely, so there would never be
built-in and user function signatures in the same ir_function.

However, in GLSL ES, overloading built-ins is allowed, and does not
hide the built-in signatures - so we're back to needing this.

13 years agoast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.
Kenneth Graunke [Mon, 16 Aug 2010 21:02:25 +0000 (14:02 -0700)]
ast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.

13 years agoast_to_hir: Reject unsized array declarations in GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:56:01 +0000 (02:56 -0700)]
ast_to_hir: Reject unsized array declarations in GLSL ES 1.00.

13 years agoast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.
Kenneth Graunke [Wed, 1 Sep 2010 20:12:10 +0000 (13:12 -0700)]
ast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.

Everything but 1.10 supports this, so just change the check to ==.

13 years agoi965: Enable EXT_framebuffer_blit internally.
Kenneth Graunke [Mon, 30 Aug 2010 19:05:05 +0000 (12:05 -0700)]
i965: Enable EXT_framebuffer_blit internally.

Otherwise, ES2's BindFramebuffer entrypoint hits this assertion:
main/fbobject.c:1323: _mesa_BindFramebufferEXT: Assertion
`ctx->Extensions.EXT_framebuffer_blit' failed.

13 years agomesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.
Kenneth Graunke [Mon, 30 Aug 2010 19:27:07 +0000 (12:27 -0700)]
mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agolinker: Fix assertion and cross-version checks for version 100.
Kenneth Graunke [Tue, 31 Aug 2010 16:33:58 +0000 (09:33 -0700)]
linker: Fix assertion and cross-version checks for version 100.

Fixes an assert (min_version >= 110) which was no longer correct, and
also prohibits linking ES2 shaders with non-ES2 shaders.  I'm not
positive this is correct, but the specification doesn't seem to say.

13 years agoglsl: Add built-in function profiles for GLSL ES 1.00.
Kenneth Graunke [Mon, 16 Aug 2010 20:04:09 +0000 (13:04 -0700)]
glsl: Add built-in function profiles for GLSL ES 1.00.

13 years agoglsl: Add built-in variables for GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:45:33 +0000 (02:45 -0700)]
glsl: Add built-in variables for GLSL ES 1.00.

13 years agoglsl: Split out types that are in 1.10 but not GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:03:00 +0000 (02:03 -0700)]
glsl: Split out types that are in 1.10 but not GLSL ES 1.00.

13 years agoglsl: Recognize GLSL ES 1.00 keywords.
Kenneth Graunke [Sun, 5 Sep 2010 08:32:32 +0000 (01:32 -0700)]
glsl: Recognize GLSL ES 1.00 keywords.

13 years agoglsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.
Kenneth Graunke [Sun, 5 Sep 2010 08:27:02 +0000 (01:27 -0700)]
glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.

Also define it if #version 100 is encountered.

13 years agoglsl: Accept language version 100 and make it the default on ES2.
Kenneth Graunke [Mon, 16 Aug 2010 19:34:53 +0000 (12:34 -0700)]
glsl: Accept language version 100 and make it the default on ES2.

13 years agoglsl: Set default language version in mesa_glsl_parse_state constructor.
Kenneth Graunke [Sun, 5 Sep 2010 07:31:28 +0000 (00:31 -0700)]
glsl: Set default language version in mesa_glsl_parse_state constructor.

This should make it easier to change the default version based on the
API (say, version 1.00 for OpenGL ES).

Also, synchronize the symbol table's version with the parse state's
version just before doing AST-to-HIR.  This way, it will be set when
it matters, but the main initialization code doesn't have to care about
the symbol table.

13 years agoir_to_mesa: Add support for gl_NormalScale.
Eric Anholt [Tue, 7 Sep 2010 23:25:22 +0000 (16:25 -0700)]
ir_to_mesa: Add support for gl_NormalScale.

Bug #30040.

13 years agoglsl: Make sure shader source isn't NULL.
Kenneth Graunke [Tue, 7 Sep 2010 23:25:53 +0000 (16:25 -0700)]
glsl: Make sure shader source isn't NULL.

This should only occur if glCompileShader is called without a prior call
to glShaderSource.  An empty source program should be the empty string.

13 years agor600g: Added missing r600_bc_add_literal() calls to XPD implementation.
Tilman Sauerbeck [Tue, 7 Sep 2010 09:38:18 +0000 (11:38 +0200)]
r600g: Added missing r600_bc_add_literal() calls to XPD implementation.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: Added preliminary support for the LOG opcode.
Tilman Sauerbeck [Tue, 7 Sep 2010 09:37:56 +0000 (11:37 +0200)]
r600g: Added preliminary support for the LOG opcode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: Added missing abs-ification to RSQ.
Tilman Sauerbeck [Tue, 7 Sep 2010 19:29:43 +0000 (21:29 +0200)]
r600g: Added missing abs-ification to RSQ.

This makes the 'fp1-RSQ test 2' piglit test work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: split opcodes out and add wrapper around usage.
Dave Airlie [Tue, 7 Sep 2010 22:49:00 +0000 (08:49 +1000)]
r600g: split opcodes out and add wrapper around usage.

This splits the r600 opcodes out of the sq file and adds a wrapper
so we can convert to evergreen opcodes later without touching these functions
too much.

13 years agor600g: add support for constants in memory buffers.
Dave Airlie [Tue, 7 Sep 2010 22:41:57 +0000 (08:41 +1000)]
r600g: add support for constants in memory buffers.

DX9 constants were in the constant file, and evergreen no longer support
cfile. r600/700 can also use constants in memory buffers, so add the code
(disabled for now) to enable that as precursor for evergreen.

13 years agor600g: abstract the hw states out behind a vtbl.
Dave Airlie [Tue, 7 Sep 2010 22:30:59 +0000 (08:30 +1000)]
r600g: abstract the hw states out behind a vtbl.

this is step one towards evergreen support, it lets us plug in whole
new hw level states.

13 years agoglsl2: Forbid array-types in ?: operator in GLSL 1.10
Ian Romanick [Tue, 7 Sep 2010 21:30:06 +0000 (14:30 -0700)]
glsl2: Forbid array-types in ?: operator in GLSL 1.10

Fixes bugzilla #30039.

13 years agomesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.
Eric Anholt [Tue, 7 Sep 2010 21:31:22 +0000 (14:31 -0700)]
mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.

Fixes assertion failures in fbo-alpha with a debug build of Mesa.
Bug #29781.

13 years agoir_to_mesa: Fix warning in last commit.
Eric Anholt [Tue, 7 Sep 2010 21:02:39 +0000 (14:02 -0700)]
ir_to_mesa: Fix warning in last commit.

I swear there was some git option for "don't push things when you've
got uncommitted changes", but I can't find it now.

13 years agoir_to_mesa: Move the STATE_VAR elements of a builtin uniform to a temp (v2).
Eric Anholt [Wed, 1 Sep 2010 23:06:32 +0000 (16:06 -0700)]
ir_to_mesa: Move the STATE_VAR elements of a builtin uniform to a temp (v2).

Like the constant handling and the handling of other uniforms, we add
the whole thing to the Parameters, avoiding messy, incomplete logic
for adding just the elements of a builting uniform that get used.
This means that a driver that relies only on ParameterValues[] for its
parameters will have an increased parameter load, but drivers
generally don't do that (since they have other params they need to
handle, too).

Fixes glsl-fs-statevar-call (testcase for Ember).  Bug #29687.

v2: Continue referencing the STATE_VAR[] file directly when the
uniform will land in STATE_VAR[] formatted exactly as we'd put into a
temporary.  When there's array dereferencing, we don't copy-propagate
in Mesa IR (not knowing where the array is in register space), so
smarts here are required or we'll massively increase the temp count.

13 years agoglsl2: Early return with visit_continue in loop_analysis::visit(ir_dereference_variab...
Ian Romanick [Tue, 7 Sep 2010 20:33:48 +0000 (13:33 -0700)]
glsl2: Early return with visit_continue in loop_analysis::visit(ir_dereference_variable *)

Returning early with visit_continue_with_parent prevented the
then-statements and else-statements of if-statements such as the
following from being processed:

  if (some_var) { ... } else { ... }

Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.

13 years agoglsl: Change grammar rules for selection statements to match the spec.
Kenneth Graunke [Tue, 7 Sep 2010 19:56:18 +0000 (12:56 -0700)]
glsl: Change grammar rules for selection statements to match the spec.

Fixes piglit test case loop-06.vert.

Unfortunately, causes 1 shift/reduce conflict.

13 years agoi965: Store the byte address in the VS constant buffer as an integer.
Eric Anholt [Tue, 7 Sep 2010 19:53:19 +0000 (12:53 -0700)]
i965: Store the byte address in the VS constant buffer as an integer.

We carefully multiplied our two ints (since we want to be precise
after all) then stored them in a float, which is not specced to really
work, in addition to wasting precision.  Fixes
vp-arl-constant-array-huge-* things since the assertions were added.

13 years agoi965: Make pixel_xy results UW.
Eric Anholt [Sun, 5 Sep 2010 03:54:52 +0000 (20:54 -0700)]
i965: Make pixel_xy results UW.

There is a restriction on the destination of an operation involving a
vector immediate being 128-bit aligned and the destination horizontal
stride being equivalent to 2 bytes.  Fixes bad pixel_x results from
gl_FragCoord, where each pair had the same value.

13 years agoglsl2: check for _NumLinkedShaders being 0
Török Edvin [Sat, 4 Sep 2010 10:48:24 +0000 (13:48 +0300)]
glsl2: check for _NumLinkedShaders being 0

Otherwise spring 0.82+.4.0 crashes when starting a game
because prog->_LinkedShaders[0] is NULL.

This also fixes piglit test cases glsl-link-empty-prog-0[12].

13 years agoglx: Set an all NULL vtable for dummyContext
Kristian Høgsberg [Tue, 7 Sep 2010 18:32:28 +0000 (14:32 -0400)]
glx: Set an all NULL vtable for dummyContext

This reverts 6a6e6d7b0a84e20f9754af02a575ae34081d310c and initializes
dummyContext with an all NULL vtable.  The context vtable pointer is
supposed to always be non-NULL, but the vtable entries can be NULL.

13 years agoglx: Fix compilation with out xf86vidmode
Kristian Høgsberg [Tue, 7 Sep 2010 18:23:00 +0000 (14:23 -0400)]
glx: Fix compilation with out xf86vidmode

13 years agoglx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11
Kristian Høgsberg [Tue, 7 Sep 2010 18:18:01 +0000 (14:18 -0400)]
glx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11

13 years agoFix crashes when some GLX API entrypoints are called with no current context.
Michel Dänzer [Tue, 7 Sep 2010 17:49:06 +0000 (19:49 +0200)]
Fix crashes when some GLX API entrypoints are called with no current context.

I was hitting this with gliv.

The GLX spec explicitly mentions that glXWaitX, glXWaitGL and glXUseXFont calls
are ignored when there's no current context. Not sure what if anything the
GLX_EXT_texture_from_pixmap spec says about this, but I think ignoring the
calls makes more sense than crashing there as well. :)

13 years agoi965: Don't bother with RNDZ for f2i.
Eric Anholt [Mon, 6 Sep 2010 03:55:39 +0000 (20:55 -0700)]
i965: Don't bother with RNDZ for f2i.

The default type conversion for MOV should be fine, and RNDZ actually
requires two instructions.

13 years agoi965: Add some validation on BRW_OPCODE_MUL and ADD's arguments.
Eric Anholt [Sun, 5 Sep 2010 04:28:04 +0000 (21:28 -0700)]
i965: Add some validation on BRW_OPCODE_MUL and ADD's arguments.

Now that we're playing with other types in brw_fs.cpp, it's easy to
trip over issues like these.

13 years agoi965: Add assertion for another requirement about types.
Eric Anholt [Sun, 5 Sep 2010 04:04:58 +0000 (21:04 -0700)]
i965: Add assertion for another requirement about types.

This catches a failure in the FS backend.

13 years agoi965: Align the start of attribute interp coefficients in FS to use PLN.
Eric Anholt [Sat, 4 Sep 2010 00:21:49 +0000 (17:21 -0700)]
i965: Align the start of attribute interp coefficients in FS to use PLN.

13 years agoi965: Just assert when we flagged a compile error in the FS for now.
Eric Anholt [Fri, 3 Sep 2010 21:29:57 +0000 (14:29 -0700)]
i965: Just assert when we flagged a compile error in the FS for now.

Dumping back to potentially 16-wide dispatch doesn't really work out
at the moment, and hopefully I'll just be able to resolve all the
failures so we never have to do this at all.

13 years agoi965: Clean up fs_reg setup by using a helper for constructors.
Eric Anholt [Fri, 3 Sep 2010 20:21:51 +0000 (13:21 -0700)]
i965: Clean up fs_reg setup by using a helper for constructors.

13 years agoi965: When using the new FS backend, don't validate the Mesa IR version.
Eric Anholt [Thu, 2 Sep 2010 16:37:17 +0000 (09:37 -0700)]
i965: When using the new FS backend, don't validate the Mesa IR version.

13 years agoi965: Add a bit of validation for some ISA restrictions in the docs.
Eric Anholt [Sat, 4 Sep 2010 04:37:00 +0000 (21:37 -0700)]
i965: Add a bit of validation for some ISA restrictions in the docs.

13 years agoi965: set the source width/stride when handling reladdr dests in the VS.
Eric Anholt [Sat, 4 Sep 2010 04:56:53 +0000 (21:56 -0700)]
i965: set the source width/stride when handling reladdr dests in the VS.

This is a requirement specified in the docs.  No behavior change in
glsl-vs-varying-array.shader_test that violated these requirements.

13 years agoMake XF86VIDMODE extension optional
Jon TURNEY [Wed, 21 Apr 2010 11:58:54 +0000 (12:58 +0100)]
Make XF86VIDMODE extension optional

Code in glx/glxcmds.c which uses the XF86VIDMODE extension is already guarded.  Also use
that guard to control inclusion of the xf86vmode.h header, and only enable that guard if the
XF86VIDMODE extension is found by pkgconfig.

This changes the behaviour on platforms which XF86VIDMODE exists, in that XF86VIDMODE used to
be mandatory, but is now optional.

Presumably other build systems are already arranging for -DXF86VIDMODE to be supplied to the
complier when glxcmds.c is compiled, so are not affected by this change

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agoglx: Drop unused dri2proto.h include
Kristian Høgsberg [Tue, 7 Sep 2010 16:54:02 +0000 (12:54 -0400)]
glx: Drop unused dri2proto.h include

13 years agoglx: Move dpy and scr fields out of direct rendering conditional
Kristian Høgsberg [Tue, 7 Sep 2010 16:40:37 +0000 (12:40 -0400)]
glx: Move dpy and scr fields out of direct rendering conditional

Nothing direct rendering specific about these fields.  Moving them out
makes no-direct-rendering compilation work again.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
13 years agoSome fixes for GLX_INDIRECT_RENDERING only build
Jon TURNEY [Mon, 9 Aug 2010 13:47:26 +0000 (14:47 +0100)]
Some fixes for GLX_INDIRECT_RENDERING only build

This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
13 years agodri: Make it a little clearer that we're not dereferencing a NULL pointer
nobled [Tue, 7 Sep 2010 16:26:07 +0000 (12:26 -0400)]
dri: Make it a little clearer that we're not dereferencing a NULL pointer

13 years agodri: Use the right type for the API token
nobled [Tue, 7 Sep 2010 16:20:15 +0000 (12:20 -0400)]
dri: Use the right type for the API token

Pass mesa_api to CreateContext, and abort early
if the requested API isn't recognized.

13 years agolibgl-xlib: Fix --enable-gallium-llvm build.
Chia-I Wu [Tue, 7 Sep 2010 15:45:43 +0000 (23:45 +0800)]
libgl-xlib: Fix --enable-gallium-llvm build.

Check MESA_LLVM and link to LLVM as other targets do.

13 years agollvmpipe: Add lp_rast_debug.c to Makefile.
Chia-I Wu [Tue, 7 Sep 2010 15:04:43 +0000 (23:04 +0800)]
llvmpipe: Add lp_rast_debug.c to Makefile.

13 years agoglx: Only clear the stored context tag when the context has been unbound
Jon TURNEY [Tue, 7 Sep 2010 10:36:07 +0000 (11:36 +0100)]
glx: Only clear the stored context tag when the context has been unbound

The calling order of ->bind and ->unbind changed and then ->unbind would
clear the currentContextTag of the old context before ->bind could reuse
it in the make current request, in the indirect case.

Instead, clear the old currentContextTag if and only if we send a request
to the server to actually unbind it or reassign it to another context.

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

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
13 years agollvmpipe: Refactor lp_scene_add_resource_reference
José Fonseca [Thu, 26 Aug 2010 11:09:53 +0000 (12:09 +0100)]
llvmpipe: Refactor lp_scene_add_resource_reference

Less goto spaghetti.

13 years agollvmpipe: Fix negated logic in lp_scene_add_resource_reference().
José Fonseca [Thu, 26 Aug 2010 11:08:56 +0000 (12:08 +0100)]
llvmpipe: Fix negated logic in lp_scene_add_resource_reference().

Fixes performance regression.

13 years agollvmpipe: move more coef setup into lp_setup_coef.c
Keith Whitwell [Wed, 1 Sep 2010 17:43:46 +0000 (18:43 +0100)]
llvmpipe: move more coef setup into lp_setup_coef.c

13 years agollvmpipe: declare fence handle struct
Keith Whitwell [Tue, 7 Sep 2010 12:10:15 +0000 (13:10 +0100)]
llvmpipe: declare fence handle struct

13 years agollvmpipe: rasterization debugging helpers
Keith Whitwell [Fri, 27 Aug 2010 18:24:51 +0000 (19:24 +0100)]
llvmpipe: rasterization debugging helpers

13 years agollvmpipe: use opcodes instead of function pointers in bins
Keith Whitwell [Tue, 7 Sep 2010 13:02:15 +0000 (14:02 +0100)]
llvmpipe: use opcodes instead of function pointers in bins

Also, move some state from rasterizer struct to the scene.

13 years agollvmpipe: rearrange queries
Keith Whitwell [Tue, 7 Sep 2010 11:45:23 +0000 (12:45 +0100)]
llvmpipe: rearrange queries

13 years agollvmpipe: enforce fixed memory limit on scenes
Keith Whitwell [Fri, 27 Aug 2010 16:49:40 +0000 (17:49 +0100)]
llvmpipe: enforce fixed memory limit on scenes

13 years agollvmpipe: clean up deferred zstencil clears
Keith Whitwell [Fri, 27 Aug 2010 16:30:07 +0000 (17:30 +0100)]
llvmpipe: clean up deferred zstencil clears

13 years agollvmpipe: rework fences and queries
Keith Whitwell [Fri, 27 Aug 2010 16:14:49 +0000 (17:14 +0100)]
llvmpipe: rework fences and queries

13 years agollvmpipe: move whole-tile emit into a function
Keith Whitwell [Fri, 27 Aug 2010 16:51:21 +0000 (17:51 +0100)]
llvmpipe: move whole-tile emit into a function

13 years agollvmpipe: put fs variant dumping in a function
Keith Whitwell [Tue, 24 Aug 2010 19:08:13 +0000 (20:08 +0100)]
llvmpipe: put fs variant dumping in a function

13 years agoReplace reference to tgsi-instruction-set.txt.
Tilman Sauerbeck [Tue, 7 Sep 2010 08:29:22 +0000 (01:29 -0700)]
Replace reference to tgsi-instruction-set.txt.

That file has been replaced by tgsi.rst.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
13 years agonouveau: restore nouveau_class.h for nv04-nv20
Luca Barbieri [Tue, 7 Sep 2010 06:19:58 +0000 (08:19 +0200)]
nouveau: restore nouveau_class.h for nv04-nv20

Sorry, I deleted the Gallium copy without realizing that the DRI
one was just a symlink to it.

13 years agonvfx: fix return in vp main
Luca Barbieri [Mon, 6 Sep 2010 03:13:55 +0000 (05:13 +0200)]
nvfx: fix return in vp main

13 years agomesa: Define C99's __func__ macro on MSVC.
José Fonseca [Mon, 6 Sep 2010 12:56:07 +0000 (13:56 +0100)]
mesa: Define C99's __func__ macro on MSVC.

13 years agor600g: add error print for no literals for r700s as well
Dave Airlie [Mon, 6 Sep 2010 00:38:29 +0000 (10:38 +1000)]
r600g: add error print for no literals for r700s as well

13 years agor600g: fixup r700 assembler for clamp/relative addressing
Dave Airlie [Mon, 6 Sep 2010 00:35:51 +0000 (10:35 +1000)]
r600g: fixup r700 assembler for clamp/relative addressing

13 years agor600g: add script to generate header file with offsets into state objects.
Dave Airlie [Mon, 6 Sep 2010 00:27:55 +0000 (10:27 +1000)]
r600g: add script to generate header file with offsets into state objects.

This was inherently fragile as any changes to r600_states.h would also
need manual updating of all of the bits in radeon.h. Just add a simple
python script to do the conversion, its not hooked up to make at all.

This also will make adding evergreen a bit easier.

13 years agor600g: fix up surface references
Dave Airlie [Sun, 5 Sep 2010 23:14:08 +0000 (09:14 +1000)]
r600g: fix up surface references

We end up referencing the new surf and derefing the old surface which
is a copy of the pointer to the new surf. So just bump the ref count directly.

13 years agor600g: search for sampler views in context on removal.
Dave Airlie [Sun, 5 Sep 2010 23:13:50 +0000 (09:13 +1000)]
r600g: search for sampler views in context on removal.

Need to remove from context as well.

13 years agor600g: add missing printf operand
Dave Airlie [Sun, 5 Sep 2010 23:13:12 +0000 (09:13 +1000)]
r600g: add missing printf operand

13 years agonvfx: support nv30 simulation on nv40
Luca Barbieri [Sun, 5 Sep 2010 20:00:26 +0000 (22:00 +0200)]
nvfx: support nv30 simulation on nv40

13 years agoradeon: Add radeon_buffer_objects.c.
Henri Verbeet [Sun, 5 Sep 2010 20:42:12 +0000 (22:42 +0200)]
radeon: Add radeon_buffer_objects.c.

13 years agor200: Add radeon_buffer_objects.c.
Henri Verbeet [Sun, 5 Sep 2010 19:54:32 +0000 (21:54 +0200)]
r200: Add radeon_buffer_objects.c.

13 years agoradeon: Make do_blit_readpixels() into a PBO work.
Henri Verbeet [Sat, 4 Sep 2010 16:03:17 +0000 (18:03 +0200)]
radeon: Make do_blit_readpixels() into a PBO work.

13 years agomesa: don't smash the stack in _mesa_find_used_registers
Luca Barbieri [Sun, 5 Sep 2010 15:57:12 +0000 (17:57 +0200)]
mesa: don't smash the stack in _mesa_find_used_registers

At some point this actually triggered, not sure if it still does.

Give a meaningful assert and refuse to smash the stack anyway.

13 years agomesa: don't expose unsupported GL_ARB_geometry_shader4 for now
Luca Barbieri [Tue, 24 Aug 2010 19:05:51 +0000 (21:05 +0200)]
mesa: don't expose unsupported GL_ARB_geometry_shader4 for now

The new GLSL compiler doesn't support it.

Advertising it prevents Unigine Heaven from working, since it attempts to
use it.

13 years agonouveau: delete nouveau_class.h, move nv50 regs to nv50_reg.h
Luca Barbieri [Sun, 5 Sep 2010 08:34:55 +0000 (10:34 +0200)]
nouveau: delete nouveau_class.h, move nv50 regs to nv50_reg.h

nv50 should switch to rules-ng-ng too at some point.

The classic Mesa Nouveau driver also includes a copy of nouveau_class.h,
and should convert to rules-ng-ng too and remove it.

13 years agonvfx: move nv04_2d to rules-ng-ng
Luca Barbieri [Sun, 5 Sep 2010 08:45:55 +0000 (10:45 +0200)]
nvfx: move nv04_2d to rules-ng-ng

13 years agonvfx: switch to rules-ng-ng register headers
Luca Barbieri [Sun, 5 Sep 2010 08:10:09 +0000 (10:10 +0200)]
nvfx: switch to rules-ng-ng register headers

This is the new register generation toolkit in use by nouveau.

As far as I know, this is the best register description toolkit in
existence, and you should use it too for your hardware :)

Thanks to Marcin Kościelnicki for inventing it and performing
invaluable reverse engineering work of nVidia chips.

13 years agonvfx: remove remaining BEGIN_RING/eng3d uses
Luca Barbieri [Sun, 5 Sep 2010 07:17:32 +0000 (09:17 +0200)]
nvfx: remove remaining BEGIN_RING/eng3d uses

13 years agonvfx: pause occlusion queries during blitter usage
Luca Barbieri [Sun, 5 Sep 2010 06:27:12 +0000 (08:27 +0200)]
nvfx: pause occlusion queries during blitter usage

Thanks for Dave Airlie and Jerome Glisse for their code which made
me realize I need this too.

13 years agonvfx: properly return fogcoord.w == 1
Luca Barbieri [Sun, 5 Sep 2010 04:42:04 +0000 (06:42 +0200)]
nvfx: properly return fogcoord.w == 1

Hardware sets it to 0, so we add an ADD to put an 1 there if the
application really wants the alpha channel.

13 years agonvfx: support saturate in vp
Luca Barbieri [Sun, 5 Sep 2010 03:53:55 +0000 (05:53 +0200)]
nvfx: support saturate in vp

Completely untested, since Mesa apparently never uses this currently.

In particular, it might not work with scalar slot op.