mesa.git
13 years agost/vega: Add DRAWTEX renderer state.
Chia-I Wu [Fri, 26 Nov 2010 14:56:05 +0000 (22:56 +0800)]
st/vega: Add DRAWTEX renderer state.

This state provides glDrawTex-like function.  It can be used for
vgSetPixels.

Rather than modifying every user of the renderer, this commit instead
modifies renderer_copy_surface to use DRAWTEX or COPY state internally
depending on whether the destination is the framebuffer.

13 years agost/vega: Overhaul renderer with renderer states.
Chia-I Wu [Fri, 26 Nov 2010 14:48:10 +0000 (22:48 +0800)]
st/vega: Overhaul renderer with renderer states.

Renderer states are high-level states to perform specific tasks.  The
renderer is initially in INIT state.  In that state, the renderer is
used for OpenVG pipeline.

This commit adds a new COPY state to the renderer.  The state is used
for copying between two pipe resources using textured drawing.  It can
be used for vgCopyImage, for example.

Rather than modifying every user of the renderer, this commit instead
modifies renderer_copy_texture to use the COPY state internally.

13 years agollvmpipe: Fix build errors on x86.
Chia-I Wu [Wed, 1 Dec 2010 03:21:17 +0000 (11:21 +0800)]
llvmpipe: Fix build errors on x86.

The errors were introduced by
efc82aef35a2aac5d2ed9774f6d28f2626796416.

13 years agodocs: Fix MESA_drm_image typo
Kristian Høgsberg [Tue, 30 Nov 2010 02:04:43 +0000 (21:04 -0500)]
docs: Fix MESA_drm_image typo

13 years agogallivm/llvmpipe: squash merge of the llvm-context branch
Brian Paul [Tue, 30 Nov 2010 23:07:52 +0000 (16:07 -0700)]
gallivm/llvmpipe: squash merge of the llvm-context branch

This branch defines a gallivm_state structure which contains the
LLVMBuilderRef, LLVMContextRef, etc.  All data structures built with
this object can be periodically freed during a "garbage collection"
operation.

The gallivm_state object has to be passed to most of the builder
functions where LLVMBuilderRef used to be used.

Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_state_setup.c

13 years agor300g: fix texture border color once again
Marek Olšák [Mon, 29 Nov 2010 02:40:04 +0000 (03:40 +0100)]
r300g: fix texture border color once again

I made the texwrap test be more thorough and realized that this driver code
had not been quite right. This commit fixes the border color for depth
textures, compressed textures, and 16-bits-per-channel textures
with up to 2 channels (R16, RG16).

NOTE: This is a candidate for the 7.9 branch.

13 years agoglsl/linker: Free any IR discarded by optimization passes.
Kenneth Graunke [Wed, 17 Nov 2010 19:03:57 +0000 (11:03 -0800)]
glsl/linker: Free any IR discarded by optimization passes.

Previously, IR for a linked shader was allocated directly out of the
gl_shader object - meaning all of it lived as long as the shader.

Now, IR is allocated out of a temporary context, and any -live- IR is
reparented/stolen to (effectively) the gl_shader.  Any remaining IR can
be freed.

NOTE: This is a candidate for the 7.9 branch.

13 years agoglsl: Remove anti-built-in hacks from the print visitor.
Kenneth Graunke [Thu, 11 Nov 2010 20:14:02 +0000 (12:14 -0800)]
glsl: Remove anti-built-in hacks from the print visitor.

Now that we only import built-in signatures that are actually used,
printing them is reasonable.

13 years agoglsl: Lazily import built-in function prototypes.
Kenneth Graunke [Thu, 11 Nov 2010 20:11:27 +0000 (12:11 -0800)]
glsl: Lazily import built-in function prototypes.

This makes a very simple 1.30 shader go from 196k of memory to 9k.

NOTE: This -may- be a candidate for the 7.9 branch, as the benefit is
substantial.  However, it's not a simple change, so it may be wiser to
wait for 7.10.

13 years agoglsl: Refactor out cloning of function prototypes.
Kenneth Graunke [Thu, 11 Nov 2010 20:21:27 +0000 (12:21 -0800)]
glsl: Refactor out cloning of function prototypes.

This allows us to reuse some code and will be useful later.

