mesa.git
12 years agovbo: remove vbo_context::legacy_currval
Marek Olšák [Mon, 16 Apr 2012 14:24:39 +0000 (16:24 +0200)]
vbo: remove vbo_context::legacy_currval

It's not nice when you have several variables pointing to the same array
and you wanna ask your editor "where is this used" and you only get an answer
for one of the four currval, legacy_currval, generic_currval, mat_currval,
which is quite useless, because you never see the whole picture.

Let's get rid of the additional pointers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agovbo: remove unused variables in vbo_context
Marek Olšák [Mon, 16 Apr 2012 12:37:29 +0000 (14:37 +0200)]
vbo: remove unused variables in vbo_context

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agovbo: don't check twice whether it's valid to render
Marek Olšák [Mon, 16 Apr 2012 03:55:08 +0000 (05:55 +0200)]
vbo: don't check twice whether it's valid to render

It's already done in _mesa_validate_Draw* and it's not needed to do it again
unless I am missing something.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agomesa: set _NEW_VARYING_VP_INPUTS flag only if fixed-func VP is enabled & valid
Marek Olšák [Mon, 16 Apr 2012 14:04:52 +0000 (16:04 +0200)]
mesa: set _NEW_VARYING_VP_INPUTS flag only if fixed-func VP is enabled & valid

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agomesa: add _NEW_VARYING_VP_INPUTS for gl_context::varying_vp_inputs
Marek Olšák [Mon, 16 Apr 2012 02:21:03 +0000 (04:21 +0200)]
mesa: add _NEW_VARYING_VP_INPUTS for gl_context::varying_vp_inputs

This is a frequently-updated state and _NEW_ARRAY already causes revalidation
of the vbo module. It's kinda counter-productive to recompute arrays
in the vbo module if _NEW_ARRAY is set and then set _NEW_ARRAY again.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agomesa,vbo: properly detect when vertex arrays need to be recalculated
Marek Olšák [Mon, 16 Apr 2012 01:34:22 +0000 (03:34 +0200)]
mesa,vbo: properly detect when vertex arrays need to be recalculated

This moves the RebindArrays flag into the vbo module, consolidates the code,
and adds missing vbo_draw_method calls.

Also with this change, the vertex arrays are not needlessly recalculated twice.
The issue with the old code was:
- If recalculate_input_bindings updates vp_varying_inputs, _NEW_ARRAY is set.
- _mesa_update_state is called and the vp_varying_inputs change causes
  regeneration of the fixed-function shaders, which also sets _NEW_PROGRAM.
- The occurence of either _NEW_ARRAY or _NEW_PROGRAM sets
  the recalculate_inputs flag to TRUE again.
- The new code sets the flag to FALSE after the second _mesa_update_state,
  because there can't possibly be any change which would require recalculating
  the arrays.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agomesa: only update _MaxElement when we actually need it
Marek Olšák [Mon, 16 Apr 2012 00:14:18 +0000 (02:14 +0200)]
mesa: only update _MaxElement when we actually need it

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agost/mesa: use bitshifting to define state flags
Marek Olšák [Sun, 15 Apr 2012 21:12:19 +0000 (23:12 +0200)]
st/mesa: use bitshifting to define state flags

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agoradeonsi: MIMG shader instructions require waiting for the results.
Michel Dänzer [Thu, 19 Apr 2012 07:36:52 +0000 (09:36 +0200)]
radeonsi: MIMG shader instructions require waiting for the results.

12 years agoradeonsi: Replace more magic numbers for sampler state.
Michel Dänzer [Thu, 19 Apr 2012 07:36:52 +0000 (09:36 +0200)]
radeonsi: Replace more magic numbers for sampler state.

12 years agoradeonsi: Fix mip filter encoding in sampler state.
Michel Dänzer [Thu, 19 Apr 2012 07:36:51 +0000 (09:36 +0200)]
radeonsi: Fix mip filter encoding in sampler state.

Blits are starting to work.

