Commit graph

40884 commits

Author SHA1 Message Date
Eric Anholt
d56c97413e glsl: Quiet unreachable no-return-from-function warning. 2010-11-30 13:29:28 -08:00
Zack Rusin
b22d65e9fc scons: add alias for identity 2010-11-30 16:13:11 -05:00
Eric Anholt
ff79633d9f glsl: Fix structure and array comparisions.
We were trying to emit a single ir_expression to compare the whole
thing.  The backends (ir_to_mesa.cpp and brw_fs.cpp so far) expected
ir_binop_any_nequal or ir_binop_all_equal to apply to at most a vector
(with matrices broken down by the lowering pass).  Break them down to
a bunch of ORed or ANDed any_nequals/all_equals.

Fixes:
glsl-array-compare
glsl-array-compare-02
glsl-fs-struct-equal
glsl-fs-struct-notequal
Bug #31909
2010-11-30 11:42:42 -08:00
Eric Anholt
6b937465d4 glsl: Add a helper constructor for expressions that works out result type.
This doesn't cover all expressions or all operand types, but it will
complain if you overreach and it allows for much greater slack on the
programmer's part.
2010-11-30 11:23:24 -08:00
Keith Whitwell
68a4f63247 llvmpipe: shortcircuit some calls to set_scene_state 2010-11-30 12:01:29 +00:00
Keith Whitwell
d9169364d4 llvmpipe: remove misleading debug string 2010-11-30 12:01:29 +00:00
Keith Whitwell
2d31f048ce llvmpipe: raise dirty flag on transfers to bound constbuf
Need this to trigger the scene to update its shadow of the constant
state.
2010-11-30 12:01:29 +00:00
José Fonseca
31aeac5bf9 wgl: More complete WGL_ARB_pbuffer support. 2010-11-30 10:49:08 +00:00
José Fonseca
c4a43873c5 wgl: Stub WGL_ARB_pbuffer support.
See http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt
2010-11-30 10:47:49 +00:00
José Fonseca
af6407a500 scons: Alias for svga 2010-11-30 10:47:26 +00:00
José Fonseca
7bbf675b88 svga: Use consistent hexadecimal representation on debug output. 2010-11-30 10:45:31 +00:00
Marek Olšák
80f24c1575 util: rename u_mempool -> u_slab 2010-11-30 10:12:26 +01:00
Zack Rusin
5572805423 gallivm: fix storing of the addr register
we store into the index specified by the register index, not an
indirect register.
2010-11-30 02:01:43 -05:00
Eric Anholt
001eee52d4 glsl: Make the symbol table's add_variable just use the variable's name. 2010-11-29 17:08:27 -08:00
Eric Anholt
e8f5ebf313 glsl: Make the symbol table's add_function just use the function's name. 2010-11-29 17:08:27 -08:00
Eric Anholt
2927b6c212 i965: Fix type of gl_FragData[] dereference for FB write.
Fixes glsl-fs-fragdata-1, and hopefully Eve Online where I noticed
this bug in the generated shader.  Bug #31952.
2010-11-29 17:08:26 -08:00
Adam Jackson
1ccef926be drivers/x11: unifdef XFree86Server
This code was for the old GLcore build of the software rasteriser.  The
X server switched to a DRI driver for software indirect GLX long ago.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-29 17:37:54 -05:00
Marek Olšák
e5aa69f6a6 st/mesa: fix texture border color for RED and RG base formats
The spec says the border color should be consistent with the internal
format.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-29 17:26:40 +01:00
pontus lidman
b1097607db mesa: check for posix_memalign() errors
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-29 09:20:41 -07:00
Dave Airlie
a7cb673aa1 r600g: it looks like r600 can handle dword offsets in the indices.
Tested with piglit + ut2004 still seems to render okay (and it
definitely does this)
2010-11-29 11:38:24 +10:00
Marek Olšák
5d4d8b6205 u_blitter: interpolate clear color using a GENERIC varying instead of COLOR
There are also some u_simple_shaders changes.