13 years agoglsl: fix matrix type check in ir_algebraic
Aras Pranckevicius [Tue, 30 Nov 2010 21:24:44 +0000 (13:24 -0800)]
glsl: fix matrix type check in ir_algebraic

Fixes glsl-mat-mul-1.

13 years agoglsl: Quiet unreachable no-return-from-function warning.
Eric Anholt [Tue, 30 Nov 2010 21:28:47 +0000 (13:28 -0800)]
glsl: Quiet unreachable no-return-from-function warning.

13 years agoscons: add alias for identity
Zack Rusin [Tue, 30 Nov 2010 21:13:11 +0000 (16:13 -0500)]
scons: add alias for identity

13 years agoglsl: Fix structure and array comparisions.
Eric Anholt [Tue, 30 Nov 2010 19:23:28 +0000 (11:23 -0800)]
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

13 years agoglsl: Add a helper constructor for expressions that works out result type.
Eric Anholt [Wed, 3 Nov 2010 17:21:07 +0000 (10:21 -0700)]
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.

13 years agollvmpipe: shortcircuit some calls to set_scene_state
Keith Whitwell [Tue, 30 Nov 2010 12:00:25 +0000 (12:00 +0000)]
llvmpipe: shortcircuit some calls to set_scene_state

13 years agollvmpipe: remove misleading debug string
Keith Whitwell [Tue, 30 Nov 2010 11:22:46 +0000 (11:22 +0000)]
llvmpipe: remove misleading debug string

13 years agollvmpipe: raise dirty flag on transfers to bound constbuf
Keith Whitwell [Mon, 29 Nov 2010 19:18:54 +0000 (19:18 +0000)]
llvmpipe: raise dirty flag on transfers to bound constbuf

Need this to trigger the scene to update its shadow of the constant
state.

13 years agowgl: More complete WGL_ARB_pbuffer support.
José Fonseca [Mon, 29 Nov 2010 20:53:44 +0000 (20:53 +0000)]
wgl: More complete WGL_ARB_pbuffer support.

13 years agowgl: Stub WGL_ARB_pbuffer support.
José Fonseca [Wed, 5 May 2010 14:14:02 +0000 (15:14 +0100)]
wgl: Stub WGL_ARB_pbuffer support.

See http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt

13 years agoscons: Alias for svga
José Fonseca [Mon, 29 Nov 2010 21:13:38 +0000 (21:13 +0000)]
scons: Alias for svga

13 years agosvga: Use consistent hexadecimal representation on debug output.
José Fonseca [Fri, 26 Nov 2010 17:12:09 +0000 (17:12 +0000)]
svga: Use consistent hexadecimal representation on debug output.

13 years agoutil: rename u_mempool -> u_slab
Marek Olšák [Mon, 29 Nov 2010 22:37:25 +0000 (23:37 +0100)]
util: rename u_mempool -> u_slab

13 years agogallivm: fix storing of the addr register
Zack Rusin [Tue, 30 Nov 2010 07:01:43 +0000 (02:01 -0500)]
gallivm: fix storing of the addr register

we store into the index specified by the register index, not an
indirect register.

13 years agoglsl: Make the symbol table's add_variable just use the variable's name.
Eric Anholt [Fri, 5 Nov 2010 13:11:24 +0000 (06:11 -0700)]
glsl: Make the symbol table's add_variable just use the variable's name.

13 years agoglsl: Make the symbol table's add_function just use the function's name.
Eric Anholt [Fri, 5 Nov 2010 13:08:45 +0000 (06:08 -0700)]
glsl: Make the symbol table's add_function just use the function's name.

13 years agoi965: Fix type of gl_FragData[] dereference for FB write.
Eric Anholt [Tue, 30 Nov 2010 00:16:38 +0000 (16:16 -0800)]
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.

13 years agodrivers/x11: unifdef XFree86Server
Adam Jackson [Mon, 29 Nov 2010 22:37:54 +0000 (17:37 -0500)]
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>
13 years agost/mesa: fix texture border color for RED and RG base formats
Marek Olšák [Mon, 29 Nov 2010 04:46:15 +0000 (05:46 +0100)]
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>
13 years agomesa: check for posix_memalign() errors
pontus lidman [Mon, 29 Nov 2010 16:20:41 +0000 (09:20 -0700)]
mesa: check for posix_memalign() errors

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agor600g: it looks like r600 can handle dword offsets in the indices.
Dave Airlie [Mon, 29 Nov 2010 01:38:24 +0000 (11:38 +1000)]
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)