12 years agoradeonsi: Set tiling mode index for depth/stencil buffers.
Michel Dänzer [Thu, 19 Apr 2012 07:36:51 +0000 (09:36 +0200)]
radeonsi: Set tiling mode index for depth/stencil buffers.

12 years agoglsl: Remove unused mem_ctx field from ir_array_splitting_visitor.
Kenneth Graunke [Thu, 19 Apr 2012 02:10:03 +0000 (19:10 -0700)]
glsl: Remove unused mem_ctx field from ir_array_splitting_visitor.

Vinson reported that we failed to initialize this, which would lead to
all kinds of crashes if we actually used it.  Since we don't use it,
we may as well just delete the broken code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Rename BRW_MAX_SURFACES to BRW_MAX_WM_SURFACES.
Kenneth Graunke [Thu, 19 Apr 2012 01:25:01 +0000 (18:25 -0700)]
i965: Rename BRW_MAX_SURFACES to BRW_MAX_WM_SURFACES.

Now that we use separate binding tables for WM, VS, and GS, and have
BRW_MAX_VS_SURFACES and BRW_MAX_GS_SURFACES macros, we really shouldn't
have an unqualified BRW_MAX_SURFACES macro.  It's confusing.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Fix outdated comments about binding tables.
Kenneth Graunke [Thu, 19 Apr 2012 01:21:24 +0000 (18:21 -0700)]
i965: Fix outdated comments about binding tables.

They had a number of issues:
- A paragraph states that we use a single binding table, but we don't.
- We labelled the WM binding table diagram as SOL/WM.
- The WM diagram had an "Only relevant to the WM" comment.  Duh.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Use array object constructor.
Mathias Fröhlich [Wed, 2 Nov 2011 18:54:26 +0000 (19:54 +0100)]
mesa: Use array object constructor.

This change uses the array object factory for gl_array_objects. This
prevents crashes when deriving from gl_array_object.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
12 years agosvga: flush drawing before clearing
Brian Paul [Wed, 18 Apr 2012 14:31:45 +0000 (08:31 -0600)]
svga: flush drawing before clearing

We don't normally clear immediately after drawing something.  But as it
was, the drawing would incorrectly appear after the clear.

Fixes piglit clear-varray-2.0 failure.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agopipebuffer: split up assertion
Brian Paul [Wed, 18 Apr 2012 14:30:30 +0000 (08:30 -0600)]
pipebuffer: split up assertion

The problem with assert(a && b) is you don't know which term is zero
when there's a failure.

12 years agosvga: return PIPE_OK instead of 0
Brian Paul [Tue, 17 Apr 2012 19:58:05 +0000 (13:58 -0600)]
svga: return PIPE_OK instead of 0

12 years agogallium/u_gen_mipmap: don't release vertex buffer at end of frame / in glFlush
Marek Olšák [Fri, 13 Apr 2012 19:20:18 +0000 (21:20 +0200)]
gallium/u_gen_mipmap: don't release vertex buffer at end of frame / in glFlush

There's no reason to do that. The buffer being used for rendering is always
mapped as unsynchronized.

12 years agogallium/u_blit: don't release vertex buffer at end of frame / in glFlush
Marek Olšák [Fri, 13 Apr 2012 19:20:18 +0000 (21:20 +0200)]
gallium/u_blit: don't release vertex buffer at end of frame / in glFlush

There's no reason to do that. The buffer being used for rendering is always
mapped as unsynchronized.

12 years agogallium: remove PIPE_TRANSFER_NOOVERWRITE, use equivalent UNSYNCHRONIZED
Marek Olšák [Fri, 13 Apr 2012 19:10:21 +0000 (21:10 +0200)]
gallium: remove PIPE_TRANSFER_NOOVERWRITE, use equivalent UNSYNCHRONIZED

12 years agost/mesa: write vertices directly into the buffer for glClear fallback
Marek Olšák [Fri, 13 Apr 2012 18:37:41 +0000 (20:37 +0200)]
st/mesa: write vertices directly into the buffer for glClear fallback

