Daniel Vetter [Mon, 28 Mar 2011 19:16:12 +0000 (21:16 +0200)]
i915g: use drm ioctl to get pci devid
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tobias Droste [Sun, 27 Mar 2011 15:11:14 +0000 (08:11 -0700)]
gallivm: Fix build with llvm-2.9
In llvm-2.9 Target->createMCInstPrinter() takes different arguments
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Henri Verbeet [Wed, 23 Mar 2011 20:58:06 +0000 (21:58 +0100)]
st/mesa: Validate state before doing blits.
Specifically, this ensures things like the front buffer actually exist. This
fixes piglt fbo/fbo-sys-blit and fd.o bug 35483.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Fabian Bieler [Wed, 23 Mar 2011 22:27:01 +0000 (23:27 +0100)]
r600g: Handle texture fetch instructions with relative addressing
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Fabian Bieler [Wed, 23 Mar 2011 22:26:41 +0000 (23:26 +0100)]
r600g: Handle texture fetch instructions with neg or abs on source register
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Fabian Bieler [Wed, 23 Mar 2011 17:12:44 +0000 (18:12 +0100)]
r600g: Handle texture fetch instructions with swizzle on source register
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Kenneth Graunke [Sun, 27 Mar 2011 06:37:09 +0000 (23:37 -0700)]
glsl: Accept precision qualifiers on sampler types, but only in ES.
GLSL 1.30 states clearly that only float and int are allowed, while the
GLSL ES specification's issues section states that sampler types may
take precision qualifiers.
Fixes compilation failures in 3DMarkMobileES 2.0 and GLBenchmark 2.0.
NOTE: This is a candidate for stable release branches.
Kenneth Graunke [Sun, 27 Mar 2011 05:04:23 +0000 (22:04 -0700)]
i965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.
Civilization 4's shaders make heavy use of gl_Color and don't use
perspective interpolation. This resulted in rivers, units, trees, and
so on being rendered almost entirely white. This is a regression
compared to the old fragment shader backend.
Found by inspection (comparing the old and new FS backend code).
References: https://bugs.freedesktop.org/show_bug.cgi?id=32949
NOTE: This is a candidate for the 7.10 branch.
Benjamin Franzke [Wed, 16 Mar 2011 12:51:22 +0000 (13:51 +0100)]
egl/wayland-drm: Fix include path
src/egl/main/egltypedefs.h needs the path for EGL/egl.h
Reported by jlind on irc.
Kristian Høgsberg [Tue, 8 Mar 2011 01:19:10 +0000 (20:19 -0500)]
egl_dri2: We don't actually support KHR_gl_texture_2D_image
Kristian Høgsberg [Tue, 8 Mar 2011 01:18:29 +0000 (20:18 -0500)]
egl_dri2: Enable image extensions in one place
We know what we can support in egl_dri2.c so just enable the extensions
there.
Kenneth Graunke [Fri, 25 Mar 2011 17:59:46 +0000 (10:59 -0700)]
glsl: Generate readable unique names at print time.
Since GLSL IR allows multiple ir_variables to share the same name, we
need to generate unique names when printing the IR. Previously, we
always used %s@%p, appending the ir_variable's memory address.
While this worked, it had two drawbacks:
- When there aren't duplicates, the extra "@0x669a3e88" is useless
and makes the code harder to read.
- Real duplicates were hard to tell apart:
channel_expressions@0x6699e3c8 vs. channel_expressions@0x6699ddd8
We now append @2, @3, @4, and so on, but only where necessary to
distinguish duplicates. Since we only do this at print time, any
performance impact is irrelevant.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Vinson Lee [Fri, 25 Mar 2011 19:47:06 +0000 (12:47 -0700)]
gallivm: Fix build with llvm-2.9.
In llvm-2.9, the header file llvm/System/Host.h has been moved to
llvm/Support/Host.h.
Ian Romanick [Tue, 25 Jan 2011 00:45:11 +0000 (16:45 -0800)]
glsl: Make add_variable, add_uniform, et. al. have similar signatures
While making some other changes in this area I was finding it annoying
each of these functions took mostly the same set of parameters in
differing orders.
Ian Romanick [Fri, 25 Mar 2011 01:01:37 +0000 (18:01 -0700)]
i965/fs: Use different name for inner loop counter
'i' is already used for the outer loop. This caused some problems
while doing other work in this area. No bug exists here... until you
want to use the outer loop counter in the inner loop.
Ian Romanick [Thu, 24 Mar 2011 23:50:23 +0000 (16:50 -0700)]
glsl: Fix off-by-one error setting max_array_access for non-constant indexing
NOTE: This is a candidate for the stable branches.
Ian Romanick [Thu, 24 Mar 2011 23:49:21 +0000 (16:49 -0700)]
glsl: Add array access bounds checking to ir_validate
Brian Paul [Fri, 25 Mar 2011 16:33:51 +0000 (10:33 -0600)]
mesa: add void to save_TextureBarrierNV()
José Fonseca [Fri, 25 Mar 2011 16:00:11 +0000 (16:00 +0000)]
glsl: Add void to _mesa_destroy_shader_compiler() argument list.
At least MSVC sees a distinction between foo() and foo(void) and warns
about it.
José Fonseca [Fri, 25 Mar 2011 15:59:03 +0000 (15:59 +0000)]
mesa: Avoid redefining PUBLIC/USE/likely/unlikely macros.
José Fonseca [Fri, 25 Mar 2011 15:41:43 +0000 (15:41 +0000)]
mesa: Use appropriate call convention in VertexAttribI*v.
We were using typecasts because the functions pointers are polymorphic
in the second argument type, which.
Surprisingly the wrong calling convention didn't cause crashes on Windows,
but it was causing certain registers to be trashed in MSVC optimized
builds, when processing callists in the ClearView RC Flight Simulator.
José Fonseca [Fri, 25 Mar 2011 11:37:24 +0000 (11:37 +0000)]
gallium: Avoid redefinition of likely/unlikely macros on non gcc compilers.
José Fonseca [Fri, 25 Mar 2011 11:23:16 +0000 (11:23 +0000)]
mesa,mapi: Remove spurious const keyword from ClearBufferfi args.
Marek Olšák [Thu, 24 Mar 2011 22:35:16 +0000 (23:35 +0100)]
r300g: fix alpha-test with no colorbuffer
Piglit:
- fbo-alphatest-nocolor
NOTE: This is a candidate for the stable branches.
Brian Paul [Thu, 24 Mar 2011 19:38:04 +0000 (13:38 -0600)]
mesa: added _mesa_dump_image() for debugging
Brian Paul [Thu, 24 Mar 2011 19:15:29 +0000 (13:15 -0600)]
mesa: minor whitespace fixes
Eric Anholt [Sun, 13 Mar 2011 20:43:05 +0000 (13:43 -0700)]
i965/fs: Make compile failure more verbose with INTEL_DEBUG=wm.
Eric Anholt [Sun, 13 Mar 2011 08:25:36 +0000 (00:25 -0800)]
i965/fs: Clean up reg_undef args from long ago lack of fs_inst overloads.
Eric Anholt [Sun, 13 Mar 2011 08:23:40 +0000 (00:23 -0800)]
i965/fs: Clean up the emit calls by introducing emit() overload helpers.
I think the code ends up a lot more legible this way, though we've
still got the overloads in the fs_inst as well (even though there's
only one caller left currently).
Brian Paul [Thu, 24 Mar 2011 17:39:21 +0000 (11:39 -0600)]
mesa: new MESA_EXTENSION_MAX_YEAR env var
If set to year X, only report extensions up to that year. This is a
work-around for games that try to copy the extensions string to a fixed
size buffer and overflow. If a game was released in year X, setting
MESA_EXTENSION_MAX_YEAR to that year will likely fix the problem.
Brian Paul [Thu, 24 Mar 2011 17:32:33 +0000 (11:32 -0600)]
svga: adjust triangle rasterization offset
Fixes minor sub-pixel positioning error in some apps.
Iain Hibbert [Thu, 24 Mar 2011 14:35:48 +0000 (08:35 -0600)]
radeon: use C99 style in macros with variable arguments
Signed-off-by: Iain Hibbert <plunky@netbsd.org>
Brian Paul [Thu, 24 Mar 2011 14:34:19 +0000 (08:34 -0600)]
radeon: reorder #includes to silence warnings
Silences warnings about RADEON_TILING_SURFACE being redefined.
Only compile tested, not run tested.
Brian Paul [Thu, 24 Mar 2011 14:29:28 +0000 (08:29 -0600)]
r128: fix an old annoying warning
Brian Paul [Thu, 24 Mar 2011 14:29:28 +0000 (08:29 -0600)]
radeon: fix radeon_create_image_from_name() wrong parameter type
José Fonseca [Thu, 24 Mar 2011 10:43:27 +0000 (10:43 +0000)]
st/wgl: Adjust the pbuffer invisible window size.
Thanks to Brian Paul for diagnosing the issue.
José Fonseca [Wed, 23 Mar 2011 16:36:59 +0000 (16:36 +0000)]
mesa: More glGet* fixes.
glGet(GL_NORMAL_ARRAY) giving potentially wrong results.
Most of glGet(GL_XXX_ARRAY_BUFFER_BINDING) giving totally bogus results.
Brian Paul [Wed, 23 Mar 2011 15:05:04 +0000 (09:05 -0600)]
mesa: remove unused _MESA_NEW_NEED_NORMALS
Brian Paul [Wed, 23 Mar 2011 15:04:22 +0000 (09:04 -0600)]
mesa: remove _MESA_NEW_TRANSFER_STATE
José Fonseca [Tue, 22 Mar 2011 22:45:21 +0000 (22:45 +0000)]
mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).
Fabian Bieler [Thu, 3 Mar 2011 09:08:08 +0000 (10:08 +0100)]
r600g: Check for relative addressing in destination register when trying to merge instruction groups
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Dave Airlie [Mon, 21 Mar 2011 09:56:26 +0000 (19:56 +1000)]
r600g: fix bo names causing -35 EDEADLCK
this is a port of the r300 winsys code to do the same thing.
José Fonseca [Mon, 21 Mar 2011 17:28:21 +0000 (17:28 +0000)]
svga: Avoid synchronizing when doing piecewise upload of textures.
José Fonseca [Thu, 17 Mar 2011 23:33:50 +0000 (23:33 +0000)]
svga: Undo the DMA buffer size limiting.
Move this to the winsys, given it is not a virtual device limitation,
but a limitation specific to certain winsyses.
Also update debug message.
Dave Airlie [Mon, 21 Mar 2011 02:03:20 +0000 (12:03 +1000)]
glapi: drop glapi.[ch] and glapitemp.h from being copied to the X server.
These files are no longer considered shared as the X code is a lot simpler
without sharing them.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Sat, 19 Mar 2011 20:17:42 +0000 (14:17 -0600)]
mesa: 80-column wrapping and comment updates
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping, update comment
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
gl.h: reorder some #defines
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate enable/disable code for GL_TEXTURE_GEN_S/T/R/Q
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate clip plane update code
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: replace macro with function
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: rename functions to follow Mesa conventions
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Christoph Bumiller [Thu, 17 Mar 2011 16:07:30 +0000 (17:07 +0100)]
nv50,nvc0: implement texture barrier
Tom Stellard [Fri, 18 Mar 2011 18:06:47 +0000 (11:06 -0700)]
r300/compiler: Use a 4-bit writemask in pair instructions
We now use a 4-bit writemask for all instruction types, which makes it
easier to write generic helper functions to manipulte writemasks.
NOTE: This is a candidate for the 7.10 branch.
Johannes Obermayr [Fri, 18 Mar 2011 18:10:07 +0000 (12:10 -0600)]
nouveau: Fix serious compiler warnings
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35025
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: minor improvements in glTexEnvfv()
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: only report up to 50 _mesa_problem() calls
http://bugs.freedesktop.org/show_bug.cgi?id=35200 reports a disk
partition getting filled because of warning messages. Stop emitting
after 50.
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
swrast: report data type in error message
Kenneth Graunke [Sat, 26 Feb 2011 08:42:24 +0000 (00:42 -0800)]
mesa: Remove the CompileShader driver hook; it's just a no-op.
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: use _mesa_get_current_tex_unit() helper in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: remove unneeded local var in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: clean up the glBindTexture early out code a bit
Kenneth Graunke [Wed, 16 Mar 2011 07:00:09 +0000 (00:00 -0700)]
i965: Rename brw_(IF|CONT)_gen6 functions to gen6_(IF|CONT).
Tobias Droste [Wed, 16 Mar 2011 17:45:29 +0000 (18:45 +0100)]
autoconf: don't use CFLAGS for cpp files
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Kenneth Graunke [Wed, 16 Mar 2011 07:11:48 +0000 (00:11 -0700)]
i965: Rename BRW_DATAPORT_..._GEN6 messages to GEN6_... for consistency.
Kenneth Graunke [Wed, 16 Mar 2011 07:06:59 +0000 (00:06 -0700)]
i965: Rename BRW_SAMPLER_MESSAGE_..._GEN5 to GEN5_SAMPLER_MESSAGE.
We already have lots of GEN6_* defines; this seems more consistent.
José Fonseca [Wed, 16 Mar 2011 15:46:21 +0000 (15:46 +0000)]
svga: Leave any_user_vertex_buffers flag alone.
It is pointless to change, now that we don't replace user vertex buffer
with uploaded copy, per commit
52e598d200108ab9cfc9c9d828bbebdc576e9703.
José Fonseca [Wed, 16 Mar 2011 15:43:00 +0000 (15:43 +0000)]
svga: Hardcode SVGA_COMBINE_USERBUFFERS to 1.
The code no longer supports otherwise -- it relies on buffers being
uploaded via u_upload_mgr -- so make this clear.
Also, there's no need to flush after draws from user buffers, given all
user content should have been copied by then.
José Fonseca [Thu, 10 Mar 2011 14:39:08 +0000 (14:39 +0000)]
mesa: Sort extensions in extension string by year.
The years were obtained automatically by scraping the first year from
the spec text file. They are approximate.
José Fonseca [Wed, 16 Mar 2011 11:17:48 +0000 (11:17 +0000)]
svga: Use transfer information on buffer transfers.
Should prevent the assert failure
svga_buffer_flush_mapped_range: Assertion `sbuf->map.writing' failed.
on nested transfers.
José Fonseca [Wed, 16 Mar 2011 09:16:01 +0000 (09:16 +0000)]
glsl2: Silence unused added variable gcc warning.
José Fonseca [Wed, 16 Mar 2011 09:15:30 +0000 (09:15 +0000)]
mesa: Use typecast in BITFIELD64_BIT macro.
Unsigned long is 32bit on several platforms (e.g., Windows), yielding
1UL << 32 to be zero.
Note that BITFIELD64_BIT result is often assigned to variables of type
GLbitfield, instead of GLbitfield64. That's probably wrong and should be
addressed in a later change.
Brian Paul [Tue, 15 Mar 2011 15:48:26 +0000 (09:48 -0600)]
mesa: use BITFIELD64_BIT() macro
Brian Paul [Tue, 15 Mar 2011 15:48:08 +0000 (09:48 -0600)]
st/mesa: use BITFIELD64_BIT() macro in a few more places
Brian Paul [Tue, 15 Mar 2011 15:18:40 +0000 (09:18 -0600)]
glsl: add cast to silence signed/unsigned comparison warning
Brian Paul [Tue, 15 Mar 2011 15:17:46 +0000 (09:17 -0600)]
mesa: use 1UL for 64-bit unsigned constant for C++
This fixes C++ warnings where BITFIELD64_BIT() is used.
Ian Romanick [Tue, 15 Mar 2011 23:33:27 +0000 (16:33 -0700)]
glsl: Only allow unsized array assignment in an initializer
It should have been a tip when the spec says "However, implicitly
sized arrays cannot be assigned to. Note, this is a rare case that
*initializers and assignments appear to have different semantics*."
(empahsis mine)
Fixes bugzilla #34367.
NOTE: This is a candidate for stable release branches.
Daniel Vetter [Tue, 15 Mar 2011 20:49:25 +0000 (21:49 +0100)]
i915g: fix braino in the static state rework
For mip-map level rendering, both draw offset and size tend to change ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 14 Mar 2011 21:13:01 +0000 (22:13 +0100)]
i915g: implement early z
v2: Make it actually work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 15 Mar 2011 17:36:00 +0000 (18:36 +0100)]
i915g: split up static state
Early Z support is set in the DST_VARS command. Hence split up static
state emission to avoid reissuing to much on fragment shader changes,
especially the costly dst buffer relocations.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Anholt [Sat, 12 Mar 2011 01:39:49 +0000 (17:39 -0800)]
i965: Fix alpha testing when there is no color buffer in the FBO.
We were alpha testing against an unwritten value, resulting in garbage.
(part of) Bug #35073.
Eric Anholt [Fri, 11 Mar 2011 22:50:17 +0000 (14:50 -0800)]
i965: Do our lowering passes before the loop of optimization.
The optimization loop won't reinsert noise instructions or quadop
vectors, so we were traversing the tree for nothing. Lowering vector
indexing was in the loop after do_common_optimization() to avoid the
work if it ended up that the index was actually constant, but that has
been called already in the core.
Eric Anholt [Fri, 11 Mar 2011 22:08:48 +0000 (14:08 -0800)]
glsl: Skip processing the first function's body in do_dead_functions().
It can't call anything, so there's no point.
Eric Anholt [Fri, 11 Mar 2011 22:02:46 +0000 (14:02 -0800)]
glsl: Whitespace fixup in opt_dead_functions.cpp.
Eric Anholt [Fri, 11 Mar 2011 21:23:13 +0000 (13:23 -0800)]
glsl: Skip processing of expression trees in discard simplification.
It only cares about "if", "loop", and "discard".
Eric Anholt [Fri, 11 Mar 2011 21:17:03 +0000 (13:17 -0800)]
glsl: Reduce processing of expression trees in do_structure_splitting.
Most of the time we don't have a non-uniform struct variable in the
shader, so this cuts the time spent in do_structure_splitting during
glean texCombine by about 2/3.
Eric Anholt [Fri, 11 Mar 2011 21:08:26 +0000 (13:08 -0800)]
glsl: Skip processing expression trees in do_if_simplification().
Reduces time spent in this during glean texCombine by about 2/3.
Eric Anholt [Fri, 11 Mar 2011 21:03:54 +0000 (13:03 -0800)]
glsl: Skip processing expression trees in optimize_redundant_jumps()
Cuts the time spent in this function during glean texCombine by 2/3.
José Fonseca [Mon, 14 Mar 2011 16:55:46 +0000 (16:55 +0000)]
svga: Tell the host to discard when doing writes without FLUSH_EXPLICIT.
José Fonseca [Tue, 15 Mar 2011 15:43:33 +0000 (15:43 +0000)]
svga: Update svga_winsys_screen::buffer_map comments.
José Fonseca [Fri, 11 Mar 2011 14:00:25 +0000 (14:00 +0000)]
svga: Ensure DMA commands are serialized with unsynchronized flag is unset.
Jose Fonseca [Fri, 11 Mar 2011 23:33:18 +0000 (16:33 -0700)]
scons: copy hash_table.c, symbol_table.c to glsl directory
This fixes an issue where the .obj files wound up in the src/
directory rather than the build/ directory. That prevented
combined 32-bit and 64-bit builds from working.
Signed-off-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 15 Mar 2011 15:25:16 +0000 (16:25 +0100)]
mesa: fix scons build
Marek Olšák [Tue, 8 Mar 2011 10:34:28 +0000 (11:34 +0100)]
r300g: implement the texture barrier
Marek Olšák [Tue, 8 Mar 2011 10:32:35 +0000 (11:32 +0100)]
gallium: add texture barrier support to the interface and st/mesa (v2)
v2: change the gallium entry point to texture_barrier.
Marek Olšák [Fri, 11 Mar 2011 23:15:22 +0000 (00:15 +0100)]
mesa: add display list support for NV_texture_barrier
Marek Olšák [Tue, 8 Mar 2011 10:30:54 +0000 (11:30 +0100)]
mesa: regenerate glapi files
Be sure to type "make clean" after this commit, otherwise your binaries
will segfault.