Commit Graph

41786 Commits

Author SHA1 Message Date
Christian König 8813842121 r600g: optimize away CF_INST_POP
If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.
2011-01-12 19:31:36 +01:00
Christian König 052b9e8fab r600g: make dumping of shaders an option 2011-01-12 19:17:49 +01:00
Christian König 95a2b265fa r600g: fix alu dumping 2011-01-12 19:17:49 +01:00
Christian König 47e7c6f571 r600g: improve r600_bc_dump 2011-01-12 19:17:49 +01:00
Eric Anholt 9351ef7a44 i965/vs: When MOVing to produce ABS, strip negate of the operand.
We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-vs-abs-neg.
2011-01-12 09:50:34 -08:00
Eric Anholt ab56e3be9a i965/fs: When producing ir_unop_abs of an operand, strip negate.
We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-fs-abs-neg.
2011-01-12 09:50:10 -08:00
José Fonseca 416ca90138 glsl: Make builtin_compiler build on Windows with MSVC. 2011-01-12 16:58:37 +00:00
José Fonseca 0035d1d902 glsl: Make builtin_compiler portable for non-unices. 2011-01-12 16:54:25 +00:00
José Fonseca f9bb5323eb getopt: Make code more portable. 2011-01-12 16:54:21 +00:00
José Fonseca 6d670f6c0f getopt: Import OpenBSD getopt implementation for MSVC. 2011-01-12 15:32:17 +00:00
José Fonseca 46662de68b scons: Update windows build for vgapi->openvg rename. 2011-01-12 15:13:57 +00:00
José Fonseca b07ad1d6bd scons: Fix build on systems without libOpenVG.so 2011-01-12 15:06:57 +00:00
Chia-I Wu 1e4f412242 egl: When EGL_DRIVER is set, do not add other drivers.
Setting EGL_DRIVER forces the driver to be loaded, as documented.  There
should be no fallbacks.
2011-01-12 18:10:15 +08:00
Chia-I Wu 4924cb9036 egl: libEGL depends on LOCAL_LIBS.
So that libEGL is rebuilt whenever LOCAL_LIBS changes.
2011-01-12 18:10:15 +08:00
Chia-I Wu 39812c48df egl_dri2: Fix eglGetProcAddress.
The driver struct is zeroed after dri2_load.  Oops.
2011-01-12 18:10:15 +08:00
Chia-I Wu a8b6b6555c scons: Updates for targets/egl-static.
Update SConscripts to re-enable or add support for EGL on windows and
x11 platforms respectively.  targets/egl-gdi is replaced by
targets/egl-static, where "-static" means pipe drivers and state
trackers are linked to statically by egl_gallium, and egl_gallium is a
built-in driver of libEGL.  There is no more egl_gallium.dll on Windows.
2011-01-12 17:40:01 +08:00
Chia-I Wu 49ed5bb28d targets/egl-static: New EGL target for scons.
This target is based on and replaces egl-gdi.  It is suitable for both
windows and x11.
2011-01-12 17:40:01 +08:00
Kenneth Graunke 1412dea949 glsl: Add type inference support for remaining expression opcodes. 2011-01-11 23:28:58 -08:00
Eric Anholt 4eb7284ef9 i965: Tighten up the check for flow control interfering with coalescing.
This greatly improves codegen for programs with flow control by
allowing coalescing for all instructions at the top level, not just
ones that follow the last flow control in the program.
2011-01-11 16:04:25 -08:00
Christian König 93a95ad8ff r600g: texture instructions also work fine with TGSI_FILE_INPUT 2011-01-12 00:44:30 +01:00
Christian König a1146c1373 r600g: DP4 also supports writemasking 2011-01-12 00:41:49 +01:00
Christian König 7be5455796 r600g: Why all this fiddling with tgsi_helper_copy?
tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.

This patch fixes this use for MAD, CMP and DP4.
2011-01-12 00:40:55 +01:00
Christian König cc0f604241 r600g: fix tex and vtx joining 2011-01-12 00:06:48 +01:00
Eric Anholt c00bc13564 glsl: Fix the lowering of variable array indexing to not lose write_masks.
Fixes glsl-complex-subscript on 965.
2011-01-11 14:50:19 -08:00
Eric Anholt 5acf94e955 i965: Remove dead fallback for stencil _Enabled but no stencil buffer.
The _Enabled field is the thing that takes into account whether
there's a stencil buffer.  Tested with piglit glx-visuals-stencil.
2011-01-11 13:48:31 -08:00
Tilman Sauerbeck 242205404d r600g: Fixed SIN/COS/SCS for the case where the operand is a literal.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-11 22:37:01 +01:00
Alberto Milone ca8960234e r600c: add evergreen ARL support.
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
2011-01-11 14:48:44 -05:00
Jerome Glisse 0865af4b42 noop: remove dead dri target
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-01-11 14:46:09 -05:00
Jerome Glisse 63b9790a55 r600g: move user fence into base radeon structure
This avoid any issue when context is free and we still try to
access fence through radeon structure.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-01-11 14:34:25 -05:00
Brian Paul 483f566222 configure: bump libdrm version requirement to 2.4.23
NOTE: This is a candidate for the 7.10 (and 7.9?) branch.
2011-01-11 09:42:54 -07:00
Brian Paul 167db6d34f mesa: include teximage.h to silence warning 2011-01-11 09:37:35 -07:00
Brian Paul d92e56460e mesa: do a debug check of _mesa_format_to_type_and_comps()
Make sure that all formats are handled in this function.  It's
easy to miss this function when adding new pixel formats.