12 years agost/mesa: use u_upload_mgr to upload vertices for glClear fallback
Marek Olšák [Fri, 13 Apr 2012 17:27:45 +0000 (19:27 +0200)]
st/mesa: use u_upload_mgr to upload vertices for glClear fallback

12 years agost/mesa: write vertices directly into the buffer in glDrawPixels
Marek Olšák [Fri, 13 Apr 2012 18:37:41 +0000 (20:37 +0200)]
st/mesa: write vertices directly into the buffer in glDrawPixels

12 years agost/mesa: use u_upload_mgr to upload vertices for glDrawPixels
Marek Olšák [Fri, 13 Apr 2012 17:27:45 +0000 (19:27 +0200)]
st/mesa: use u_upload_mgr to upload vertices for glDrawPixels

12 years agost/mesa: use u_upload_mgr to upload vertices for glDrawTexOES
Marek Olšák [Fri, 13 Apr 2012 17:27:45 +0000 (19:27 +0200)]
st/mesa: use u_upload_mgr to upload vertices for glDrawTexOES

12 years agost/mesa: write vertices directly into the buffer for glBitmap
Marek Olšák [Fri, 13 Apr 2012 18:37:41 +0000 (20:37 +0200)]
st/mesa: write vertices directly into the buffer for glBitmap

12 years agost/mesa: use u_upload_mgr to upload vertices for glBitmap
Marek Olšák [Fri, 13 Apr 2012 17:27:45 +0000 (19:27 +0200)]
st/mesa: use u_upload_mgr to upload vertices for glBitmap

instead of recreating the vertex buffer for each draw_vbo call.

12 years agoradeonsi: Improve calculation of number of pixel shader interpolants.
Michel Dänzer [Wed, 18 Apr 2012 08:44:03 +0000 (10:44 +0200)]
radeonsi: Improve calculation of number of pixel shader interpolants.

12 years agoradeonsi: Fix calculation of pitch value in sampler view state.
Michel Dänzer [Wed, 18 Apr 2012 08:37:15 +0000 (10:37 +0200)]
radeonsi: Fix calculation of pitch value in sampler view state.

12 years agoradeonsi: Set tiling mode index in sampler view state.
Michel Dänzer [Wed, 18 Apr 2012 08:51:48 +0000 (10:51 +0200)]
radeonsi: Set tiling mode index in sampler view state.

Hardcode index for linear mode for now.

12 years agoradeonsi: Replace magic numbers with register definitions in sampler state.
Michel Dänzer [Wed, 18 Apr 2012 08:29:23 +0000 (10:29 +0200)]
radeonsi: Replace magic numbers with register definitions in sampler state.

12 years agoradeonsi: Fix white border color type in sampler state.
Michel Dänzer [Wed, 18 Apr 2012 08:48:26 +0000 (10:48 +0200)]
radeonsi: Fix white border color type in sampler state.

12 years agoglsl/builtins: Rework profiles to use the new '.glsl' common suffix.
Kenneth Graunke [Mon, 16 Apr 2012 20:29:42 +0000 (13:29 -0700)]
glsl/builtins: Rework profiles to use the new '.glsl' common suffix.

Deletes a lot of pointless duplication, as well as some run-time effort.

Conveniently, GLSL 1.40 no longer needs a .vert variant, since it
doesn't define any built-ins specific to the vertex shader stage.

ARB_texture_rectangle and OES_EGL_image_external also only need a single
profile, since the .vert and .frag variants were identical.

I didn't bother with EXT_texture_array and OES_texture_3D because
they're so tiny that the savings would be miniscule.

Cuts the generated builtin_function.cpp from 1.7MB to 1.0MB (41%).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoglsl/builtins: Support stage-agnostic built-in profiles.
Kenneth Graunke [Tue, 17 Apr 2012 18:26:29 +0000 (11:26 -0700)]
glsl/builtins: Support stage-agnostic built-in profiles.

The built-in subsystem uses "profiles," or GLSL shaders containing
prototypes for all built-ins supported within a particular language
version (or extension) and shader stage.

