Roland Scheidegger [Tue, 13 Jul 2010 17:58:58 +0000 (19:58 +0200)]
llvmpipe: move rasterizer to screen instead of setup context
there's no point of having this per context, so move to screen
(and protect with a mutex).
José Fonseca [Tue, 15 Jun 2010 11:20:01 +0000 (12:20 +0100)]
llvmpipe: Align texture data to the cache line.
Keith Whitwell [Sat, 10 Jul 2010 15:40:34 +0000 (16:40 +0100)]
llvmpipe: eliminate the set_state rasterizer command
Just put a pointer to the state in the tri->inputs struct. Remove
some complex logic for eliminating unused statechanges in bins at the
expense of a slightly larger triangle struct.
Keith Whitwell [Thu, 17 Jun 2010 20:19:09 +0000 (21:19 +0100)]
llvmpipe: pass mask into fragment shader
Move this code back out to C for now, will generate separately.
Shader now takes a mask parameter instead of C0/C1/C2/etc.
Shader does not currently use that parameter and rasterizes whole
pixel stamps always.
Keith Whitwell [Thu, 8 Jul 2010 14:13:35 +0000 (15:13 +0100)]
llvmpipe: move fences from per-bin to per-thread
Rather than inserting an lp_rast_fence command at the end of each
bin, have each rasterizer thread call this function directly once
it has run out of work to do on a particular scene.
This results in fewer calls to the mutex & related functions, but more
importantly makes it easier to recognize empty bins.
José Fonseca [Mon, 12 Jul 2010 15:28:33 +0000 (16:28 +0100)]
llvmpipe: Always swizzle/unswizzle whole tiles.
This was already the case, but the generated (un)swizzling code was not
benefiting of that knowledge.
Jakob Bornecrantz [Tue, 13 Jul 2010 14:46:29 +0000 (07:46 -0700)]
llvmpipe: Ignores!
Jakob Bornecrantz [Tue, 13 Jul 2010 14:44:37 +0000 (07:44 -0700)]
targets: Link xorg drivers with LLVM if built
Jakob Bornecrantz [Tue, 13 Jul 2010 14:44:13 +0000 (07:44 -0700)]
targets: Clean up xorg make files a bit
Jakob Bornecrantz [Tue, 13 Jul 2010 14:40:47 +0000 (07:40 -0700)]
st/xorg: When selecting st via configure make sure to test for xorg-server
Brian Paul [Tue, 13 Jul 2010 13:46:22 +0000 (07:46 -0600)]
libgl-xlib: add depend to make clean list
Brian Paul [Tue, 13 Jul 2010 13:44:35 +0000 (07:44 -0600)]
glapi: use _mesa_snprintf()
Note that the enums.c file is generated with this script.
This will preserve the change from commit
c4066b78c0aad41c199eb27157538c2ec9ab5bfd.
Marek Olšák [Tue, 13 Jul 2010 12:45:38 +0000 (14:45 +0200)]
r300/compiler: implement the Abs source operand modifier for vertex shaders
Marek Olšák [Tue, 13 Jul 2010 04:38:30 +0000 (06:38 +0200)]
r300/compiler: emulate SIN/COS/SCS in r3xx-r4xx vertex shaders
Despite the docs, the corresponding hardware instructions are r5xx-only.
Vinson Lee [Tue, 13 Jul 2010 07:31:37 +0000 (00:31 -0700)]
mesa: s/snprintf/_mesa_snprintf/
Marek Olšák [Tue, 13 Jul 2010 02:29:53 +0000 (04:29 +0200)]
r300g: do not advertise half_float_vertex on rv3x0
rv3x0 can't do it.
Marek Olšák [Mon, 12 Jul 2010 22:47:39 +0000 (00:47 +0200)]
r300g: extend and clean up debug logging
Marek Olšák [Mon, 12 Jul 2010 21:03:34 +0000 (23:03 +0200)]
r300g/swtcl: do not emit texcoords if they are also stuffed in GA
Marek Olšák [Mon, 12 Jul 2010 20:29:28 +0000 (22:29 +0200)]
r300g: rework the draw_rectangle hook
It is a lot simplier, cleaner, and more stable now.
Maciej Cencora [Mon, 12 Jul 2010 21:42:06 +0000 (23:42 +0200)]
Merge branch 'master' of git://anongit.freedesktop.org/mesa/mesa
Vinson Lee [Mon, 12 Jul 2010 21:21:57 +0000 (14:21 -0700)]
r600: Fix include recursion.
Fix r600_context.h -> r700_oglprog.h -> r600_context.h include
recursion.
Vinson Lee [Mon, 12 Jul 2010 21:12:02 +0000 (14:12 -0700)]
r300g: Remove unnecessary header.
Maciej Cencora [Mon, 12 Jul 2010 19:45:20 +0000 (21:45 +0200)]
radeon: fix some wine d3d9 tests
Need to flush command stream before mapping texture image
that is referenced by current cs.
Candidate for 7.8 branch.
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
José Fonseca [Mon, 12 Jul 2010 14:00:56 +0000 (15:00 +0100)]
llvmpipe: Re-enable threading on windows.
nobled [Sat, 3 Jul 2010 20:49:48 +0000 (13:49 -0700)]
os: remove gratuitous pipe_barrier placeholder code
There's already an implementation of pipe_barrier using
the other pipe_* primitives; just use that on Windows, too.
Now Windows passes pipe_barrier_test.
nobled [Sat, 3 Jul 2010 20:49:31 +0000 (13:49 -0700)]
os, rbug: remove PIPE_THREAD_HAVE_CONDVAR
The new default implementation of pipe_condvar makes it
unnecessary.
nobled [Sat, 3 Jul 2010 20:48:58 +0000 (13:48 -0700)]
os: Implement pipe_condvar on Windows Vista and later
Unfortunately compiling with these defines enabled would mean
Gallium can't run on Windows XP/2003 or older.
Todo: Need a macro to declare if we don't care about WinXP
compatibililty.
nobled [Sat, 3 Jul 2010 20:48:49 +0000 (13:48 -0700)]
os: Implement pipe_condvar on win32
Or at least a little of it. This version will sleep
for a fixed amount of time instead of just deadlocking,
which is a slight improvement.
Also do the same thing on any unrecognized platform.
Marek Olšák [Mon, 12 Jul 2010 11:23:24 +0000 (13:23 +0200)]
r300g: implement fast color clear
An initial implementation made by Dave Airlie.
For it to be used, a color-only clear must be invoked and exactly one
point-sampled render target must be set. The render target must be
macrotiled (for us to overcome alignment issues) and bpp must be either
16 or 32.
I can't see a difference in performance. :(
Conflicts:
src/gallium/drivers/r300/r300_blit.c
Marek Olšák [Mon, 12 Jul 2010 09:41:52 +0000 (11:41 +0200)]
r300g: clear and copy a resource with a rectangular point sprite
With an ordinary quad, the pixels on the main diagonal are computed
and stored twice, which is somewhat inefficient and might not work well
with specialized clear codepaths.
Marek Olšák [Mon, 12 Jul 2010 04:52:06 +0000 (06:52 +0200)]
r300g: do not use immediate mode if there is a VBO in VRAM
And other minor fixups.
Marek Olšák [Mon, 12 Jul 2010 04:32:50 +0000 (06:32 +0200)]
u_blitter: add draw_rectangle callback which can be overridden by a driver
Marek Olšák [Mon, 12 Jul 2010 03:18:05 +0000 (05:18 +0200)]
u_blitter: clean up the texcoord computations
Marek Olšák [Mon, 12 Jul 2010 03:16:19 +0000 (05:16 +0200)]
u_blitter: simplify blitter_set_rectangle
Marek Olšák [Mon, 12 Jul 2010 00:06:19 +0000 (02:06 +0200)]
u_blitter: rename blitter->base, add a way to get a pipe context from blitter
Marek Olšák [Sun, 11 Jul 2010 21:56:22 +0000 (23:56 +0200)]
r300g: ugly fix of a hardlock in the cubestorm xscreensaver
FDO bug #28563.
Maciej Cencora [Sun, 11 Jul 2010 13:39:48 +0000 (15:39 +0200)]
radeon: lower texture memory consumption is some cases
When searching for valid miptree check images in range
of [BaseLeve, MaxLevel] not [MinLod, MaxLoad].
Prevents unnecessary miptree allocations in cases when during
every rendering operation different texture image level
was selected using MIN_LOD = MAX_LOD = level (for every level
new miptree for whole texture was allocated).
Candidate for 7.8 branch.
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
Maciej Cencora [Sun, 11 Jul 2010 13:33:18 +0000 (15:33 +0200)]
radeon: fix teximage migration failure in rare case
Always store selected miptree in texObj->mt so get_base_teximage_offset returns correct data.
Found with piglit/mipmap-setup.
Candidate for 7.8 branch.
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
Maciej Cencora [Sun, 11 Jul 2010 12:04:18 +0000 (14:04 +0200)]
r300c: Fix vertex data setup for named buffer objects with unaligned offset
Candidate for 7.8 branch
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
Vinson Lee [Sun, 11 Jul 2010 07:14:53 +0000 (00:14 -0700)]
r600: Remove unnecessary headers.
Marek Olšák [Sat, 10 Jul 2010 18:34:29 +0000 (20:34 +0200)]
r300g: do not print a rejected CS if RADEON_DUMP_CS is not set
Also print relocation failures on non-debug builds too.
Vinson Lee [Sat, 10 Jul 2010 07:15:27 +0000 (00:15 -0700)]
r600: Fix GCC 'implication declaration of function' warnings.
Fix GCC 'implicit declaration of function' compiler warnings resulting
from commit
00fb58ed5d7104e675fe48d84e5049e5f7dbb9d7.
Vinson Lee [Sat, 10 Jul 2010 01:59:01 +0000 (18:59 -0700)]
r600: Remove unnecessary header.
Fixes r600_emit.h -> r600_cmdbuf.h -> r600_emit.h include recursion.
Vinson Lee [Sat, 10 Jul 2010 01:09:26 +0000 (18:09 -0700)]
r600: Fix include recursion.
r700_chip.h included r600_context.h, which included r700_chip.h.
Remove the unnecessary r600_context.h inclusion and add missing
headers.
Vinson Lee [Sat, 10 Jul 2010 00:34:40 +0000 (17:34 -0700)]
glslcompiler: Fix GCC warn_unused_result warning.
Vinson Lee [Fri, 9 Jul 2010 23:20:32 +0000 (16:20 -0700)]
glslcompiler: Fix memory leaks on error paths.
Vinson Lee [Fri, 9 Jul 2010 23:05:42 +0000 (16:05 -0700)]
glslcompiler: Remove unnecessary headers.
Vinson Lee [Fri, 9 Jul 2010 22:06:19 +0000 (15:06 -0700)]
mesa: Move [UN]CLAMPED_FLOAT_TO_UBYTE from imports.h to macros.h.
The other similar integer/float conversion macros are in macros.h.
Marek Olšák [Fri, 9 Jul 2010 18:22:20 +0000 (20:22 +0200)]
r300g: allow the GTT domain for samplers
This fixes sluggishness in vdrift.
Tom Stellard [Thu, 8 Jul 2010 21:40:48 +0000 (14:40 -0700)]
r300/compiler: Add a register rename pass.
This pass renames register in order to make it easier for the pair
scheduler to group TEX instructions together.
This fixes fdo bug #28606
Tom Stellard [Sun, 4 Jul 2010 19:30:52 +0000 (12:30 -0700)]
r300/compiler: Fix scheduling of TEX instructions.
The following instruction sequence will no longer be emitted in separate
TEX blocks:
0: TEX temp[0].xyz, temp[1].xy__, 2D[0];
1: TEX temp[1].xyz, temp[2].xy__, 2D[0];
This fixes fdo bug #25109
Marek Olšák [Fri, 9 Jul 2010 01:48:43 +0000 (03:48 +0200)]
r300g/swtcl: fix out-of-bounds write
This is a typo fix, the generated code should be the same.
Vinson Lee [Fri, 9 Jul 2010 00:54:47 +0000 (17:54 -0700)]
draw: Fix off-by-one error in assert.
textures is an array of size PIPE_MAX_VERTEX_SAMPLERS.
Brian Paul [Fri, 9 Jul 2010 00:35:08 +0000 (18:35 -0600)]
glsl: fix indirect addressing of gl_TextureMatrix[] arrays
The code to emit an array of OpenGL state vars lacked the code
to handle the gl_TextureMatrix[] array.
Fixes fd.o bug 28967
NOTE: this is a candidate for the 7.8 branch.
Kristian Høgsberg [Thu, 3 Jun 2010 02:48:06 +0000 (22:48 -0400)]
egl_dri2: Support _EGL_PLATFORM_DRM
This lets the egl_dri2 driver initialize on just a DRM fd.
Vinson Lee [Thu, 8 Jul 2010 23:06:01 +0000 (16:06 -0700)]
glslcompiler: Fix build.
Vinson Lee [Thu, 8 Jul 2010 22:58:23 +0000 (15:58 -0700)]
Merge branches 'master' and 'master' of ssh://git.freedesktop.org/git/mesa/mesa
Marek Olšák [Thu, 8 Jul 2010 22:16:49 +0000 (00:16 +0200)]
r300g: fix texturing with negative lod bias
This should fix FDO bugs #28437 and #28625.
Marek Olšák [Thu, 8 Jul 2010 20:32:39 +0000 (22:32 +0200)]
r300g: store/return the stride for winsys_handle in winsys
Eric Anholt [Thu, 8 Jul 2010 20:01:57 +0000 (13:01 -0700)]
i965: Add disasm for SEND mlen/rlen on Sandybridge.
Zhenyu Wang [Fri, 25 Jun 2010 08:05:24 +0000 (16:05 +0800)]
i965: Add 'wait' instruction support
When EU executes 'wait' instruction, it stalls and sets notification
register state. Host can issue MMIO write to clear notification
register state to allow EU continue on executing again.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Eric Anholt [Thu, 8 Jul 2010 19:35:48 +0000 (12:35 -0700)]
i965: Fix disasm of a SEND's mlen and rlen on Ironlake.
Zhenyu Wang [Tue, 29 Jun 2010 02:49:55 +0000 (10:49 +0800)]
i965: Add decode for Sandybridge DP write messages.
Zhenyu Wang [Tue, 29 Jun 2010 02:49:55 +0000 (10:49 +0800)]
i965: Add definitions for Sandybridge DP write/read messages.
Marek Olšák [Thu, 8 Jul 2010 19:36:47 +0000 (21:36 +0200)]
r300g: fix transfering compressed textures
Eric Anholt [Thu, 8 Jul 2010 19:12:54 +0000 (12:12 -0700)]
intel: Update intel_decode.c from intel-gpu-tools.
This came from commit
cf255e382d147fe3ca450f0dcec3525190e7dcbc
Brian Paul [Thu, 8 Jul 2010 17:03:44 +0000 (11:03 -0600)]
gallium: bump PIPE_MAX_SHADER_INPUTS/OUTPUTS to 32
Marek Olšák [Thu, 8 Jul 2010 04:20:01 +0000 (06:20 +0200)]
r300g: add a function for marking framebuffer atoms as dirty
Marek Olšák [Thu, 8 Jul 2010 04:16:09 +0000 (06:16 +0200)]
r300g: minor fixups
Brian Paul [Thu, 8 Jul 2010 15:22:52 +0000 (09:22 -0600)]
glsl: fix 'if ((x=foo()) > 1.0)' bug
Fixes fd.o bug 27216. May also be the root cause of fd.o bug 28950.
We weren't propogating the storage info for the x=foo() expression up
through the IR tree to the inequality expression.
NOTE: This is a candidate for the Mesa 7.8 branch.
Brian Paul [Thu, 8 Jul 2010 14:51:22 +0000 (08:51 -0600)]
st/mesa: additional assertions in st_translate_mesa_program()
Zack Rusin [Thu, 8 Jul 2010 04:33:31 +0000 (00:33 -0400)]
slang: fix typos
Zack Rusin [Wed, 7 Jul 2010 20:41:01 +0000 (16:41 -0400)]
slang: add some comments related to geometry shaders
Zack Rusin [Wed, 7 Jul 2010 04:54:33 +0000 (00:54 -0400)]
gs: inject const int gl_VerticesIn at link time
Brian Paul [Thu, 8 Jul 2010 02:26:33 +0000 (20:26 -0600)]
mesa: initial support for new GL 3.0 texture formats
Brian Paul [Wed, 7 Jul 2010 23:36:43 +0000 (17:36 -0600)]
gallivm: restore const qualifier
Brian Paul [Wed, 7 Jul 2010 23:27:10 +0000 (17:27 -0600)]
gallivm: fix cube map LOD computation
First, this undoes commit
e503af4baa2c709ae5743bb278b277d3faaba076
so we use iround() in lp_build_nearest_mip_level().
Second, in lp_build_sample_general() we need to check if we're sampling
a cube map before anything else. Choose the cube face and then recompute
the partial derivatives of (S,T) with respect to the chosen cube face.
Before, we were using the directional (S,T,R) derivatives to compute
the LOD.
Third, work around an apparent bug in LLVM 2.7 where setting the lod
variable to a const(0) value results in bad x86 code. See comments in
the code.
Brian Paul [Wed, 7 Jul 2010 19:04:47 +0000 (13:04 -0600)]
st/mesa: fix sampler max_lod computation
This change makes gallium behave like other GL implementations and fixes
a conformance failure.
Andre Maasikas [Wed, 7 Jul 2010 18:32:07 +0000 (21:32 +0300)]
r600: workaround 3 comp GL_SHORT vertex attribute format on r700
guess it's a hw errata?
Brian Paul [Wed, 7 Jul 2010 14:58:31 +0000 (08:58 -0600)]
glsl: use Elements() in arrays instead of sentinal values
The _slang_*_output_name() functions had one too many loop iterations
because of the sentinal end-of-list values in the vertOutput array.
Just use Elements() everywhere.
Vinson Lee [Wed, 7 Jul 2010 00:25:39 +0000 (17:25 -0700)]
llvmpipe: Don't build lp_test_round when using MSVC.
lp_test_round uses the math functions round and trunc, which aren't
available with MSVC.
Fixes the MSVC build for now.
Vinson Lee [Tue, 6 Jul 2010 23:18:32 +0000 (16:18 -0700)]
llvmpipe: Add lp_test_round to SCons build.
Vinson Lee [Tue, 6 Jul 2010 23:02:49 +0000 (16:02 -0700)]
egl: Remove unnecessary headers.
Vinson Lee [Tue, 6 Jul 2010 22:49:40 +0000 (15:49 -0700)]
draw: Remove unnecessary header.
Vinson Lee [Tue, 6 Jul 2010 22:45:31 +0000 (15:45 -0700)]
gallivm: Remove unnecessary header.
Marek Olšák [Tue, 6 Jul 2010 22:01:27 +0000 (00:01 +0200)]
util: print help for debug options on non-debug builds
I'd like to see the help when I request it.
Brian Paul [Tue, 6 Jul 2010 19:22:54 +0000 (13:22 -0600)]
gallivm: use trunc, not round in lp_build_nearest_mip_level()
Fixes fd.o bug 28036 (piglit fbo-cubemap.c regression)
Brian Paul [Tue, 6 Jul 2010 17:36:01 +0000 (11:36 -0600)]
llvmpipe: add test program for round(), trunc(), floor(), ceil()
Brian Paul [Tue, 6 Jul 2010 17:33:56 +0000 (11:33 -0600)]
gallivm: finish implementation of lp_build_iceil()
Plus fix minor error in lp_build_iceil() by tweaking the offset value.
And add a bunch of comments for the round(), trunc(), floor(), ceil()
functions.
Zack Rusin [Tue, 6 Jul 2010 17:27:31 +0000 (13:27 -0400)]
llvmpipe: disconnect vertex texture sampling from the setup
it was wrong to put this in the fs paths, but it was easier to just
stuff it along the fragment texture sampling paths. the patch
disconnects vertex texture sampling and just maps the textures
before the draw itself and unmaps them after.
Zack Rusin [Tue, 6 Jul 2010 16:35:23 +0000 (12:35 -0400)]
draw: make sure softpipe doesn't crash with vertex tex sampling
softpipe doesn't implement the draw's llvm tex sampling interface
so make sure draw can handle the cases where the driver doesn't
implement the interface
Zack Rusin [Mon, 14 Jun 2010 14:18:09 +0000 (10:18 -0400)]
draw: implement vertex texture sampling using llvm
Tom Stellard [Mon, 5 Jul 2010 20:01:17 +0000 (13:01 -0700)]
r300/compiler: Implement KILP opcode.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
José Fonseca [Mon, 14 Jun 2010 15:23:13 +0000 (16:23 +0100)]
gallivm: Use SSE4.1's BLENDV instructions for lp_build_select().
José Fonseca [Tue, 15 Jun 2010 14:34:16 +0000 (15:34 +0100)]
gallivm: Fix 8bit comparisons.
Alan Hourihane [Tue, 6 Jul 2010 10:42:18 +0000 (11:42 +0100)]
llvmpipe: ensure all bins are reset avoids memory corruption.
Chia-I Wu [Tue, 6 Jul 2010 08:27:20 +0000 (16:27 +0800)]
mesa: Always initialize transform feedback state.
Assert ctx->Driver.NewTransformFeedback if the feature is enabled; Use
the default callbacks otherwise. The rest of core mesa expects the
state to be initialized.
Chia-I Wu [Sun, 4 Jul 2010 07:55:12 +0000 (15:55 +0800)]
egl: Rework driver loading.
Driver loading is now splitted into two stages. In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_". Modules are
not loaded at this stage.
In the second stage, each module is loaded to initialize a display. The
process stops at the first module that can initialize the display.
If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display,
drv->Probe is used instead in this case.
Chia-I Wu [Tue, 6 Jul 2010 06:34:43 +0000 (14:34 +0800)]
st/egl: Add support for !GLX_DIRECT_RENDERING.
st/egl uses GLX code for DRI2 support. It should honor
GLX_DIRECT_RENDERING.
Also updates configure.ac to define GLX_DIRECT_RENDERING for st/egl.
Brian Paul [Tue, 6 Jul 2010 02:07:07 +0000 (20:07 -0600)]
mesa: initial support for unnormalized integer texture formats
As defined by GL_EXT_texture_integer.