Commit graph

40964 commits

Author SHA1 Message Date
Christoph Bumiller
4a06248281 d3d1x: set flatshade_first in rasterizer state
D3D10 specifies the first vertex as the leading/provoking one.
2011-09-17 12:09:03 +02:00
Christoph Bumiller
e27d72d6c3 d3d1x: initialize point size and line width to 1
Otherwise lines would never be visible since the width cannot be
specified in D3D10.
Wireframe mode is also affected by line width.
2011-09-17 12:07:42 +02:00
Tom Stellard
e945fb04d0 r300/compiler: Add support for the output modifier (OMOD) 2011-09-16 17:35:46 -07:00
Tom Stellard
1e5aaaa138 r300/compiler: Move some helper functions to radeon_compiler_util.c 2011-09-16 17:19:56 -07:00
Tom Stellard
96620d2275 r300/compiler: Don't unroll loops that conditionally increment the counter 2011-09-16 17:19:56 -07:00
Vinson Lee
79b162ba45 nouveau: Fix typos of ParseSourceList in SConscript files.
Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-09-16 14:07:20 -07:00
Brian Paul
88625e6e65 scons: fix incorrect test for embedded build
This was missed back in commit 4175010749.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-16 10:13:14 -06:00
Marek Olšák
34f4bd8190 winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM
so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.
2011-09-16 17:25:12 +02:00
Brian Paul
81c688babe softpipe: use pipe_get_tile_rgba_format()
Pass an explicit surface format as we do with pipe_put_tile_rgba_format().
This fixes the piglit fbo-srgb-blit test.  With GL_EXT_framebuffer_sRGB we
override the resource's format with an explicit format (linear vs. sRGB).
We need to do so both when getting and putting tiles.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40402

Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-09-16 07:38:53 -06:00
Brian Paul
89999204ec softpipe: use util_format_is_depth_or_stencil()
Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-09-16 07:38:53 -06:00
Dave Airlie
2b47d2bce1 r600g: fixup missing scaled r600 types.
I was still missing a couple of types on r600/r700 codepaths.

Fixes these up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 14:09:16 +01:00
Dave Airlie
f2bae9456f r600g: interpret integer texture types as ints.
For signed/unsigned with no normalisation or srgb, assume its an INT
type texture.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:26:57 +01:00
Dave Airlie
2dfabdd0a4 r600g: take constantly interpolated values into a/c
We could constant interpolated values now and set have_perspective
if nothing else is set to avoid a GPU hang.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:26:57 +01:00
Dave Airlie
21c5607e64 r600g: add flat non-interpolation support.
TGSI CONSTANT interpolation is just flat, and we just read the values
direct from the LDS into the GPR without doing any interpolation on them.

This is needed to pass integer types into the fragment shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Dave Airlie
de3218664a r600g: set number type correctly for color buffers.
If we get a scaled type assume its a real integer type (as textures are).

Also fixup the blend bypass and blend clamp flags on evergreen as per the
docs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Dave Airlie
b205f53c7f r600g: add missing formats to color buffer setup.
just playing with EXT_texture_integer, and this was first bug.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Brian Paul
3edbce32fb softpipe: use consistent indentation in sp_quad_blend.c 2011-09-15 16:18:14 -06:00
Tobias Droste
1795372fee gallivm: fix build with LLVM 3.0svn
LLVM 3.0svn added SubtargetInfo as additional parameter to
createMCDisassembler() and createMCInstPrinter().
See revision 139237 of LLVM.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-15 15:53:04 -06:00
Eugeni Dodonov
72e0a9226d Change strerror(ret) to strerror(-ret). 2011-09-15 15:12:02 -03:00
Brian Paul
a7109a3199 softpipe: fix blending for luminance/intensity surfaces
If we're drawing to a luminance, luminance/alpha or intensity surface
we have to adjust (rebase) the fragment/quad colors before writing them
to the tile cache.  The tile cache always stores RGBA colors but if
we're caching a L/A surface (for example) we need to be sure that R=G=B
so that subsequent reads from the surface cache appear to return L/A

We previously had a special case for RGB (no alpha) surfaces.  This
change generalizes that for the other base formats.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40408, but sRGB
formats are still failing.  That'll be addressed in a later patch.
2011-09-15 11:31:55 -06:00
Brian Paul
ba6f1f2c29 util: add util_format_is_luminance/intensity/rgb(), etc
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-15 11:31:55 -06:00
Jørgen Lind
0763b978ee wayland: Flush before blocking in swapbuffers.
Make sure that we've sent the frame request that we're going to block on.
2011-09-15 11:53:39 -04:00
Brian Paul
6fd6efa7bf mesa: fix error handling for dlist image unpacking
When compiling glDrawPixels, glTexImage(), etc. and we're copying
the user's image we need to be careful about GL error checking.
Previously, we were incorrectly generating GL_OUT_OF_MEMORY in
unpack_image() if width <= 0 or height <= 0 or for invalid format/type
values.  We now check those arguments in unpack_image() and return NULL
if there's a bad value.  The command will get compiled with the
arguments as-is and image=NULL.  Later, when the command is executed the
correct errors will be generated.

This issue was reported by Yuanhan Liu <yuanhan.liu@linux.intel.com>

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-09-15 09:39:13 -06:00
Brian Paul
b0524e49fc st/mesa: rewrap a long line 2011-09-15 09:05:15 -06:00
Brian Paul
4e58e56f6f mesa: add missing ')' in error message 2011-09-15 08:02:57 -06:00
Dave Airlie
41f3773c1d uniforms: accept all int/unsigned int sampler types in uniform checks.
I'm not 100% sure about this, it may need a version check or it might
be completely wrong.

