Commit graph

40870 commits

Author SHA1 Message Date
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
Kristian Høgsberg
a889f9ee5c i965: Don't write mrf assignment for pointsize output
https://bugs.freedesktop.org/show_bug.cgi?id=31894
2010-11-24 11:27:43 -05:00
Thomas Hellstrom
f20a219e9e gallium/targets/xorg-vmwgfx: Xv fixes
Make sure regions are properly updated and that the colorkey painting is
flushed before we update the HW overlay.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-24 15:23:10 +01:00
Thomas Hellstrom
0b1c0460a0 st/xorg: Add a function to flush pending rendering and damage
This is needed to properly sync with host side rendering. For example,
make sure we flush colorkey painting before updating the overlay.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-24 15:23:10 +01:00
Chia-I Wu
1f4c55128b egl_dri2: Fix one context, multiple surfaces.
When a context was made current to another surface, the old code did
this

  dri2_dpy->core->bindContext(cctx, ddraw, rdraw);
  dri2_dpy->core->unbindContext(old_cctx);

and there will be no current context due to the second line.

unbindContext should be called only when bindContext is not.  This fixes
a regression since d19afc57.  Thanks to Neil Roberts for noticing the
issue and creating a test case.
2010-11-24 14:06:30 +08:00
Ian Romanick
78a340fd48 i915: Disallow alpha, red, RG, and sRGB as render targets
Fixes bugzilla #31832

NOTE: This is a candidate for the 7.9 branch.
2010-11-23 18:42:04 -08:00
Brian Paul
903ead0b26 glsl: start restoring some geometry shader code 2010-11-23 17:23:42 -07:00
Brian Paul
6162773ea4 glsl: better handling of linker failures
Upon link error, exit translation loop, free program instructions.
Check for null pointers in calling code.
2010-11-23 17:18:48 -07:00
Brian Paul
2900e56f9d mesa: use gl_shader_type enum 2010-11-23 17:00:08 -07:00
Brian Paul
c628fd743e mesa: replace #defines with new gl_shader_type enum 2010-11-23 15:52:43 -07:00
Brian Paul
512f840702 mesa: _mesa_valid_register_index() to validate register indexes 2010-11-23 15:52:43 -07:00
Brian Paul
b8dacaf174 mesa: rename, make _mesa_register_file_name() non-static
Plus remove unused parameter.
2010-11-23 15:52:42 -07:00
Brian Paul
caf974c525 glsl: use gl_register_file in a few places 2010-11-23 15:52:42 -07:00
Brian Paul
50fd99d172 glsl: fix off by one in register index assertion 2010-11-23 15:52:42 -07:00
Alex Deucher
ed8b5fb24e gallium/egl: fix r300 vs r600 loading
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=31841
2010-11-23 15:18:31 -05:00