On r300, the TGSI_SEMANTIC_COLOR varying is a fixed-point number clamped
to the range [0,1] and limited to 12 bits of precision. Therefore we can't
use it for passing through a clear color in order to clear high precision
texture formats.

This also makes u_blitter use only one vertex shader instead of two.
2010-11-28 17:45:39 +01:00
Henri Verbeet
c6ea4c0e8a r600g: Fix the PIPE_FORMAT_A8_UNORM color swap for Evergreen as well. 2010-11-27 17:40:47 +01:00
Henri Verbeet
7a4599c6f5 r600g: Fix the PIPE_FORMAT_L8A8_UNORM color swaps. 2010-11-27 17:40:47 +01:00
Mathias Fröhlich
c3602ff5ed st/mesa: Set PIPE_TRANSFER_DISCARD for GL_MAP_INVALIDATE_RANGE/BUFFFER_BIT
Signed-off-by: Brian Paul <brianp@vmware.com>

Note: this is a candidate for the 7.9 branch.
2010-11-26 14:03:42 -07:00
Brian Paul
97ae4dad1c st/mesa: fix mapping of zero-sized buffer objects
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31934
2010-11-26 13:48:49 -07:00
Thomas Hellstrom
5822484510 xorg/vmwgfx: Don't clip video to viewport
Since the viewport is not updated on RandR12 mode switches anymore,
clipping to viewport may incorrectly clip away the video.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-26 10:28:01 +01:00
Thomas Hellstrom
28ee7561f9 xorg/vmwgfx: Flush even if we don't autopaint the color key
This may help paint the colorkey before overlay updates in some
situations where the app paints the color key (mainly xine).

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-26 10:27:54 +01:00
Marek Olšák
e6e6fcd3a6 r300/compiler: move util functions to radeon_compiler_util
The compiler seriously needs a cleanup as far as the arrangement of functions
is concerned. It's hard to know whether some function was implemented or not
because there are so many places to search in and it can be anywhere and
named anyhow.
2010-11-26 02:23:13 +01:00
Marek Olšák
ea2f56b490 r300/compiler: add a function for swizzling a mask 2010-11-26 02:23:13 +01:00
Marek Olšák
7c29446232 r300/compiler: remove duplicate function rc_mask_to_swz 2010-11-26 02:23:13 +01:00
Marek Olšák
ae3e58d973 r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction
It looks like the function was originally written for ARB_fragment_program.

NOTE: This is a candidate for the 7.9 branch.
2010-11-26 02:22:59 +01:00
Marek Olšák
2c1de07ddf u_blitter: use PIPE_TRANSFER_DISCARD to prevent cpu/gpu stall
But the driver must be smart here and follow PIPE_TRANSFER_DISCARD,
as it should.
2010-11-25 20:25:53 +01:00
Xavier Chantry
c14a261eb9 nvfx: reset nvfx->hw_zeta
If nvfx_framebuffer prepare and validate were called successively with
fb->zsbuf not NULL and then NULL, nvfx->hw_zeta would contain garbage and
this would cause failures in nvfx_framebuffer_relocate/OUT_RELOC(hw_zeta).

This was triggered by piglit/texwrap 2D GL_DEPTH_COMPONENT24 and caused
first a 'write to user buffer!!' error in libdrm and then worse things.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-11-25 17:04:29 +01:00
Xavier Chantry
049065cdfa nvfx: fb->nr_cbufs <= 1 on nv30
7e1bf94631 changed
PIPE_CAP_MAX_RENDER_TARGETS to 1 on nv30.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-11-25 17:04:02 +01:00
Kenneth Graunke
1eb7a81f2e glsl: Add a virtual as_discard() method.
NOTE: This is candidate for the 7.9 branch.
2010-11-25 03:26:55 -08:00
Kenneth Graunke
a82592de92 glsl: Use do_common_optimization in the standalone compiler.
NOTE: This is a candidate for the 7.9 branch.
2010-11-25 01:21:05 -08:00
Kenneth Graunke
e8a24c65bc glsl: Don't inline function prototypes.
Currently, the standalone compiler tries to do function inlining before
linking shaders (including linking against the built-in functions).
This resulted in the built-in function _prototypes_ being inlined rather
than the actual function definition.