14 years agou_blitter: interpolate clear color using a GENERIC varying instead of COLOR
Marek Olšák [Sun, 28 Nov 2010 15:59:03 +0000 (16:59 +0100)]
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.

14 years agor600g: Fix the PIPE_FORMAT_A8_UNORM color swap for Evergreen as well.
Henri Verbeet [Sat, 27 Nov 2010 16:29:56 +0000 (17:29 +0100)]
r600g: Fix the PIPE_FORMAT_A8_UNORM color swap for Evergreen as well.

14 years agor600g: Fix the PIPE_FORMAT_L8A8_UNORM color swaps.
Henri Verbeet [Sat, 27 Nov 2010 15:43:57 +0000 (16:43 +0100)]
r600g: Fix the PIPE_FORMAT_L8A8_UNORM color swaps.

14 years agost/mesa: Set PIPE_TRANSFER_DISCARD for GL_MAP_INVALIDATE_RANGE/BUFFFER_BIT
Mathias Fröhlich [Sat, 30 Oct 2010 13:38:39 +0000 (15:38 +0200)]
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.

14 years agost/mesa: fix mapping of zero-sized buffer objects
Brian Paul [Fri, 26 Nov 2010 20:42:23 +0000 (13:42 -0700)]
st/mesa: fix mapping of zero-sized buffer objects

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31934

14 years agoxorg/vmwgfx: Don't clip video to viewport
Thomas Hellstrom [Fri, 26 Nov 2010 09:12:32 +0000 (10:12 +0100)]
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>
14 years agoxorg/vmwgfx: Flush even if we don't autopaint the color key
Thomas Hellstrom [Fri, 26 Nov 2010 09:06:47 +0000 (10:06 +0100)]
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>
14 years agor300/compiler: move util functions to radeon_compiler_util
Marek Olšák [Thu, 25 Nov 2010 14:07:02 +0000 (15:07 +0100)]
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.

14 years agor300/compiler: add a function for swizzling a mask
Marek Olšák [Thu, 25 Nov 2010 03:34:31 +0000 (04:34 +0100)]
r300/compiler: add a function for swizzling a mask

14 years agor300/compiler: remove duplicate function rc_mask_to_swz
Marek Olšák [Thu, 25 Nov 2010 00:25:03 +0000 (01:25 +0100)]
r300/compiler: remove duplicate function rc_mask_to_swz

14 years agor300/compiler: fix rc_rewrite_depth_out for it to work with any instruction
Marek Olšák [Wed, 24 Nov 2010 23:35:30 +0000 (00:35 +0100)]
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.

14 years agou_blitter: use PIPE_TRANSFER_DISCARD to prevent cpu/gpu stall
Marek Olšák [Tue, 23 Nov 2010 13:09:21 +0000 (14:09 +0100)]
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.

14 years agonvfx: reset nvfx->hw_zeta
Xavier Chantry [Wed, 24 Nov 2010 20:50:36 +0000 (21:50 +0100)]
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>
14 years agonvfx: fb->nr_cbufs <= 1 on nv30
Xavier Chantry [Wed, 24 Nov 2010 20:50:35 +0000 (21:50 +0100)]
nvfx: fb->nr_cbufs <= 1 on nv30

7e1bf946316ff99feaa3f2e85f70b45bd9a77ade 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>
14 years agoglsl: Add a virtual as_discard() method.
Kenneth Graunke [Thu, 25 Nov 2010 05:33:07 +0000 (21:33 -0800)]
glsl: Add a virtual as_discard() method.

NOTE: This is candidate for the 7.9 branch.

14 years agoglsl: Use do_common_optimization in the standalone compiler.
Kenneth Graunke [Thu, 25 Nov 2010 07:54:03 +0000 (23:54 -0800)]
glsl: Use do_common_optimization in the standalone compiler.

NOTE: This is a candidate for the 7.9 branch.

14 years agoglsl: Don't inline function prototypes.
Kenneth Graunke [Thu, 25 Nov 2010 08:09:43 +0000 (00:09 -0800)]
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.