added multisample ones as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-15 09:33:45 +01:00
Paul Berry
00792e3586 glsl: Remove field array_lvalue from ir_variable.
The array_lvalue field was attempting to enforce the restriction that
whole arrays can't be used on the left-hand side of an assignment in
GLSL 1.10 or GLSL ES, and can't be used as out or inout parameters in
GLSL 1.10.

However, it was buggy (it didn't work properly for built-in arrays),
and it was clumsy (it unnecessarily kept track on a
variable-by-variable basis, and it didn't cover the GLSL ES case).

This patch removes the array_lvalue field completely in favor of
explicit checks in ast_parameter_declarator::hir() (this check is
added) and in do_assignment (this check was already present).

This causes a benign behavioral change: when the user attempts to pass
an array as an out or inout parameter of a function in GLSL 1.10, the
error is now flagged at the time the function definition is
encountered, rather than at the time of invocation.  Previously we
allowed such functions to be defined, and only flagged the error if
they were invoked.

Fixes Piglit tests
spec/glsl-1.10/compiler/qualifiers/fn-{out,inout}-array-prohibited*
and
spec/glsl-1.20/compiler/assignment-operators/assign-builtin-array-allowed.vert.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-14 10:58:56 -07:00
Michel Dänzer
373234ce17 r600g: Initialize multi VGT related register on Cayman.
Prevents lockups with piglit tests draw-elements and draw-vertices using large
numbers of vertices.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alex.deucher@amd.com>
2011-09-14 18:40:16 +02:00
Michel Dänzer
d8c443ddde glx/dri2: Don't call X server for SwapBuffers when there's no back buffer.
As already done in dri2CopySubBuffer().

Should fix:

https://bugs.freedesktop.org/show_bug.cgi?id=36371
https://bugs.freedesktop.org/show_bug.cgi?id=40533

Might fix:

https://bugs.freedesktop.org/show_bug.cgi?id=32589

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-09-14 18:40:16 +02:00
Andrew Deason
48510d6856 DRI: Log something if we don't support legacy DRI
If we are called via the legacy DRI interface, and we don't support
legacy DRI (InitScreen is NULL), print a debug message, so it is easy
to see why the driver fails to initialize.

See https://bugs.freedesktop.org/show_bug.cgi?id=40437
2011-09-14 18:39:45 +02:00
Andrew Deason
45e0a7a51d GLX: Say something if we cannot connect via DRI2
See https://bugs.freedesktop.org/show_bug.cgi?id=40437
2011-09-14 18:37:48 +02:00
Christoph Bumiller
7744e867b7 nvc0: implement resource_resolve 2011-09-14 18:30:53 +02:00
José Fonseca
9cae933f4a llvmpipe: Remove dead lp_tile_shuffle_mask.py script.
Broken, and we now shuffle tiles with pack/unpack instructions, instead
of shuffle masks.
2011-09-14 16:48:17 +01:00
Christoph Bumiller
d2d19ea51f nv50/ir: add missing license headers 2011-09-14 16:50:23 +02:00
Brian Paul
ec4b823f67 st/mesa: fix/update comment on st_translate_color() 2011-09-14 08:32:30 -06:00
Christoph Bumiller
c57c7a86ae nvc0: emit tessellation mode and patch size in TCP/TEP validation 2011-09-14 16:19:52 +02:00
Christoph Bumiller
d53c49bcd4 nv50,nvc0: handle PIPE_CAP_MIN/MAX_TEXEL_OFFSET 2011-09-14 16:19:52 +02:00
Christoph Bumiller
2dc6f74077 nvc0: remove old shader backend files 2011-09-14 16:19:52 +02:00
Christoph Bumiller
3afabfb929 nvc0: hook up to new shader code generator
Also includes loading of shared shader library code (used for f64
and integer division) and setting up the immediate array buffer
which is appended to the code.
2011-09-14 16:19:52 +02:00
Christoph Bumiller
57594065c3 nv50/ir: import new shader backend code 2011-09-14 16:19:52 +02:00
Christoph Bumiller
a42eca84c5 nvc0: prevent interruption of m2mf push
M2MF will trap if the data stream is interrupted by a QUERY fence
and report too much or not enough data.
2011-09-14 16:19:52 +02:00
Christoph Bumiller
150bb0fb34 nouveau: make data argument of nouveau_context::push_data const 2011-09-14 16:19:51 +02:00
Brian Paul
ec22b75be1 softpipe: implement blend color clamping
Per the GL spec, clamp incoming colors prior to blending depending on
whether the destination buffer stores normalized (non-float) values.
Note that the constant blend color needs to be clamped too (we always
get the unclamped color from Mesa).

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412
2011-09-14 08:15:59 -06:00
Brian Paul
4fc50d4570 mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()
Add a comment and reformat to be under 80 columns.
2011-09-14 08:15:59 -06:00
Brian Paul
4d21ecde77 mesa: white space, comment fixes in mtypes.h
"vale" was a typo.  Fix that and do some other minor clean-ups.
2011-09-14 08:15:59 -06:00
Emeric Grange
e911dbb563 st/vdpau: Preliminary support for timestamped output surface into the presentation queue
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:29 +02:00
Emeric Grange
6cf0581159 st/vdpau: Output surfaces that are too large to fit into the display target will be clipped
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
85534e6f48 st/vdpau: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
fa2a8316ce st/vdpau: Add documentation from the VDPAU API and update some traces
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
c24bc6f868 st/vdpau: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00