This is only known to fix a bug in the standalone compiler; most
programs should be unaffected.  Still, it seems like a good idea.

NOTE: This is a candidate for the 7.9 branch.
2010-11-25 01:19:53 -08:00
Vinson Lee
2cc79acc1a r300/compiler: Move declaration before code.
Fixes this GCC warning with linux-x86 build.
radeon_pair_regalloc.c: In function ‘compute_live_intervals’:
radeon_pair_regalloc.c:222: warning: ISO C90 forbids mixed declarations and code
2010-11-24 23:03:26 -08:00
Vinson Lee
995de71550 r300/compiler: Move declaration before code.
Fixes this GCC warning with linux-x86 build.
radeon_pair_regalloc.c: In function ‘compute_live_intervals’:
radeon_pair_regalloc.c:221: warning: ISO C90 forbids mixed declarations and code
2010-11-24 23:00:03 -08:00
Chia-I Wu
ba1128db45 st/vega: Fix a typo in EXTENDED_BLENDER_OVER_FUNC.
The typo was introduced by commit
231d5457b2.
2010-11-25 13:34:24 +08:00
Chia-I Wu
c9fb8c3bcf st/vega: No flipping in vg_prepare_blend_surface.
The blend sampler view is addressed with unnormalized coordinates in the
fragment shader.  It should have the same orientation as the surface
does.
2010-11-25 13:33:59 +08:00
Chia-I Wu
37ec090ac9 st/vega: Masks and surfaces should share orientation.
The alpha mask is addressed with unnormalized coordinates in the
fragment shader.  It should have the same orientation as the surface
does.

This fixes "mask" OpenVG demo.
2010-11-25 13:33:59 +08:00
Chia-I Wu
9ea4936a36 st/vega: Fix a crash with empty paths. 2010-11-25 13:32:03 +08:00
Chia-I Wu
3965051dff auxiliary: util_blit_pixels_tex should restore the viewport.
Viewport state should be saved/restored.
2010-11-25 13:32:03 +08:00
Dave Airlie
3b5a3fd8d1 r300g/r600g: bump cache manager timeouts to 1s
On lightsmark on my r500 this drop the bufmgr allocations of the sysprof.
2010-11-25 09:18:19 +10:00
Kenneth Graunke
1197393faa mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.
Previously, the get table listed all three as having custom locations,
yet find_custom_value did not have cases to handle them.

MAX_VARYING_VECTORS does not need a custom location since MaxVaryings is
already stored as float[4] (or vec4).  MaxUniformComponents is stored as
the number of floats, however, so a custom implementation that divides
by 4 is necessary.

Fixes bugs.freedesktop.org #31495.
2010-11-24 14:09:32 -08:00
Peter Clifton
ee88727df8 meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear
This fixes incorrect behaviour when the stencil clear value exceeds
the size of the stencil buffer, for example, when set with:

glClearStencil (~1); /* Set a bit pattern of 111...11111110 */
glClear (GL_STENCIL_BUFFER_BIT);

The clear value needs to be masked by the value 2^m - 1, where m is the
number of bits in the stencil buffer. Previously, we passed the value
masked with 0x7fffffff to _mesa_StencilFuncSeparate which then clamps,
NOT masks the value to the range 0 to 2^m - 1.

The result would be clearing the stencil buffer to 0xff, rather than 0xfe.

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-24 12:14:54 -07:00
Brian Paul
03a4f97a68 x11: remove test_proxy_teximage() function
This was really just for testing purposes.
2010-11-24 12:11:23 -07:00
Brian Paul
74c324fdba mesa: added _mesa_format_image_size64() 2010-11-24 12:11:23 -07:00
Brian Paul
7bfbd88d2c mesa: add assertion and update comment in _mesa_format_image_size() 2010-11-24 12:11:23 -07:00