14 years agor300/compiler: Move declaration before code.
Vinson Lee [Thu, 25 Nov 2010 07:03:26 +0000 (23:03 -0800)]
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

14 years agor300/compiler: Move declaration before code.
Vinson Lee [Thu, 25 Nov 2010 07:00:03 +0000 (23:00 -0800)]
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

14 years agost/vega: Fix a typo in EXTENDED_BLENDER_OVER_FUNC.
Chia-I Wu [Thu, 25 Nov 2010 05:18:47 +0000 (13:18 +0800)]
st/vega: Fix a typo in EXTENDED_BLENDER_OVER_FUNC.

The typo was introduced by commit
231d5457b275c1d9bbeff14165cf3da33dda176b.

14 years agost/vega: No flipping in vg_prepare_blend_surface.
Chia-I Wu [Thu, 25 Nov 2010 05:01:17 +0000 (13:01 +0800)]
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.

14 years agost/vega: Masks and surfaces should share orientation.
Chia-I Wu [Thu, 25 Nov 2010 04:20:15 +0000 (12:20 +0800)]
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.

14 years agost/vega: Fix a crash with empty paths.
Chia-I Wu [Wed, 24 Nov 2010 08:29:10 +0000 (16:29 +0800)]
st/vega: Fix a crash with empty paths.

14 years agoauxiliary: util_blit_pixels_tex should restore the viewport.
Chia-I Wu [Thu, 25 Nov 2010 05:00:18 +0000 (13:00 +0800)]
auxiliary: util_blit_pixels_tex should restore the viewport.

Viewport state should be saved/restored.

14 years agor300g/r600g: bump cache manager timeouts to 1s
Dave Airlie [Wed, 24 Nov 2010 21:29:03 +0000 (07:29 +1000)]
r300g/r600g: bump cache manager timeouts to 1s

On lightsmark on my r500 this drop the bufmgr allocations of the sysprof.

14 years agomesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.
Kenneth Graunke [Wed, 24 Nov 2010 21:59:46 +0000 (13:59 -0800)]
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.

14 years agometa: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear
Peter Clifton [Wed, 24 Nov 2010 15:24:31 +0000 (15:24 +0000)]
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>
14 years agox11: remove test_proxy_teximage() function
Brian Paul [Wed, 24 Nov 2010 19:01:02 +0000 (12:01 -0700)]
x11: remove test_proxy_teximage() function

This was really just for testing purposes.

14 years agomesa: added _mesa_format_image_size64()
Brian Paul [Wed, 24 Nov 2010 19:00:16 +0000 (12:00 -0700)]
mesa: added _mesa_format_image_size64()

14 years agomesa: add assertion and update comment in _mesa_format_image_size()
Brian Paul [Wed, 24 Nov 2010 17:24:17 +0000 (10:24 -0700)]
mesa: add assertion and update comment in _mesa_format_image_size()

14 years agoi965: Don't write mrf assignment for pointsize output
Kristian Høgsberg [Wed, 24 Nov 2010 15:12:20 +0000 (10:12 -0500)]
i965: Don't write mrf assignment for pointsize output

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

14 years agogallium/targets/xorg-vmwgfx: Xv fixes
Thomas Hellstrom [Wed, 24 Nov 2010 14:18:15 +0000 (15:18 +0100)]
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>
14 years agost/xorg: Add a function to flush pending rendering and damage
Thomas Hellstrom [Wed, 24 Nov 2010 14:15:42 +0000 (15:15 +0100)]
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>
14 years agoegl_dri2: Fix one context, multiple surfaces.
Chia-I Wu [Wed, 24 Nov 2010 05:42:06 +0000 (13:42 +0800)]
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.

14 years agoi915: Disallow alpha, red, RG, and sRGB as render targets
Ian Romanick [Wed, 24 Nov 2010 00:17:21 +0000 (16:17 -0800)]
i915: Disallow alpha, red, RG, and sRGB as render targets

Fixes bugzilla #31832

NOTE: This is a candidate for the 7.9 branch.

14 years agoglsl: start restoring some geometry shader code
Brian Paul [Wed, 24 Nov 2010 00:23:42 +0000 (17:23 -0700)]
glsl: start restoring some geometry shader code