Since profiles were stage-specific, we had to cut and paste almost all
the prototypes between (e.g.) 110.vert and 110.frag.  Naturally, this
led to sundry cut and paste bugs, where someone fixed an issue in .frag
but neglected to update .vert, or vice-versa.  Geometry shaders would
have only made this worse.

This patch introduces support for a new '.glsl' profile suffix which
contains prototypes common to all shader stages.  The existing '.frag'
and '.vert' profiles need only contain the few stage-specific built-ins.

Not only does this remove duplication, it makes built-in setup slightly
faster: we don't need to re-read the common prototypes and function
bodies for both the vertex and fragment shader stage.

Internally, this was trivial.  We already create a list of gl_shader
objects to search through for built-ins: one for the core language
version/stage, and additional shaders for any extensions in use.  This
patch simply adds another shader to the list: core/common, core/stage,
and extensions.

The next patch will update the profiles to remove the duplication.
It's separated out purely to make review easier.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoglsl: Make the standalone compiler accept '.glsl' files.
Kenneth Graunke [Mon, 16 Apr 2012 21:40:45 +0000 (14:40 -0700)]
glsl: Make the standalone compiler accept '.glsl' files.

These ought to be treated as 'any stage', but for now, they're just
treated as vertex shaders.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()
Brian Paul [Tue, 17 Apr 2012 16:49:16 +0000 (10:49 -0600)]
mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()

Accelerates a few glReadPixels cases for WebGL.
See https://bugs.freedesktop.org/show_bug.cgi?id=48545

