Eric Anholt [Fri, 4 Jun 2010 20:27:05 +0000 (13:27 -0700)]
i915: Clamp minimum lod to maximum texture level too.
Otherwise, we'd run into minlod > maxlod, and the sampler would give
us the undefined we asked for.
Bug #24846. Fixes OGLC texlod.c.
Eric Anholt [Fri, 4 Jun 2010 19:43:15 +0000 (12:43 -0700)]
intel: Fix intel_compressed_num_bytes for FXT1 after I broke it.
Fixes piglit fxt1-teximage since
7554b83a21bd62b20df5a7327b69f08108ac9ab6, and also OGLC tests that hit
FXT1 with a million other things.
Bug #28184.
Kristian Høgsberg [Fri, 4 Jun 2010 13:06:22 +0000 (09:06 -0400)]
glsl: Recject rect samplers when GL_ARB_texture_rectangle is disabled
José Fonseca [Fri, 4 Jun 2010 11:22:14 +0000 (12:22 +0100)]
llvmpipe: Do unswizzling in parallel when flushing for transfers.
José Fonseca [Fri, 4 Jun 2010 11:20:46 +0000 (12:20 +0100)]
progs: Remove forked/dead files.
Chia-I Wu [Fri, 4 Jun 2010 04:52:51 +0000 (12:52 +0800)]
st/egl: Fix compiler warnings.
Forgot to stage this chunk in last commit.
Chia-I Wu [Fri, 4 Jun 2010 04:05:37 +0000 (12:05 +0800)]
st/egl: Move sw screen creation to native helper.
The code is shared by ximage and gdi backend.
Vinson Lee [Fri, 4 Jun 2010 01:41:19 +0000 (18:41 -0700)]
scons: Add cygwin to list of accepted platforms.
Marek Olšák [Fri, 4 Jun 2010 00:59:37 +0000 (02:59 +0200)]
r600g: implement clear_{render_target, depth_stencil}, resource_copy_region
resource_copy_region uses a software fallback because it relies on texture
samplers which haven't been implemented yet.
Marek Olšák [Fri, 4 Jun 2010 00:57:32 +0000 (02:57 +0200)]
r600g: make blit functions static (private)
Marek Olšák [Fri, 4 Jun 2010 00:47:35 +0000 (02:47 +0200)]
r600g: use cast wrappers
Vinson Lee [Fri, 4 Jun 2010 00:41:57 +0000 (17:41 -0700)]
r600g: Move declaration before code.
Fixes SCons build.
Vinson Lee [Fri, 4 Jun 2010 00:30:55 +0000 (17:30 -0700)]
util: Remove unnecessary header.
Vinson Lee [Fri, 4 Jun 2010 00:29:59 +0000 (17:29 -0700)]
nv50: Remove unnecessary header.
Vinson Lee [Fri, 4 Jun 2010 00:29:30 +0000 (17:29 -0700)]
svga: Remove unnecessary header.
Vinson Lee [Fri, 4 Jun 2010 00:24:22 +0000 (17:24 -0700)]
llvmpipe: Fix uninitialized variable on non-debug builds.
Bas Nieuwenhuizen [Mon, 24 May 2010 15:33:52 +0000 (17:33 +0200)]
r600g: added code for depthtesting
- added code to configure the depth buffer and to set up depth testing.
Roland Scheidegger [Thu, 3 Jun 2010 15:41:53 +0000 (17:41 +0200)]
r600g: adapt to interface changes
r600g should be able to handle separate depth stencil clears as well.
Also adapt surface_fill/copy stubs to new interface (not that it matters).
Roland Scheidegger [Thu, 3 Jun 2010 15:46:14 +0000 (17:46 +0200)]
Merge branch 'gallium-newclear'
Conflicts:
src/gallium/state_trackers/python/p_context.i
Roland Scheidegger [Thu, 3 Jun 2010 14:33:25 +0000 (16:33 +0200)]
gallium: rename clearRT / clearDS to clear_render_target / clear_depth_stencil
more consistent with rest of gallium naming conventions.
Also rename driver-internal names for these the same.
Jakob Bornecrantz [Tue, 1 Jun 2010 09:15:52 +0000 (10:15 +0100)]
gallium: Don't depend directly on staging dir in Xorg template makefile
Brian Paul [Thu, 3 Jun 2010 15:01:25 +0000 (09:01 -0600)]
tgsi: we don't support indirect input/output registers in SSE codegen yet
Extend the check for indirect addressing of temp regs to include
input/output regs.
Fixes failure with piglit glsl-texcoord-array.shader_test test when using
SSE codegen.
Brian Paul [Thu, 3 Jun 2010 14:58:31 +0000 (08:58 -0600)]
tgsi: whitespace cleanup
Brian Paul [Thu, 3 Jun 2010 00:13:00 +0000 (18:13 -0600)]
gallium: add interpolation parameter to simple shader functions
This lets us specify linear interpolation instead of perspective
interpolation for blit operations. Might be a bit faster.
Jakob Bornecrantz [Tue, 1 Jun 2010 08:34:41 +0000 (09:34 +0100)]
gallium: Don't always copy the dri driver to the staging dir
So something in the build keept updating the timestamp on the
staging directory causing us to always copy the library to it.
Jakob Bornecrantz [Tue, 1 Jun 2010 08:04:29 +0000 (09:04 +0100)]
gallium: Create a Xorg driver template Makefile
Brian Paul [Thu, 3 Jun 2010 13:52:46 +0000 (07:52 -0600)]
util/u_debug: use MAX2 macro
José Fonseca [Thu, 3 Jun 2010 13:22:41 +0000 (14:22 +0100)]
llvmpipe: Number shaders/variants for more reproducible function names in the IR.
José Fonseca [Thu, 3 Jun 2010 13:21:25 +0000 (14:21 +0100)]
gallivm: Register the JIT engine with oprofile on debug/profile builds.
José Fonseca [Thu, 3 Jun 2010 13:16:59 +0000 (14:16 +0100)]
gallivm: Factor out the quad derivative code into a single place. Fix ddy.
For ddy it should be (bottom - top).
Joakim Sindholt [Wed, 2 Jun 2010 18:37:44 +0000 (20:37 +0200)]
r300g: use util/u_debug
Joakim Sindholt [Tue, 1 Jun 2010 18:11:30 +0000 (20:11 +0200)]
gallium: silence all debug_named_value related warnings
Joakim Sindholt [Tue, 1 Jun 2010 18:11:02 +0000 (20:11 +0200)]
util/u_debug: add description field to debug_named_value
Vinson Lee [Thu, 3 Jun 2010 07:03:18 +0000 (00:03 -0700)]
scons: Handle Python OSError exception when missing libdrm_radeon.
Instead of crashing when libdrm_radeon is unavailable, the SCons build
just does not build r600g.
Marek Olšák [Thu, 3 Jun 2010 03:15:10 +0000 (05:15 +0200)]
r300/compiler: print opcode names instead of numbers
Marek Olšák [Thu, 3 Jun 2010 01:42:03 +0000 (03:42 +0200)]
r300g: set the minimum texture stride to 64 bytes on RS600, RS690, and RS740
I hope I've done it right. No way to test it here...
Vinson Lee [Thu, 3 Jun 2010 00:54:10 +0000 (17:54 -0700)]
dri/swrast: Remove unnecessary header.
Brian Paul [Wed, 2 Jun 2010 23:37:42 +0000 (17:37 -0600)]
st/mesa: fix indirect addressing of input/output regs
This fixes an issue that was missed with commit
9f544394c1d059ce09c8bb2b5e11f5e871c7915f.
Fixes piglit glsl-texcoord-array.shader_test
Brian Paul [Wed, 2 Jun 2010 22:21:47 +0000 (16:21 -0600)]
gallivm: bump up LP_BUILD_FLOW_MAX_VARIABLES
Fixes failed assertion with piglit fbo-drawbuffers-fragcolor.c
See fd.o bug 28358.
With 8 color buffers + Z we need to declare 33 vars, at least.
Kristian Høgsberg [Wed, 2 Jun 2010 12:58:24 +0000 (08:58 -0400)]
intel: Remove a leftover DRI1/DRI2 conditional
Brian Paul [Wed, 2 Jun 2010 22:04:10 +0000 (16:04 -0600)]
glx: fix indentation and remove extraneous break
Brian Paul [Wed, 2 Jun 2010 22:03:22 +0000 (16:03 -0600)]
glx: reformat and silence unused expression warning
Brian Paul [Wed, 2 Jun 2010 20:48:53 +0000 (14:48 -0600)]
glsl: handle indirectly indexed input registers in linker
For example, if the fragment shader reads gl_TexCoord[i] with a
dynamic index we need to set all the InputsRead bits for all
texcoords. We were already doing this for shader outputs.
Refactored the later code so inputs and outputs are handled with
similar code.
Fixes a swrast failure with piglit's glsl-texcoord-array.shader_test
Brian Paul [Wed, 2 Jun 2010 20:48:27 +0000 (14:48 -0600)]
mesa: use BITFIELD64_BIT() macro
Brian Paul [Wed, 2 Jun 2010 20:45:33 +0000 (14:45 -0600)]
glsl: fix bad sanity-check assertion
Brian Paul [Fri, 28 May 2010 19:33:03 +0000 (13:33 -0600)]
mesa: whitespace and 80 column wrapping
Eric Anholt [Wed, 2 Jun 2010 20:56:39 +0000 (13:56 -0700)]
shaders: Don't lose the param binding swizzle for single params.
Multiple item params are OK because we don't allow swizzles for them
(in case you do array access to hit their elements, for example). For
singles, though, using the swizzle can cut down on storage, we do want
to allow a swizzled use of another param.
Fixes OGLC texRect.c.
José Fonseca [Wed, 2 Jun 2010 19:09:02 +0000 (20:09 +0100)]
llvmpipe: Fix bad logic.
Courtesy of Vinson and coverity.
Vinson Lee [Wed, 2 Jun 2010 19:09:23 +0000 (12:09 -0700)]
llvmpipe: Remove unnecessary header.
José Fonseca [Wed, 2 Jun 2010 18:59:28 +0000 (19:59 +0100)]
llvmpipe: Fix typo in assert.
José Fonseca [Wed, 2 Jun 2010 17:43:35 +0000 (18:43 +0100)]
llvmpipe: Per quad interpolation.
First interpolate the 4 quads upper left corners, then sub-interpolate
each quad pixel. Do the perspective divide once per quad.
Saves some muls and reciprocates. But doesn't seem to make a
noticeable improvement.
It make the code simpler and more compact, so commiting anyway.
José Fonseca [Wed, 2 Jun 2010 15:09:21 +0000 (16:09 +0100)]
llvmpipe: Minor cleanup to the interpolator.
José Fonseca [Wed, 2 Jun 2010 15:00:40 +0000 (16:00 +0100)]
gallivm: Add a lp_build_const_elem().
José Fonseca [Wed, 2 Jun 2010 15:00:15 +0000 (16:00 +0100)]
llvmpipe: Store often used LLVM types in the lp_build_context.
José Fonseca [Wed, 2 Jun 2010 12:22:38 +0000 (13:22 +0100)]
gallivm: Zero min_lod and max_lod when only one view is selected and min/mag filter are equal.
José Fonseca [Wed, 2 Jun 2010 12:08:30 +0000 (13:08 +0100)]
gallivm: Make lp_build_sample_wrap_int usage more accurate.
Fixes mesa texwrap demo border with GL_CLAMP.
José Fonseca [Wed, 2 Jun 2010 11:51:38 +0000 (12:51 +0100)]
gallivm: Don't use reciprocate in lp_build_sample_wrap_linear().
Always clamp the scaled coordinates.
José Fonseca [Wed, 2 Jun 2010 10:25:27 +0000 (11:25 +0100)]
gallivm: Avoid fp arithmetic in lp_build_sample_wrap_nearest().
José Fonseca [Wed, 2 Jun 2010 09:57:27 +0000 (10:57 +0100)]
gallivm: Don't use lp_build_sample_wrap_nearest()
Always clamp with scaled coordinates.
José Fonseca [Wed, 2 Jun 2010 08:56:05 +0000 (09:56 +0100)]
llvmpipe: Centralize all position interpolation in lp_bld_interp.c.
Marek Olšák [Wed, 2 Jun 2010 05:00:37 +0000 (07:00 +0200)]
r300g: use the stored GEM domain in add_buffer/write_reloc
I admit blitting to/from GTT is actually enforced in this commit,
texture transfers are now damned fast!
Marek Olšák [Wed, 2 Jun 2010 04:45:00 +0000 (06:45 +0200)]
r300g: store the GEM domain in buffer and texture structs
Marek Olšák [Wed, 2 Jun 2010 04:25:02 +0000 (06:25 +0200)]
r300g: use r300_buffer_domain everywhere
Marek Olšák [Wed, 2 Jun 2010 04:07:53 +0000 (06:07 +0200)]
r300g: blit directly to/from GTT when transfering textures
Marek Olšák [Wed, 2 Jun 2010 03:50:58 +0000 (05:50 +0200)]
r300g: let the driver determine the GEM domain for buffer_create
Marek Olšák [Wed, 2 Jun 2010 01:49:43 +0000 (03:49 +0200)]
r300g: make texture transfers more pipelined
Mostly based on Michel Dänzer's patch.
Marek Olšák [Tue, 1 Jun 2010 22:49:24 +0000 (00:49 +0200)]
r300g: better describe another flush and move it closer to the real problem
I haven't been able to get rid of this one, see the comments in the code.
Marek Olšák [Tue, 1 Jun 2010 22:44:09 +0000 (00:44 +0200)]
r300g: remove one flush
Looks like it's not needed now.
José Fonseca [Tue, 1 Jun 2010 20:29:01 +0000 (21:29 +0100)]
llvmpipe: Obey color interpolation.
Don't force color to be linearly interpolated when that's not being
requested.
José Fonseca [Tue, 1 Jun 2010 20:27:18 +0000 (21:27 +0100)]
llvmpipe: Use struct lp_shader_input in the interpolator.
Eliminates all this identical yet slightly different code to decide how
shader inputs should be interpolated.
As bonus, don't interpolate the position twice when it is listed in the
TGSI shader inputs.
Kristian Høgsberg [Tue, 1 Jun 2010 18:33:43 +0000 (14:33 -0400)]
intel: Fallback to meta if we're asked to CopyTexImage2D from RGB to RGBA
The pixel transfer rules state that we must set alpha to 1.0 in this case
which we can't easily do with the blitter. We can do to passes: one that
sets the alpha to 0xff and one that copies the RGB bits or we can just
use the 3D engine. Neither approach seems worth it for this case.
Thomas Hellstrom [Mon, 31 May 2010 19:34:59 +0000 (20:34 +0100)]
st/xorg, vmware: Make throttling configurable.
The xorg state tracker gets two new options to let the user choose
whether to enable / disable dirty throttling and swapbuffer throttling.
The default value of these options are enabled, unless the winsys
supplies a customizer with other values. The customizer record has been
extended to allow this, and also to set winsys-based throttling on a per-
context basis.
The vmware part of this patch disables the dirty throttling if the kernel
supports command submission throttling, and also in that case sets kernel
based throttling for everything but swapbuffers. The vmware winsys does not
set throttling per context, even if it theoretically could, but instead
sets throttling per screen. This should perhaps be changed, should the
xorg state tracker start to use multiple rendering contexts. Kernel throttling
is off by default for all new screens/contexts, so the dri state tracker
is not affected.
This significantly improves interactivity of the vmware xorg driver.
Cherry-picked from commit
a8f3b3f88acc1f0193fa740e76e9d815f07f32ab
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Thomas Hellstrom [Mon, 31 May 2010 21:03:56 +0000 (22:03 +0100)]
svga: Add a winsys callback to get the svga_winsys_context
The winsys may need to extract the svga_winsys_context from a
pipe_context. Add a function to enable that functionality.
Cherry-picked from commit
e8a8c5e339dfd7a36bb6435fd34175482b9187b8
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
José Fonseca [Tue, 1 Jun 2010 15:37:32 +0000 (16:37 +0100)]
tgsi: Drop uses_fogcoord and uses_frontfacing from tgsi_scan.
It was not used anywhere; the code was buggy (it didn't take care of
indirect registers and could potential cause buffer underflows) and the
same effect can now be easily achieved by just by looking at
input_semantic_name[] and input_usage_mask[].
José Fonseca [Tue, 1 Jun 2010 15:30:24 +0000 (16:30 +0100)]
tgsi: Remove tgsi-instruction-set.txt.
Deprecated by tgsi.rst, and no point in keeping it around if it's not
being updated.
José Fonseca [Tue, 1 Jun 2010 15:28:45 +0000 (16:28 +0100)]
llvmpipe: Don't waste time interpolating unused input channels.
José Fonseca [Tue, 1 Jun 2010 15:27:36 +0000 (16:27 +0100)]
tgsi: Determine which shader input channels are effectively.
TGSI's UsageMask flag is never set. We can move this logic into
tgsi_ureg, but there there are still cases where's not used, so this
seems a better place for now.
José Fonseca [Tue, 1 Jun 2010 15:25:05 +0000 (16:25 +0100)]
gallium/docs: Update FRAC -> FRC.
Brian Paul [Tue, 1 Jun 2010 15:02:07 +0000 (09:02 -0600)]
mesa: use split_location_offset() in GetUniform() functions
Commit
5d0e136eff54a34258b5adaeda4cb267831e8234 exposed a long-standing
bug in the glGetUniform*() code paths. We weren't properly decoding
the location parameter.
Fixes fd.o bug/regression 28344
Note: this patch should go into the 7.8 branch after the above-mentioned
commit.
Thomas Hellstrom [Sat, 13 Mar 2010 19:25:29 +0000 (20:25 +0100)]
st/xorg: Fix Xv cliprect scaling.
Due to a quantization error, different cliprects of scaled video windows may
not have identical x / y scale.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Thomas Hellstrom [Sat, 6 Mar 2010 14:48:48 +0000 (15:48 +0100)]
st/xorg Avoid advertizing rotation / reflection support.
We don't support it yet since we don't implement the shadow allocate
functions.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Chia-I Wu [Mon, 31 May 2010 23:30:50 +0000 (07:30 +0800)]
vgapi: Generate PIC objects.
Fixes "...; recompile with -fPIC" error on x86-64. See fdo 28336.
José Fonseca [Mon, 31 May 2010 21:11:38 +0000 (22:11 +0100)]
glapi: Generate PIC objects.
Fixes fdo 28336.
José Fonseca [Mon, 31 May 2010 19:01:29 +0000 (20:01 +0100)]
llvmpipe: Show fs's TGSI when LP_DEBUG=tgsi is set.
Chia-I Wu [Mon, 31 May 2010 11:59:57 +0000 (19:59 +0800)]
st/egl: Use stamps only to avoid unnecessary geometry update.
resource_surface_add_resources should still be called even when the
stamps match. For example, a caller may ask for two different sets of
attachments.
Chia-I Wu [Mon, 31 May 2010 09:35:02 +0000 (17:35 +0800)]
mesa: Fix excess initializers in get.c table.
Dave Airlie [Sun, 23 May 2010 12:10:04 +0000 (22:10 +1000)]
swrast: add TFP support to swrast.
This adds TFP support to the swrast driver, with this I can run gnome-shell inside Xephyr slowly. I've no idea why I did it, and g-s has other rendering issues under swrast, but it might be useful to hook up llvmpipe later. I've no idea if I even want to commit it at this point.
An enhanced version might just pass the pointer in the indirect rendering case
and avoid the memcpy.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 31 May 2010 09:24:50 +0000 (19:24 +1000)]
gallium: fix TFP on gallium
This fixes an uninitialised value use in the dri2 st when doing TFP.
It uses the driContextPriv which isn't initialised at alloc time.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chia-I Wu [Mon, 31 May 2010 08:51:10 +0000 (16:51 +0800)]
st/egl: Update KMS backend to use resource_surface.
Chia-I Wu [Mon, 31 May 2010 08:19:00 +0000 (16:19 +0800)]
st/egl: Update GDI backend to use resource_surface.
Chia-I Wu [Mon, 31 May 2010 07:58:23 +0000 (15:58 +0800)]
st/egl: Update ximage backend to use resource_surface.
Chia-I Wu [Mon, 31 May 2010 07:26:46 +0000 (15:26 +0800)]
st/egl: Add helper functions for use by backends.
There is only resource_surface for now. It helps manage the resources
of a software-based native surface such as XImage or GDI.
Chris Wilson [Mon, 31 May 2010 08:58:25 +0000 (09:58 +0100)]
intel: Initialize batch->reserved_space on allocation
Fixes the assert (and buffer overrun):
glknots: intel_batchbuffer.c:164: _intel_batchbuffer_flush: Assertion
'used >= batch->buf->size' failed.
Reported in bug:
Bug 28274 - xscreensaver's glknots hangs GPU (945GME/Pineview)
https://bugs.freedesktop.org/show_bug.cgi?id=28274
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chia-I Wu [Mon, 31 May 2010 04:38:44 +0000 (12:38 +0800)]
targets/egl: Add SConscript for egl-apis.
It will build api_OpenVG.dll on Windows.
Chia-I Wu [Mon, 31 May 2010 04:38:21 +0000 (12:38 +0800)]
st/vega: Use SConscript for Windows build.
Fix several portability issues and add SConscript for Windows build.
Chia-I Wu [Mon, 31 May 2010 05:01:46 +0000 (13:01 +0800)]
gallium/util: Define isfinite and isnan for MSVC.
Define isfinite and isnan to _finite and _isnan respectively for MSVC.
Those macros are needed by st/vega.
Chia-I Wu [Mon, 31 May 2010 04:37:23 +0000 (12:37 +0800)]
mapi/vgapi: Add SConscript for Windows build.
Chia-I Wu [Mon, 31 May 2010 04:32:30 +0000 (12:32 +0800)]
st/egl: Use OS-specific module suffices.
At least, .dll is used on Windows.
Chia-I Wu [Mon, 31 May 2010 04:17:27 +0000 (12:17 +0800)]
targets/egl: Add SConscript for egl_gdi_swrast.
egl_gdi_swrast uses st/egl/gdi and winsys/sw/gdi to provide an EGL
driver for Windows.
Chia-I Wu [Mon, 31 May 2010 04:03:39 +0000 (12:03 +0800)]
st/egl: Add GDI backend.
The backend uses Windows GDI driver to provide a software EGL
implementation on Windows.