14 years agoglsl: better handling of linker failures
Brian Paul [Wed, 24 Nov 2010 00:18:44 +0000 (17:18 -0700)]
glsl: better handling of linker failures

Upon link error, exit translation loop, free program instructions.
Check for null pointers in calling code.

14 years agomesa: use gl_shader_type enum
Brian Paul [Wed, 24 Nov 2010 00:00:08 +0000 (17:00 -0700)]
mesa: use gl_shader_type enum

14 years agomesa: replace #defines with new gl_shader_type enum
Brian Paul [Tue, 23 Nov 2010 17:28:43 +0000 (10:28 -0700)]
mesa: replace #defines with new gl_shader_type enum

14 years agomesa: _mesa_valid_register_index() to validate register indexes
Brian Paul [Tue, 23 Nov 2010 17:12:55 +0000 (10:12 -0700)]
mesa: _mesa_valid_register_index() to validate register indexes

14 years agomesa: rename, make _mesa_register_file_name() non-static
Brian Paul [Tue, 23 Nov 2010 17:11:46 +0000 (10:11 -0700)]
mesa: rename, make _mesa_register_file_name() non-static

Plus remove unused parameter.

14 years agoglsl: use gl_register_file in a few places
Brian Paul [Mon, 22 Nov 2010 23:55:10 +0000 (16:55 -0700)]
glsl: use gl_register_file in a few places

14 years agoglsl: fix off by one in register index assertion
Brian Paul [Mon, 22 Nov 2010 22:06:47 +0000 (15:06 -0700)]
glsl: fix off by one in register index assertion

14 years agogallium/egl: fix r300 vs r600 loading
Alex Deucher [Tue, 23 Nov 2010 20:18:31 +0000 (15:18 -0500)]
gallium/egl: fix r300 vs r600 loading

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=31841

14 years agoi965: Use the new embedded compare in SEL on gen6 for VS MIN and MAX opcodes.
Eric Anholt [Mon, 15 Nov 2010 08:01:04 +0000 (16:01 +0800)]
i965: Use the new embedded compare in SEL on gen6 for VS MIN and MAX opcodes.

Cuts the extra CMP instruction that used to precede SEL.

14 years agoi965: Don't upload line smooth params unless we're line smoothing.
Eric Anholt [Fri, 19 Nov 2010 15:04:35 +0000 (23:04 +0800)]
i965: Don't upload line smooth params unless we're line smoothing.

14 years agoi965: Don't upload line stipple pattern unless we're stippling.
Eric Anholt [Fri, 19 Nov 2010 15:02:07 +0000 (23:02 +0800)]
i965: Don't upload line stipple pattern unless we're stippling.

14 years agoi965: Don't upload polygon stipple unless required.
Eric Anholt [Fri, 19 Nov 2010 14:53:31 +0000 (22:53 +0800)]
i965: Don't upload polygon stipple unless required.

14 years agoi965: Move gen4 blend constant color to the gen4 blending file.
Eric Anholt [Fri, 19 Nov 2010 14:58:48 +0000 (22:58 +0800)]
i965: Move gen4 blend constant color to the gen4 blending file.

14 years agor600g: Removed duplicated call to tgsi_split_literal_constant().
Tilman Sauerbeck [Fri, 19 Nov 2010 21:31:43 +0000 (22:31 +0100)]
r600g: Removed duplicated call to tgsi_split_literal_constant().

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agor300/compiler: Don't allow presubtract sources to be remapped twice
Tom Stellard [Tue, 23 Nov 2010 07:48:47 +0000 (23:48 -0800)]
r300/compiler: Don't allow presubtract sources to be remapped twice

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

NOTE: This is a candidate for the 7.9 branch.

14 years agor600g: Only compare active vertex elements
Mathias Fröhlich [Tue, 23 Nov 2010 07:39:30 +0000 (08:39 +0100)]
r600g: Only compare active vertex elements

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agomesa: Clean up header file inclusion in syncobj.h.
Vinson Lee [Tue, 23 Nov 2010 05:51:49 +0000 (21:51 -0800)]
mesa: Clean up header file inclusion in syncobj.h.

14 years agollvmpipe: Remove unnecessary headers.
Vinson Lee [Tue, 23 Nov 2010 05:39:14 +0000 (21:39 -0800)]
llvmpipe: Remove unnecessary headers.