v2: Per Jose, use bit twiddling for the swizzle case instead of ubyte
arrays (it's about 44% faster).

Note: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoconfigure.ac: add IA64 support.
Dave Airlie [Tue, 17 Apr 2012 18:58:39 +0000 (19:58 +0100)]
configure.ac: add IA64 support.

ia64 on Linux can use DRI as well.

Reported-by: russiane39 on #radeon
Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=48788
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoglsl/builtins: Use ivec for texel offsets in textureProjGradOffset.
Kenneth Graunke [Mon, 16 Apr 2012 20:37:20 +0000 (13:37 -0700)]
glsl/builtins: Use ivec for texel offsets in textureProjGradOffset.

The GLSL 1.30 -> 4.10 specs all erroneously say "vec2" for a few
overloads of textureProjGradOffset, while most overloads and all other
texturing functions use ivec types.

The GLSL 4.20 specification corrects these to "ivec2", but doesn't
mention this as being a conscious change in behavior.  Nor does the
ARB_shading_language_420pack extension.  So presumably it was a typo.

At any rate, our builtin functions all use ivec already, so the fact
that these prototypes use plain vecs will only lead to applications
dying in a fire when trying to use them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agonv50: specify location of UCPs to code generator
Christoph Bumiller [Tue, 17 Apr 2012 16:35:16 +0000 (18:35 +0200)]
nv50: specify location of UCPs to code generator

Was made configurable in e44089b2f79aa2dcaacf348911433d1e21235c0c
for Kepler but forgot to update nv50.

12 years agor600g: Use automake to generate Makefile
Tom Stellard [Fri, 13 Apr 2012 18:29:49 +0000 (14:29 -0400)]
r600g: Use automake to generate Makefile

12 years agoRevert "glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function."
Eric Anholt [Mon, 16 Apr 2012 20:37:04 +0000 (13:37 -0700)]
Revert "glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function."

This reverts commit 4ec449a6ed1d2cea3bf83d6518b3b352ce5daceb.

I meant to not push this one.  Review found that a link error is not
mandated: it should link, but you get undefined rendering if you rely
on a missing stage.

     page 42/55 section 2.11 "Vertex Shaders":

     "If the program object has no vertex shader, or no program object
      is currently in use, the results of vertex shader execution are
      undefined."

(and similar for page 160/173 section 3.9 "Fragment Shaders" for FS,
and page 45/58 section 2.11.2 "Program Objects" for program being 0)

It turns out the commit was broken anyway, because it was missing a
"goto done", so linkstatus got smashed back to true later and the
error just showed up as a warning in the infolog.

12 years agodocs: Update GLSL 1.40 status.
Eric Anholt [Fri, 13 Apr 2012 19:18:46 +0000 (12:18 -0700)]
docs: Update GLSL 1.40 status.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodocs: Update that int textures got done for GL3.
Eric Anholt [Fri, 13 Apr 2012 19:09:59 +0000 (12:09 -0700)]
docs: Update that int textures got done for GL3.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodocs: Update that ARB_draw_instanced is on in i965.
Eric Anholt [Fri, 13 Apr 2012 19:09:11 +0000 (12:09 -0700)]
docs: Update that ARB_draw_instanced is on in i965.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodocs: Update TBO support.
Eric Anholt [Fri, 13 Apr 2012 19:07:01 +0000 (12:07 -0700)]
docs: Update TBO support.

All I know of that needs finishing in Mesa is to enable the extension
in a GL3.1 core context on i965 -- we're not going to expose it in
non-3.1 core contexts.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Refuse to link GLSL 1.40+ shaders that would use fixed function.
Eric Anholt [Fri, 13 Apr 2012 20:51:34 +0000 (13:51 -0700)]
glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add remaining *sampler2DRect* texture functions.
Eric Anholt [Fri, 13 Apr 2012 22:43:41 +0000 (15:43 -0700)]
glsl: Add remaining *sampler2DRect* texture functions.

Fixes the new piglit texelFetch() tests on these.  Note that the rest
of the new functions are not tested (same as the non-2DRect versions
of most of them).

12 years agoglsl: Fix the prototype of textureProjGradOffset(sampler2DShadow)
Eric Anholt [Mon, 16 Apr 2012 18:43:47 +0000 (11:43 -0700)]
glsl: Fix the prototype of textureProjGradOffset(sampler2DShadow)

Indirectly caught by Ken's review of my GLSL 1.40 changes where I
copy-and-pasted this line.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Mark [iu]sampler{Buffer,2DRect}as reserved in GLSL 1.40.
Eric Anholt [Fri, 13 Apr 2012 19:34:45 +0000 (12:34 -0700)]
glsl: Mark [iu]sampler{Buffer,2DRect}as reserved in GLSL 1.40.

The non-integer versions were already reserved in 1.30, but apparently
these were forgotten.

Fixes piglit glsl-1.40/compiler/reserved/

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add textureSize(*samplerBuffer) support.
Eric Anholt [Thu, 12 Apr 2012 23:28:37 +0000 (16:28 -0700)]
glsl: Add textureSize(*samplerBuffer) support.

Fixes the corresponding new tests in piglit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Fix comment typo in 1.40 work.
Eric Anholt [Fri, 13 Apr 2012 19:44:33 +0000 (12:44 -0700)]
glsl: Fix comment typo in 1.40 work.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Remove dead _mesa_sizeof_glsl_type().
Eric Anholt [Fri, 13 Apr 2012 19:43:15 +0000 (12:43 -0700)]
mesa: Remove dead _mesa_sizeof_glsl_type().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agogtest: Don't actually install a library.
Eric Anholt [Fri, 13 Apr 2012 16:59:00 +0000 (09:59 -0700)]
gtest: Don't actually install a library.

The whole point of importing it was that you're not supposed to
install this library.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=411825
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agosvga: add case for PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS
Brian Paul [Mon, 16 Apr 2012 16:35:20 +0000 (10:35 -0600)]
svga: add case for PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS

12 years agoautoconf: add AM_PROG_CC_C_O
Dylan Noblesmith [Mon, 2 Apr 2012 15:35:38 +0000 (15:35 +0000)]
autoconf: add AM_PROG_CC_C_O

Prevents this error with Automake 1.9:

src/gallium/drivers/Makefile.am: C objects in subdir but
`AM_PROG_CC_C_O' not in `configure.ac'
autoreconf: automake failed with exit status: 1

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agonvc0: fix nve4 linear copies
Christoph Bumiller [Sun, 15 Apr 2012 22:36:35 +0000 (00:36 +0200)]
nvc0: fix nve4 linear copies

12 years agotargets/xvmc-nouveau: fix accidental hardcoded include path
Christoph Bumiller [Sun, 15 Apr 2012 14:40:53 +0000 (16:40 +0200)]
targets/xvmc-nouveau: fix accidental hardcoded include path

5b0cd37324555638661a4a70c2bdf49eeebe876c wasn't meant to be pushed.

12 years agonv50: use correct semantic map value for undefined PointSize output
Christoph Bumiller [Sun, 15 Apr 2012 14:30:13 +0000 (16:30 +0200)]
nv50: use correct semantic map value for undefined PointSize output

12 years agotargets/xvmc-nouveau: add libdrm include path
Christoph Bumiller [Fri, 6 Apr 2012 15:02:08 +0000 (17:02 +0200)]
targets/xvmc-nouveau: add libdrm include path

12 years agonv30: init sample_mask to some default value at context creation time
Ben Skeggs [Sun, 15 Apr 2012 12:14:58 +0000 (22:14 +1000)]
nv30: init sample_mask to some default value at context creation time

Fixes demos/lodbias.

12 years agonv30: fix some sifm transfer issues
Ben Skeggs [Sun, 15 Apr 2012 00:52:06 +0000 (10:52 +1000)]
nv30: fix some sifm transfer issues

12 years agoscons: Fix egl-static build due to conflicting symbols.
José Fonseca [Sun, 15 Apr 2012 10:32:21 +0000 (11:32 +0100)]
scons: Fix egl-static build due to conflicting symbols.

radeonsi and r600 have duplicate symbols, so it's not possible to
statically link both.  Remove the newcomer, radeonsi, until duplicate
symbols are fixed.

12 years agonvc0: add initial support for nve4+ (Kepler) chipsets
Christoph Bumiller [Sat, 14 Apr 2012 21:56:56 +0000 (23:56 +0200)]
nvc0: add initial support for nve4+ (Kepler) chipsets

Most things that work on Fermi should work on Kepler too.

There are a few performance optimizations left to do, like better
placement of texture barriers and adding scheduling data to the
shader instructions (without them, a thread group will be masked
for 32 cycles after each single instruction issue).

12 years agoradeonsi: s/DUAL_SOURCE_BLEND/MAX_DUAL_SOURCE_RENDER_TARGETS/
Tom Stellard [Sat, 14 Apr 2012 21:37:37 +0000 (17:37 -0400)]
radeonsi: s/DUAL_SOURCE_BLEND/MAX_DUAL_SOURCE_RENDER_TARGETS/

Fixes build broken by commit 0d29fb017bce0968240ae875af4b3702c2cd46ef

12 years agonv50/ir/opt: extend handleCVT for nv50's SET u32 to f32 chain
Christoph Bumiller [Sat, 14 Apr 2012 19:12:22 +0000 (21:12 +0200)]
nv50/ir/opt: extend handleCVT for nv50's SET u32 to f32 chain

12 years agonv50/ir: print interpolation mode
Christoph Bumiller [Thu, 12 Apr 2012 19:42:29 +0000 (21:42 +0200)]
nv50/ir: print interpolation mode

12 years agonv50: update FP linkage state on one/two-sided lighting switch
Christoph Bumiller [Sun, 8 Apr 2012 15:33:08 +0000 (17:33 +0200)]
nv50: update FP linkage state on one/two-sided lighting switch

12 years agonv50: delete old shader compiler files
Christoph Bumiller [Sun, 18 Mar 2012 22:28:07 +0000 (23:28 +0100)]
nv50: delete old shader compiler files

12 years agonv50: hook up to new shader code generator
Christoph Bumiller [Sat, 14 Apr 2012 19:42:52 +0000 (21:42 +0200)]
nv50: hook up to new shader code generator

12 years agonv50/ir: import nv50 target
Christoph Bumiller [Sat, 14 Apr 2012 19:40:35 +0000 (21:40 +0200)]
nv50/ir: import nv50 target

12 years agonv50/ir: fix off-by-ones in CSE and nvc0 insnCanLoad
Christoph Bumiller [Sat, 14 Apr 2012 02:44:28 +0000 (04:44 +0200)]
nv50/ir: fix off-by-ones in CSE and nvc0 insnCanLoad

12 years agonv50/ir/tgsi: generate UCPs with actual outputs instead of SVs
Christoph Bumiller [Sat, 7 Apr 2012 20:46:35 +0000 (22:46 +0200)]
nv50/ir/tgsi: generate UCPs with actual outputs instead of SVs

gl_ClipDistance is treated the same way, this is just nicer and
easier assign slots for them on nv50.

12 years agonv50/ir: Fix type of the instruction created by mkCmp() for dst in FILE_FLAGS.
Francisco Jerez [Mon, 9 Apr 2012 16:22:57 +0000 (18:22 +0200)]
nv50/ir: Fix type of the instruction created by mkCmp() for dst in FILE_FLAGS.

12 years agonv50/ir: fix Instruction::isCommutationLegal for WAW
Christoph Bumiller [Sun, 8 Apr 2012 21:38:55 +0000 (23:38 +0200)]
nv50/ir: fix Instruction::isCommutationLegal for WAW

12 years agonv50/ir/opt: Add isOptSupported() check in logical arith optimization.
Francisco Jerez [Sun, 8 Apr 2012 21:14:15 +0000 (23:14 +0200)]
nv50/ir/opt: Add isOptSupported() check in logical arith optimization.

12 years agonv50/ir/ra: Fix live set propagation in the secondary passes of buildLiveSets().
Francisco Jerez [Tue, 27 Dec 2011 11:43:27 +0000 (12:43 +0100)]
nv50/ir/ra: Fix live set propagation in the secondary passes of buildLiveSets().

12 years agonv50/ir/opt: don't regard OP_WRSV as dead code
Christoph Bumiller [Tue, 7 Feb 2012 21:39:20 +0000 (22:39 +0100)]
nv50/ir/opt: don't regard OP_WRSV as dead code

12 years agonv50/ir: add isUniform query to Values
Christoph Bumiller [Sat, 14 Apr 2012 19:30:52 +0000 (21:30 +0200)]
nv50/ir: add isUniform query to Values

12 years agonv50/ir: rewrite the register allocator as GCRA, with spilling
Christoph Bumiller [Mon, 9 Apr 2012 18:58:39 +0000 (20:58 +0200)]
nv50/ir: rewrite the register allocator as GCRA, with spilling

This is more flexible than the linear scan, and we don't need the
separate allocation pass for constrained values anymore.

12 years agonv50/ir/tgsi: only export x-component of PSIZE
Christoph Bumiller [Thu, 5 Apr 2012 21:14:33 +0000 (23:14 +0200)]
nv50/ir/tgsi: only export x-component of PSIZE

12 years agonvc0: fix emission of 3rd src in SET_AND,OR,XOR
Christoph Bumiller [Thu, 5 Apr 2012 20:53:46 +0000 (22:53 +0200)]
nvc0: fix emission of 3rd src in SET_AND,OR,XOR

12 years agonv50/ir: Fix BuildUtil::mkSelect and mkClobber
Francisco Jerez [Mon, 9 Apr 2012 18:48:43 +0000 (20:48 +0200)]
nv50/ir: Fix BuildUtil::mkSelect and mkClobber

12 years agonv50/ir: fix reg file conflicts with undefined-value placeholders
Christoph Bumiller [Fri, 6 Apr 2012 17:18:05 +0000 (19:18 +0200)]
nv50/ir: fix reg file conflicts with undefined-value placeholders

12 years agonv50/ir/opt: silence warning (int < Elements() signedness)
Christoph Bumiller [Mon, 2 Apr 2012 18:55:03 +0000 (20:55 +0200)]
nv50/ir/opt: silence warning (int < Elements() signedness)

12 years agonv50/ir/opt: fix combineSt access to wrong instruction
Christoph Bumiller [Mon, 2 Apr 2012 18:53:46 +0000 (20:53 +0200)]
nv50/ir/opt: fix combineSt access to wrong instruction

12 years agonv50/ir/opt: another insn NULL check in phi elimination
Christoph Bumiller [Sun, 29 Jan 2012 14:41:52 +0000 (15:41 +0100)]
nv50/ir/opt: another insn NULL check in phi elimination

12 years agonv50/ir/ssa: Take into account function inputs and outputs.
Francisco Jerez [Sun, 27 Nov 2011 12:06:10 +0000 (13:06 +0100)]
nv50/ir/ssa: Take into account function inputs and outputs.

12 years agonv50/ir: Clean up before calculating instruction ordering for a new function.
Francisco Jerez [Tue, 27 Mar 2012 19:48:58 +0000 (21:48 +0200)]
nv50/ir: Clean up before calculating instruction ordering for a new function.

12 years agonv50/ir/ra: Allocate registers for function arguments.
Francisco Jerez [Tue, 15 Nov 2011 16:24:18 +0000 (17:24 +0100)]
nv50/ir/ra: Allocate registers for function arguments.

12 years agonv50/ir: Take into account function args in the live range calculation code.
Francisco Jerez [Fri, 6 Apr 2012 17:16:04 +0000 (19:16 +0200)]
nv50/ir: Take into account function args in the live range calculation code.

12 years agonv50/ir/ra: Use matching physical regs for function args in caller and callee.
Francisco Jerez [Thu, 29 Mar 2012 21:23:53 +0000 (23:23 +0200)]
nv50/ir/ra: Use matching physical regs for function args in caller and callee.

12 years agonv50/ir/tgsi: Infer function inputs/outputs.
Francisco Jerez [Fri, 6 Apr 2012 17:08:27 +0000 (19:08 +0200)]
nv50/ir/tgsi: Infer function inputs/outputs.

Edit: Don't do it for the main function of (graphics) shaders,
its inputs and outputs always go through TGSI_FILE_INPUT/OUTPUT.
This prevents all TEMPs from counting as live out and reduces
register pressure.

12 years agonv50/ir/tgsi: Replace the inlining logic with proper function calls.
Francisco Jerez [Tue, 27 Mar 2012 15:29:55 +0000 (17:29 +0200)]
nv50/ir/tgsi: Replace the inlining logic with proper function calls.

12 years agonv50/ir: Decouple DataArray from the dictionary that maps locations to values.
Francisco Jerez [Tue, 27 Mar 2012 15:30:31 +0000 (17:30 +0200)]
nv50/ir: Decouple DataArray from the dictionary that maps locations to values.

The point is to keep an independent dictionary for each function.

The array that was being used as dictionary has been converted into a
"bimap" for two different reasons: first, because having an almost
empty instance of an array with as many entries as registers there are
in the program, once for every function, would be wasteful, and
second, because we want to be able to map Value pointers back to
locations at some point.

12 years agonv50/ir/opt: don't delete instruction in removeFlow before its last use
Christoph Bumiller [Thu, 22 Mar 2012 10:59:32 +0000 (11:59 +0100)]
nv50/ir/opt: don't delete instruction in removeFlow before its last use

12 years agonv50/ir/opt: check BB equality before instruction ordering in CSE
Christoph Bumiller [Thu, 22 Mar 2012 10:58:31 +0000 (11:58 +0100)]
nv50/ir/opt: check BB equality before instruction ordering in CSE

12 years agonv50/ir/opt: don't copy-propagate cond MOVs or MOVs to other reg files
Christoph Bumiller [Thu, 22 Mar 2012 10:51:52 +0000 (11:51 +0100)]
nv50/ir/opt: don't copy-propagate cond MOVs or MOVs to other reg files

We've never encountered the latter on nvc0, but on nv50 we have moves
between GPRs and address regs.

12 years agonv50/ir/opt: don't replace conditional definitions in CSE
Christoph Bumiller [Tue, 7 Feb 2012 19:45:03 +0000 (20:45 +0100)]
nv50/ir/opt: don't replace conditional definitions in CSE