Commit Graph

41209 Commits

Author SHA1 Message Date
Ian Romanick cb2b547a47 linker: Allow built-in arrays to have different sizes between shader stages
Fixes pitlit test glsl-link-varying-TexCoord (bugzilla #31650).
2010-12-13 15:16:39 -08:00
Eric Anholt 036c817f77 i965: Fix gl_FragCoord.z setup on gen6.
Fixes glsl-bug-22603.
2010-12-13 14:02:34 -08:00
Eric Anholt 5fbd8da8df i956: Fix the old FP path fragment position setup on gen6.
Fixes fp-arb-fragment-coord-conventions-none
2010-12-13 14:02:34 -08:00
Eric Anholt 7cec7bf56c i965: Fix ARL to work on gen6.
RNDD isn't one of the instructions that can do conversion from
execution type to destination type.

Fixes glsl-vs-arrays-3.
2010-12-13 14:02:34 -08:00
Eric Anholt df9f891544 intel: Include stdbool so we can stop using GLboolean when we want to.
This requires shuffling the driconf XML macros around, since they use
true and false tokens expecting them to not get expanded to anything.
2010-12-13 14:02:34 -08:00
Brian Paul b363dd43d6 gallivm: store callbacks in a linked list rather than fixed size array
Should fix http://bugs.freedesktop.org/show_bug.cgi?id=32308
2010-12-13 11:47:28 -07:00
Brian Paul 6577f753b2 tnl: a better way to initialize the gl_program_machine memory
This improves commit ef3f7e61b3

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2010-12-13 08:11:58 -07:00
Alex Deucher 4523285e51 r600g: fix rendering with a vertex attrib having a zero stride
The hardware supports zero stride just fine.  This is a port
of 2af8a19831 from r300g.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-12-12 23:35:37 -05:00
Dave Airlie d19b5cbd31 r300g: fixup rs690 tiling stride alignment calculations.
The RS690 memory controller prefers things to be on a different
boundary than the discrete GPUs, we had an attempt to fix this,
but it still failed, this consolidates the stride calculation
into one place and removes the really special case check.

This fixes gnome-shell and 16 piglit tests on my rs690 system.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-13 11:29:21 +10:00
Chia-I Wu d6b1478ff0 egl: Do not unload drivers.
When the driver is the last reference to libEGL.so, unloading it will
cause libEGL.so to be unmapped and give problems.  Disable the unloading
for now.  Still have to figure out the right timing to unload drivers.
2010-12-12 18:31:48 +08:00
Chia-I Wu 1c01bedb02 mapi: Fix a warning in !THREADS build.
It should be u_thread_self, not _glthread_GetID.
2010-12-12 17:59:47 +08:00
Vinson Lee bf8242684a mesa: Clean up header file inclusion in nvfragparse.h. 2010-12-11 14:37:18 -08:00
Vinson Lee 7d8c067460 mesa: Clean up header file inclusion in ir_to_mesa.h. 2010-12-11 13:30:13 -08:00
Marek Olšák 2af8a19831 r300g: fix rendering with a vertex attrib having a zero stride
The hardware apparently does support a zero stride, so let's use it.

This fixes missing objects in ETQW, but might also fix a ton of other
similar-looking bugs.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
2010-12-11 14:49:28 +01:00
Marek Olšák c398f1544e tgsi: fix rbug compile error
../mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h:139:
error: dereferencing pointer ‘tokens.25’ does break strict-aliasing rules

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-12-11 13:37:57 +01:00
Marek Olšák d0990db6bd r300/compiler: fix swizzle lowering with a presubtract source operand
If a source operand has a non-native swizzle (e.g. the KIL instruction
cannot have a swizzle other than .xyzw), the lowering pass uses one or more
MOV instructions to move the operand to an intermediate temporary with
native swizzles.

This commit fixes that the presubtract information was lost during
the lowering.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
2010-12-11 13:37:57 +01:00
Marek Olšák 9e1fbd3d6e r300/compiler: fix LIT in VS
This fixes broken rendering of trees in ETQW. The trees still disappear
for an unknown reason when they are close.

Broken since:
2ff9d4474b
r300/compiler: make lowering passes possibly use up to two less temps

NOTE: This is a candidate for the 7.10 branch.
2010-12-11 07:32:24 +01:00
Ian Romanick d7f27e2e76 glsl: Inherrit type of declared variable from initializer after processing assignment
do_assignment may apply implicit conversions to coerce the base type
of initializer to the base type of the variable being declared.  Fixes
piglit test glsl-implicit-conversion-02 (bugzilla #32287).  This
probably also fixes bugzilla #32273.

NOTE: This is a candidate for the 7.9 branch and the 7.10 branch.
2010-12-10 17:52:35 -08:00
Ian Romanick ec53010c4d glsl: Minor clean-up in validate_assignment
This code has been changed around a lot, and there were some temporary
variables left around from previous versions.
2010-12-10 17:52:35 -08:00
Eric Anholt 783e7caadf i965: Put common info on converting MESA_FORMAT to BRW_FORMAT in a table.
There are exceptions to the table for depth texturing or rendering to
not-quite-supported formats thanks to the non-orthogonal component
selection for surface formats, but it's still a lot simpler.
2010-12-10 16:17:01 -08:00
Eric Anholt be72efb4f2 intel: Just use ChooseTextureFormat for renderbuffer format choice.
One less place to forget to put your new MESA_FORMAT support in.
2010-12-10 16:16:13 -08:00
Eric Anholt e339b669a1 intel: Add a couple of helper functions to reduce rb code duplication. 2010-12-10 15:37:16 -08:00
Eric Anholt 28bab24e16 intel: Add spans code for the ARB_texture_rg support.
This starts spantmp2.h down the path of using MESA_FORMAT_* for
specifying the format instead of the crazy GL format/type combo.
2010-12-10 15:37:10 -08:00
Eric Anholt a7e2d64971 mesa: Don't assertion fail for _mesa_get_format_name(MESA_FORMAT_NONE) 2010-12-10 15:29:52 -08:00
Vinson Lee ef3f7e61b3 tnl: Initialize gl_program_machine memory in run_vp.
Fixes piglit valgrind glsl-array-bounds-04 failure (FDO bug 29946).

NOTE:
This is a candidate for the 7.10 branch.
This is a candidate for the 7.9 branch.
2010-12-10 14:24:05 -08:00
Mathias Fröhlich b3d2ec9942 vbo: Avoid the copy to current in dlists if not required.
The current state is allowed to be undefined past DrawElements et al.
Consequently omit that copying at least in the display list code.
This pays us some percents performance.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-10 10:17:48 -07:00
Brian Paul 2a4df8933e mesa/meta: fix broken assertion, rename stack depth var
assert(current_save_state < MAX_META_OPS_DEPTH) did not compile.

Rename current_save_state to SaveStackDepth to be more consistent with
the style of the other fields.
2010-12-10 10:02:37 -07:00
Jerome Glisse b22c8e8bbc r600g: fix bo size when creating bo from handle
Spoted by Alex Diomin

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-10 11:17:27 -05:00
Vinson Lee d5810efca6 mesa: Clean up header file inclusion in arbprogparse.h. 2010-12-09 23:52:28 -08:00
Xiang, Haihao e47eacdc53 i965: support for two-sided lighting on Sandybridge
VS places color attributes together so that SF unit can fetch the right
attribute according to object orientation. This fixes light issue in
mesa demo geartrain, projtex.
2010-12-10 13:25:22 +08:00
Xiang, Haihao d1196bbc19 meta: allow nested meta operations
_mesa_meta_CopyPixels results in nested meta operations on Sandybridge.
Previoulsy the second meta operation overrides all states saved by the
first meta function.
2010-12-10 13:25:17 +08:00
Eric Anholt 3a3b1bd722 i965: Add support for gen6 reladdr VS constant loading. 2010-12-09 20:25:34 -08:00
Eric Anholt 15566183a6 i965: Add support for gen6 constant-index constant loading. 2010-12-09 20:25:34 -08:00
Chia-I Wu 83bdd402aa targets/egl: Improve st_GL.so loading.
When the application is not linked to any libGL*.so, loading st_GL.so
would give

  /usr/local/lib/egl/st_GL.so: undefined symbol: _glapi_tls_Context

In that case, load libGL.so and try again.  This works because
util_dl_open loads with RTLD_GLOBAL.

Fix "clear" OpenGL ES 1.1 demo.
2010-12-10 11:01:05 +08:00
Chia-I Wu 6efd963a23 target/egl: Fix misleading debug message.
When the name of the module is NULL, the process itself is dlopen()ed.
Do not print

  libEGL debug: searching for st module (null)
2010-12-10 11:00:31 +08:00
Brian Paul becc4bb90c draw/llvm: don't flush in vs_llvm_delete()
Fixes piglit glx-shader-sharing crash.

When shaders are shared by multiple contexts, the shader's draw context
pointer may point to a previously destroyed context.  Dereferencing the
context pointer will lead to a crash.

In this case, simply removing the flushing code avoids the crash (the
exec and sse shader paths don't flush here either).

There's a deeper issue here, however, that needs examination.  Shaders
should not keep pointers to contexts since contexts might get destroyed
at any time.

NOTE: This is a candidate for the 7.10 branch (after this has been
tested for a while).
2010-12-09 18:41:22 -07:00
Brian Paul 70ca064454 draw/llvm: remove redundant comment 2010-12-09 18:40:48 -07:00
Brian Paul bd995cf6c0 draw/llvm: remove extraneous conditional 2010-12-09 18:40:48 -07:00
Luca Barbieri 0e50c21e24 glsl: Unroll loops with conditional breaks anywhere (not just the end)
Currently we only unroll loops with conditional breaks at the end, which is
the form that lower_jumps generates.

However, if breaks are not lowered, they tend to appear at the beginning, so
add support for a conditional break anywhere.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-12-09 16:42:05 -08:00
Kenneth Graunke 13c45c590b glsl: Consider the "else" branch when looking for loop breaks.
Found this bug by code inspection.  Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch.  However, the code actually looked at the
last instruction in the "then" branch twice.
2010-12-09 16:42:05 -08:00
Kenneth Graunke 528fa8ce32 glsl: Clean up code by adding a new is_break() function. 2010-12-09 16:42:05 -08:00
Eric Anholt b13a2e640f glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.
If you used a constant array index to access the matrix, we'd flag a
bunch of wrong inputs/outputs as being used because the index was
multiplied by matrix columns and the actual used index was left out.

Fixes glsl-mat-attribute.
2010-12-09 14:41:50 -08:00
Eric Anholt 3fb18d6775 intel: Set the swizzling for depth textures using the GL_RED depth mode.
Fixes depth-tex-modes-rg.
2010-12-09 14:41:50 -08:00
Eric Anholt b4e8ec3a57 intel: Use plain R8 and RG8 for COMPRESSED_RED and COMPRESSED_RG.
Fixes texture-rg.
2010-12-09 14:41:50 -08:00
Vinson Lee c3ca384e71 i965: Silence uninitialized variable warning.
Fixes this GCC warning.
brw_fs.cpp: In function 'brw_reg brw_reg_from_fs_reg(fs_reg*)':
brw_fs.cpp:3255: warning: 'brw_reg' may be used uninitialized in this function
2010-12-09 14:17:17 -08:00
Vinson Lee af5f7b3260 r600g: Fix SCons build. 2010-12-09 14:03:58 -08:00
Jerome Glisse 121079bd67 r600g: indentation cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:16:22 -05:00
Jerome Glisse 7055068eea r600g: specialized upload manager
Allow important performance increase by doing hw specific implementation
of the upload manager helper. Drop the range flushing that is not hit with
this code (and wasn't with previous neither). Performance improvement are
mostly visible on slow CPU.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:07:05 -05:00
Jerome Glisse 15753cf54d r600g: avoid using pb* helper we are loosing previous cpu cycle with it
r600g is up to a point where all small CPU cycle matter and pb* turn
high on profile. It's mostly because pb try to be generic and thus
trigger unecessary check for r600g driver. To avoid having too much
abstraction & too much depth in the call embedded everythings into
r600_bo. Make code simpler & faster. The performance win highly depend
on the CPU & application considered being more important on slower CPU
and marginal/unoticeable on faster one.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:07:01 -05:00
Fabian Bieler ef534f3838 glsl: fix lowering conditional returns in subroutines
this fix applies to the lower_sub_return 'branch' of the lower_jumps pass

Fixes piglit tests glsl-functions-5 and glsl-functions-6.
2010-12-09 11:28:06 -08:00