14 years agomesa: fix regression from b4bb6680200b5a898583392f4c831c02f41e63f7
Xiang, Haihao [Tue, 23 Nov 2010 00:52:23 +0000 (08:52 +0800)]
mesa: fix regression from b4bb6680200b5a898583392f4c831c02f41e63f7

Pending commands to the previous context aren't flushed since commit b4bb668

Reported-by: Oleksiy Krivoshey <oleksiyk@gmail.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
14 years agor600c: fix VC flush on cedar and palm
Alex Deucher [Tue, 23 Nov 2010 00:27:58 +0000 (19:27 -0500)]
r600c: fix VC flush on cedar and palm

14 years agor600g: add support for ontario APUs
Alex Deucher [Mon, 22 Nov 2010 22:47:24 +0000 (17:47 -0500)]
r600g: add support for ontario APUs

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agor600c: add Ontario Fusion APU support
Alex Deucher [Mon, 22 Nov 2010 18:25:42 +0000 (13:25 -0500)]
r600c: add Ontario Fusion APU support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agor300g: Avoid returning values in a static array, fixing a potential race
Mathias Fröhlich [Mon, 22 Nov 2010 22:19:52 +0000 (23:19 +0100)]
r300g: Avoid returning values in a static array, fixing a potential race

(Marek: added the initializion of "vec" in the default statement)

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
14 years agor600g: fix some winsys functions to deal properly with evergreen
Alex Deucher [Mon, 22 Nov 2010 22:39:54 +0000 (17:39 -0500)]
r600g: fix some winsys functions to deal properly with evergreen

Are these functions actually used anywhere?

14 years agor600g: fix additional EVENT_WRITE packet
Alex Deucher [Mon, 22 Nov 2010 22:39:16 +0000 (17:39 -0500)]
r600g: fix additional EVENT_WRITE packet

Add explicit EVENT_TYPE field

14 years agost/mesa: set MaxUniformComponents
Marek Olšák [Sun, 21 Nov 2010 21:02:02 +0000 (22:02 +0100)]
st/mesa: set MaxUniformComponents

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agoswrast: init alpha value to 1.0 in opt_sample_rgb_2d()
Brian Paul [Mon, 22 Nov 2010 16:04:13 +0000 (09:04 -0700)]
swrast: init alpha value to 1.0 in opt_sample_rgb_2d()

14 years agogallium: add PIPE_SHADER_CAP_SUBROUTINES
Marek Olšák [Sun, 14 Nov 2010 14:34:59 +0000 (15:34 +0100)]
gallium: add PIPE_SHADER_CAP_SUBROUTINES

This fixes piglit/glsl-vs-main-return and glsl-fs-main-return for the drivers
which don't support RET (i915g, r300g, r600g, svga).

ir_to_mesa does not currently generate subroutines, but it's a matter of time
till it's added. It would then break all the drivers which don't implement
them, so this CAP makes sense.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
14 years agoMerge branch 'lp-offset-twoside'
Keith Whitwell [Mon, 22 Nov 2010 10:36:01 +0000 (10:36 +0000)]
Merge branch 'lp-offset-twoside'

14 years agor600g: pick correct color swap for A8 fbos.
Dave Airlie [Mon, 22 Nov 2010 06:03:00 +0000 (16:03 +1000)]
r600g: pick correct color swap for A8 fbos.

This fixes fdo bug 31810.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agor300/compiler: Add a more efficient version of rc_find_free_temporary()
Tom Stellard [Fri, 12 Nov 2010 08:59:13 +0000 (00:59 -0800)]
r300/compiler: Add a more efficient version of rc_find_free_temporary()

14 years agor300/compiler: Enable rename_reg pass for r500 cards
Tom Stellard [Thu, 11 Nov 2010 05:34:18 +0000 (21:34 -0800)]
r300/compiler: Enable rename_reg pass for r500 cards

In addition, the rename_reg pass has been rewritten to use
rc_get_readers().

14 years agor300/compiler: Use presubtract operations as much as possible
Tom Stellard [Tue, 9 Nov 2010 02:49:44 +0000 (18:49 -0800)]
r300/compiler: Use presubtract operations as much as possible

Previously, presubtract operations where only being used by instructions
with less than three source source registers.