Commit Graph

35159 Commits

Author SHA1 Message Date
Brian Paul
7a156476e4 glsl: fix bad sanity-check assertion 2010-06-02 15:34:49 -06:00
Brian Paul
23c5b21c16 mesa: whitespace and 80 column wrapping 2010-06-02 15:34:49 -06:00
Eric Anholt
84db95bfcd 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.
2010-06-02 14:06:41 -07:00
José Fonseca
a33b5ef7d0 llvmpipe: Fix bad logic.
Courtesy of Vinson and coverity.
2010-06-02 21:32:49 +01:00
Vinson Lee
fae7bee475 llvmpipe: Remove unnecessary header. 2010-06-02 12:09:23 -07:00
José Fonseca
92cbbba7fb llvmpipe: Fix typo in assert. 2010-06-02 20:00:30 +01:00
José Fonseca
ead58101f9 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.
2010-06-02 18:43:35 +01:00
José Fonseca
5871b7ebc9 llvmpipe: Minor cleanup to the interpolator. 2010-06-02 16:09:21 +01:00
José Fonseca
952d188c3c gallivm: Add a lp_build_const_elem(). 2010-06-02 16:00:40 +01:00
José Fonseca
21a6bf8624 llvmpipe: Store often used LLVM types in the lp_build_context. 2010-06-02 16:00:15 +01:00
José Fonseca
baf4393105 gallivm: Zero min_lod and max_lod when only one view is selected and min/mag filter are equal. 2010-06-02 13:24:26 +01:00
José Fonseca
804e76ac4f gallivm: Make lp_build_sample_wrap_int usage more accurate.
Fixes mesa texwrap demo border with GL_CLAMP.
2010-06-02 13:24:26 +01:00
José Fonseca
a37de72967 gallivm: Don't use reciprocate in lp_build_sample_wrap_linear().
Always clamp the scaled coordinates.
2010-06-02 13:24:26 +01:00
José Fonseca
6463dcbc01 gallivm: Avoid fp arithmetic in lp_build_sample_wrap_nearest(). 2010-06-02 13:24:25 +01:00
José Fonseca
e3d3f30440 gallivm: Don't use lp_build_sample_wrap_nearest()
Always clamp with scaled coordinates.
2010-06-02 13:24:25 +01:00
José Fonseca
147dc2354c llvmpipe: Centralize all position interpolation in lp_bld_interp.c. 2010-06-02 13:24:25 +01:00
Marek Olšák
53beea574f 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!
2010-06-02 07:09:51 +02:00
Marek Olšák
b6b76cbb20 r300g: store the GEM domain in buffer and texture structs 2010-06-02 07:01:08 +02:00
Marek Olšák
bb45a15168 r300g: use r300_buffer_domain everywhere 2010-06-02 06:26:15 +02:00
Marek Olšák
19498be935 r300g: blit directly to/from GTT when transfering textures 2010-06-02 06:07:53 +02:00
Marek Olšák
37f3454eb3 r300g: let the driver determine the GEM domain for buffer_create 2010-06-02 06:01:22 +02:00
Marek Olšák
ae3063066c r300g: make texture transfers more pipelined
Mostly based on Michel Dänzer's patch.
2010-06-02 04:59:00 +02:00
Marek Olšák
d614541d52 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.
2010-06-02 04:59:00 +02:00
Marek Olšák
9f8dbd3396 r300g: remove one flush
Looks like it's not needed now.
2010-06-02 04:59:00 +02:00
José Fonseca
489f637741 llvmpipe: Obey color interpolation.
Don't force color to be linearly interpolated when that's not being
requested.
2010-06-01 21:30:57 +01:00
José Fonseca
6ce68ad3ca 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.
2010-06-01 21:30:57 +01:00
Kristian Høgsberg
c7c64d9783 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.
2010-06-01 14:33:43 -04:00
Thomas Hellstrom
d12f2bb9c0 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>
2010-05-31 22:34:59 +01:00
Thomas Hellstrom
cd151effe6 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>
2010-05-31 22:34:59 +01:00
José Fonseca
056ae405b6 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[].
2010-06-01 16:39:04 +01:00
José Fonseca
2c67e754cf tgsi: Remove tgsi-instruction-set.txt.
Deprecated by tgsi.rst, and no point in keeping it around if it's not
being updated.
2010-06-01 16:39:04 +01:00
José Fonseca
149cb7682e llvmpipe: Don't waste time interpolating unused input channels. 2010-06-01 16:39:03 +01:00
José Fonseca
abe4f3d1aa 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.
2010-06-01 16:39:03 +01:00
José Fonseca
d9c6ebb4fe gallium/docs: Update FRAC -> FRC. 2010-06-01 16:39:03 +01:00
Brian Paul
1bbf803e3b mesa: use split_location_offset() in GetUniform() functions
Commit 5d0e136eff 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.
2010-06-01 09:02:10 -06:00
Thomas Hellstrom
7356d1c140 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>
2010-05-31 18:33:09 +01:00
Thomas Hellstrom
195c476f9f 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>
2010-05-31 18:33:05 +01:00
Chia-I Wu
79e5bea3cb vgapi: Generate PIC objects.
Fixes "...; recompile with -fPIC" error on x86-64.  See fdo 28336.
2010-06-01 07:33:29 +08:00
José Fonseca
4e6c880ea2 glapi: Generate PIC objects.
Fixes fdo 28336.
2010-05-31 22:11:38 +01:00
José Fonseca
524ec6464d llvmpipe: Show fs's TGSI when LP_DEBUG=tgsi is set. 2010-05-31 21:58:38 +01:00
Chia-I Wu
a27690931b 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.
2010-05-31 20:06:59 +08:00
Chia-I Wu
593cf8b54c mesa: Fix excess initializers in get.c table. 2010-05-31 17:37:42 +08:00
Dave Airlie
8d789be034 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>
2010-05-31 19:28:08 +10:00
Dave Airlie
47de9adece 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>
2010-05-31 19:28:08 +10:00
Chia-I Wu
7ede18abac st/egl: Update KMS backend to use resource_surface. 2010-05-31 17:03:58 +08:00
Chia-I Wu
e4400a48a6 st/egl: Update GDI backend to use resource_surface. 2010-05-31 17:03:58 +08:00
Chia-I Wu
f38a20b461 st/egl: Update ximage backend to use resource_surface. 2010-05-31 17:03:58 +08:00
Chia-I Wu
e1e0307c91 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.
2010-05-31 17:03:58 +08:00
Chris Wilson
8accf0a891 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>
2010-05-31 09:58:25 +01:00
Chia-I Wu
636f7becfd targets/egl: Add SConscript for egl-apis.
It will build api_OpenVG.dll on Windows.
2010-05-31 13:28:03 +08:00