See also http://bugs.freedesktop.org/show_bug.cgi?id=31544
2011-01-11 09:27:06 -07:00
Brian Paul 0073f50cd4 mesa: fix a few format table mistakes, assertions
The BaseFormat field was incorrect for a few R and RG formats.
Fix a couple assertions too.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-11 09:27:06 -07:00
Kenneth Graunke 33d0c44910 glsl: Autogenerate builtin_functions.cpp as part of the build process.
Python is already necessary for other parts of Mesa, so there's no
reason we can't just generate it.  This patch updates both make and
SCons to do so.
2011-01-10 19:03:27 -08:00
Ian Romanick 469ea695bb glsl: Disallow 'in' and 'out' on globals in GLSL 1.20
Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.

NOTE: This is a candidate for the 7.9 and 7.10 branches.  This patch
also depends on the previous two commits.
2011-01-10 17:39:16 -08:00
Ian Romanick a0c2ec8e2d glsl: Refresh autogenerated parser file.
For the previous commit.
2011-01-10 17:39:16 -08:00
Ian Romanick eebdfdfbcf glsl: Add version_string containing properly formatted GLSL version 2011-01-10 17:39:16 -08:00
Ian Romanick a302d740bd glcpp: Refresh autogenerated lexer and parser files.
For the previous commit.
2011-01-10 17:38:56 -08:00
Ian Romanick 9ca5300b6e glcpp: Generate an error for division by zero
When GCC encounters a division by zero in a preprocessor directive, it
generates an error.  Since the GLSL spec says that the GLSL
preprocessor behaves like the C preprocessor, we should generate that
same error.

It's worth noting that I cannot find any text in the C99 spec that
says this should be an error.  The only text that I can find is line 5
on page 82 (section 6.5.5 Multiplicative Opertors), which says,

    "The result of the / operator is the quotient from the division of
    the first operand by the second; the result of the % operator is
    the remainder. In both operations, if the value of the second
    operand is zero, the behavior is undefined."

Fixes 093-divide-by-zero.c test and bugzilla #32831.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-10 17:37:51 -08:00
Chad Versace 4e09a786d2 glcpp: Regenerate glcpp-parse.c 2011-01-10 17:28:24 -08:00
Chad Versace 4fff52f1c9 glcpp: Fix segfault when validating macro redefinitions
In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add
a guard that prevents dereferncing a null token list.

This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and
Bugzilla #32695.
2011-01-10 17:28:24 -08:00
Eric Anholt c0cdae0368 i965: Use a new miptree to avoid software fallbacks due to drawing offset.
When attaching a small mipmap level to an FBO, the original gen4
didn't have the bits to support rendering to it.  Instead of falling
back, just blit it to a new little miptree just for it, and let it get
revalidated into the stack later just like any other new teximage.

Bug #30365.
2011-01-10 17:21:54 -08:00
Eric Anholt 6bdc319421 intel: Drop the speculatively-use-firstImage-mt in validation.
It's been replaced by just setting texObj->mt to image->mt at TexImage
time.
2011-01-10 17:21:11 -08:00
Eric Anholt bdc6dc1d7e intel: Don't relayout the texture on maxlevel change.
This avoids relayouts in the common case of glGenerateMipmap() or
people doing similar things.

Bug #30366.
2011-01-10 17:21:11 -08:00
Eric Anholt 48024fb44c intel: When making a new teximage miptree, make a full one.
If we hit this path, we're level 1+ and the base level got allocated
as a single level instead of a full tree (so we don't match
intelObj->mt).  This tries to recover from that so that we end up with
2 allocations and 1 validation blit (old -> new) instead of
allocations equal to number of levels and levels - 1 blits.
2011-01-10 17:21:11 -08:00
Eric Anholt bd4a2e9209 meta: Don't tweak BaseLevel when doing glGenerateMipmap().
We don't need to worry about levels other than MaxLevel because we're
minifying -- the lower levels (higher detail) won't contribute to the
result.  By changing BaseLevel, we forced hardware that doesn't
support BaseLevel != 0 to relayout the texture object.
2011-01-10 17:21:11 -08:00
Eric Anholt 5b3eb7538c Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."
This reverts commit 7ce6517f3a.
This reverts commit d60145d06d.

I was wrong about which generations supported baselevel adjustment --
it's just gen4, nothing earlier.  This meant that i915 would have
never used the mag filter when baselevel != 0.  Not a severe bug, but
not an intentional regression.  I think we can fix the performance
issue another way.
2011-01-10 17:21:10 -08:00
Kenneth Graunke da0c0dbab0 i965: Add #defines for HiZ and separate stencil buffer commands. 2011-01-10 15:44:32 -08:00
Kenneth Graunke 4b929c75e2 i965: Add new HiZ related bits to WM_STATE. 2011-01-10 15:44:32 -08:00
Kenneth Graunke 1feee7b1b3 i965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.
Again, this makes it match the documentation.
2011-01-10 15:44:32 -08:00