mesa.git
10 years agoi965: Don't store qpitch / 4 as mt->qpitch for compressed surfaces.
Kenneth Graunke [Thu, 23 Jan 2014 00:48:03 +0000 (16:48 -0800)]
i965: Don't store qpitch / 4 as mt->qpitch for compressed surfaces.

Broadwell requires software to specify QPitch in a bunch of packets,
so we decided to store it in the miptree.  However, when I did that
refactoring, I missed a subtlety: the hardware expects QPitch to be
"in units of rows in the uncompressed surface".

This is the value we originally compute.  However, for compressed
surfaces, we then divided it by 4 (the block height), to obtain the
physical layout.  This is no longer the QPitch Broadwell expects.

So, store the original undivided value in mt->qpitch, but continue to
use the divided value in brw_miptree_layout_texture_array().  For
non-Broadwell platforms, this should have no impact at all.

Helps fix Piglit's "getteximage-targets S3TC CUBE" test on Broadwell.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agoc11: Do not use pthread_mutex_timedlock on NetBSD.
Vinson Lee [Fri, 24 Jan 2014 23:35:18 +0000 (15:35 -0800)]
c11: Do not use pthread_mutex_timedlock on NetBSD.

This patch fixes the NetBSD build.

NetBSD does not have pthread_mutex_timedlock.

  CC       glapi_dispatch.lo
threads_posix.h: In function 'mtx_timedlock':
threads_posix.h:216:5: error: implicit declaration of function 'pthread_mutex_timedlock'

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
10 years agoglsl: Simplify built-in generator functions for min3/max3/mid3.
Kenneth Graunke [Mon, 6 Jan 2014 22:39:19 +0000 (14:39 -0800)]
glsl: Simplify built-in generator functions for min3/max3/mid3.

The type of all three parameters are identical, so we don't need to
specify it three times.  The predicate is always identical too, so we
don't need to make it a parameter, either.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Fix chained assignments of vector channels.
Kenneth Graunke [Fri, 24 Jan 2014 18:47:49 +0000 (10:47 -0800)]
glsl: Fix chained assignments of vector channels.

Simple shaders such as:

    void splat(vec2 v, float f) {
        v[0] = v[1] = f;
    }

failed to compile with the following error:
error: value of type vec2 cannot be assigned to variable of type float

First, we would process v[1] = f, and transform:
LHS: (expression float vector_extract (var_ref v) (constant int (1)))
RHS: (var_ref f)
into:
LHS: (var_ref v)
RHS: (expression vec2 vector_insert (var_ref v) (constant int (1))
                 (var_ref f))

Note that the LHS type is now vec2, not a float.  This is surprising,
but not the real problem.

After emitting assignments, this ultimately becomes:
(declare (temporary) vec2 assignment_tmp)
(assign (xy)
  (var_ref assignment_tmp)
  (expression vec2 vector_insert (var_ref v) (constant int (1))
              (var_ref f)))
  (assign (xy) (var_ref v) (var_ref assignment_tmp))

We would then return (var_ref assignment_tmp) as the rvalue, which has
the wrong type---it should be float, but is instead a vec2.

To fix this, we simply return (vector_extract (var_ref assignment_temp)
<the appropriate channel>) to pull out the desired float value.

Fixes Piglit's chained-assignment-with-vector-constant-index.vert and
chained-assignment-with-vector-dynamic-index.vert tests.

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74026
Reported-by: Dan Ginsburg <dang@valvesoftware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoglsl: Rename "expr" to "lhs_expr" in vector_extract munging code.
Kenneth Graunke [Fri, 24 Jan 2014 18:42:48 +0000 (10:42 -0800)]
glsl: Rename "expr" to "lhs_expr" in vector_extract munging code.

When processing assignments, we have both an LHS and RHS.  At a glance,
"lhs_expr" clearly refers to the LHS, while a generic name like "expr"
is ambiguous.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoUpdate .gitignore for Catalan translations build artifacts
Paul Berry [Fri, 24 Jan 2014 21:43:43 +0000 (13:43 -0800)]
Update .gitignore for Catalan translations build artifacts

Causes git to ignore the new build artifacts introduced by commit
d5e5367e8992c2e5322d35fba8d86c33a0db6825 (driconf: Add Catalan
translations).

10 years agomesa: Increment the list pointer while freeing instruction data
Ian Romanick [Wed, 22 Jan 2014 00:52:42 +0000 (16:52 -0800)]
mesa: Increment the list pointer while freeing instruction data

Since the list pointer was never incremented when a OPCODE_PIXEL_MAP
opcode was encountered, the data for the instruction would get freed
over and over and over... resulting in a crash.

Fixes gl-1.0-beginend-coverage.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72214
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: Lu Ha <huax.lu@intel.com>
10 years agosvga: rename "tex_usage" to "bindings", add comments
Brian Paul [Thu, 23 Jan 2014 22:04:40 +0000 (15:04 -0700)]
svga: rename "tex_usage" to "bindings", add comments

Trivial.

10 years agost/mesa: add a simple sanity check assertion in st_validate_attachment()
Brian Paul [Fri, 24 Jan 2014 01:18:17 +0000 (18:18 -0700)]
st/mesa: add a simple sanity check assertion in st_validate_attachment()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agoi965/gen7: Use to the correct program when uploading transform feedback state.
Paul Berry [Wed, 22 Jan 2014 13:45:28 +0000 (05:45 -0800)]
i965/gen7: Use to the correct program when uploading transform feedback state.

Transform feedback may come from either the geometry shader or the
vertex shader, so we can't use
ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] to find the current
post-link transform feedback information.  Fortunately we can use
ctx->TransformFeedback.CurrentObject->shader_program.

Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agomesa: Ensure that transform feedback refers to the correct program.
Paul Berry [Wed, 22 Jan 2014 13:14:48 +0000 (05:14 -0800)]
mesa: Ensure that transform feedback refers to the correct program.

Previous to this patch, the _mesa_{Begin,Resume}TransformFeedback
functions were using ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] to
find the program that would be the source of transform feedback data.
This isn't correct--if there's a geometry shader present it should be
ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY].  (These might be
different if separate shader objects are in use).

This patch creates a function get_xfb_source(), which figures out the
correct program to use based on GL state, and updates
_mesa_{Begin,Resume}TransformFeedback to call it.  get_xfb_source() is
written in terms of the gl_shader_stage enum, so it should not need
modification when we add tessellation shaders in the future.  It also
creates a new driver flag, NewTransformFeedbackProg, which is flagged
whenever this program changes.

To reduce future confusion, this patch also rewords some comments and
error message text to avoid referring to vertex shaders.

Cc: 10.0 <mesa-stable@lists.freedesktop.org>
v2: make the for loop in get_xfb_source() clearer.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Remove *_generator::shader field; use prog field instead.
Paul Berry [Wed, 22 Jan 2014 19:45:39 +0000 (11:45 -0800)]
i965: Remove *_generator::shader field; use prog field instead.

The "shader" field in fs_generator, vec4_generator, and gen8_generator
was only used for one purpose; to figure out if we were compiling an
assembly program or a GLSL shader (shader is NULL for assembly
programs).  And it wasn't being used properly: in vec4 shaders we were
always initializing it based on
prog->_LinkedShaders[MESA_SHADER_FRAGMENT], regardless of whether we
were compiling a geometry shader or a vertex shader.

This patch simplifies things by using the "prog" field instead; this
is also NULL for assembly programs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agogles3: Update gl3.h to revision 24614.
Matt Turner [Wed, 22 Jan 2014 22:12:15 +0000 (14:12 -0800)]
gles3: Update gl3.h to revision 24614.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
10 years agogles2: Update gl2ext.h to revision 24614.
Matt Turner [Wed, 22 Jan 2014 22:12:14 +0000 (14:12 -0800)]
gles2: Update gl2ext.h to revision 24614.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
10 years agogles2: Update gl2.h to revision 24614.
Matt Turner [Wed, 22 Jan 2014 22:12:13 +0000 (14:12 -0800)]
gles2: Update gl2.h to revision 24614.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
10 years agoglcpp: Define GL_EXT_shader_integer_mix in both GL and ES.
Matt Turner [Fri, 17 Jan 2014 22:32:19 +0000 (14:32 -0800)]
glcpp: Define GL_EXT_shader_integer_mix in both GL and ES.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglcpp: Remove unused gl_api bits.
Matt Turner [Fri, 17 Jan 2014 22:24:01 +0000 (14:24 -0800)]
glcpp: Remove unused gl_api bits.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglcpp: Set extension defines after resolving the GLSL version.
Matt Turner [Fri, 17 Jan 2014 22:22:49 +0000 (14:22 -0800)]
glcpp: Set extension defines after resolving the GLSL version.

Instead of defining preprocessor macros in glcpp_parser_create based on
the GL API, wait until the shader version has been resolved. Doing this
allows us to correctly set (and not set) preprocessor macros for
extensions allowed by the API but not the shader, as in the case of
ARB_ES3_compatibility.

The shader version has been resolved when the preprocessor encounters
the first preprocessor token, since the GLSL spec says

   "The #version directive must occur in a shader before anything else,
    except for comments and white space."

Specifically, if a #version token is found the version is known
explicitly, and if any other preprocessor token is found then the GLSL
version is implicitly 1.10.

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71630
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Disable ARB_texture_rectangle in shader version 100.
Anuj Phogat [Fri, 17 Jan 2014 20:23:05 +0000 (12:23 -0800)]
glsl: Disable ARB_texture_rectangle in shader version 100.

OpenGL with ARB_ES2_compatibility allows shaders that specify #version
100.

This fixes the Khronos OpenGL test(Texture_Rectangle_Samplers_frag.test)
failure.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
10 years agoglsl: Mark GLSL 4.40 as a known version.
Matt Turner [Fri, 17 Jan 2014 20:20:08 +0000 (12:20 -0800)]
glsl: Mark GLSL 4.40 as a known version.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agost/mesa: fix glReadBuffer(GL_NONE) segfault
Brian Paul [Thu, 23 Jan 2014 16:47:34 +0000 (09:47 -0700)]
st/mesa: fix glReadBuffer(GL_NONE) segfault

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73956
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Tested-by: Ahmed Allam <ahmabdabd@hotmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agosvga: fix PS output register setup regression
Brian Paul [Thu, 23 Jan 2014 16:36:57 +0000 (09:36 -0700)]
svga: fix PS output register setup regression

Fixes glean fragProg1 regression caused by commit b9f68d927ea
(implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS).  This bug
only appears when the fragment shader emits fragment.Z before
color outputs.  The bug was caused by confusion between register
indexes and semantic indexes.

Also added some comments to better explain register indexing.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
10 years agoglx: link loader util lib only when building with dri3
Emil Velikov [Wed, 22 Jan 2014 00:42:30 +0000 (00:42 +0000)]
glx: link loader util lib only when building with dri3

Otherwise we pull libudev as a dependency and crash
games/programs that ship their own version of libudev.

Either way we should link the loader lib only when needed.
This fixes a regression caused by
commit eac776cf779b705cbfb8d41812f1d171fb09c76f
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sat Jan 11 02:24:43 2014 +0000

    glx: use the loader util lib

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73854
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agodriconf: Add Catalan translations
Alex Henrie [Wed, 15 Jan 2014 17:42:23 +0000 (10:42 -0700)]
driconf: Add Catalan translations

See the instructions in Makefile.am under "Adding new translations".

Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agodriconf: Correct and update Spanish translations
Alex Henrie [Wed, 15 Jan 2014 17:42:05 +0000 (10:42 -0700)]
driconf: Correct and update Spanish translations

Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agodriconf: Synchronize po files
Alex Henrie [Wed, 15 Jan 2014 17:41:46 +0000 (10:41 -0700)]
driconf: Synchronize po files

See the instructions in Makefile.am under "Updating existing
translations".

Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agomesa: Set gl_constants::MinMapBufferAlignment
Ian Romanick [Wed, 22 Jan 2014 16:28:49 +0000 (08:28 -0800)]
mesa: Set gl_constants::MinMapBufferAlignment

Leaving it set to zero isn't really correct since every allocation has
at least an alignment of 1 byte.  It also caused a problem in the i965
driver after I removed the MAX(64, ...) from the alignment calculation.
That's what I get for changing a patch without retesting it. :(

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73907
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Lu Hua <huax.lu@intel.com>
10 years agoradeon / r200: Eliminate BEGIN_BATCH_NO_AUTOSTATE
Ian Romanick [Mon, 20 Jan 2014 19:16:26 +0000 (11:16 -0800)]
radeon / r200: Eliminate BEGIN_BATCH_NO_AUTOSTATE

Sed job:

    grep -lr BEGIN_BATCH_NO_AUTOSTATE src/mesa/drivers/dri/ | while read f
    do
        cat $f | sed 's/BEGIN_BATCH_NO_AUTOSTATE/BEGIN_BATCH/g' > x
        mv x $f
    done

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
10 years agoradeon / r200: Remove unused 'dostate' parameter
Ian Romanick [Mon, 20 Jan 2014 19:08:36 +0000 (11:08 -0800)]
radeon / r200: Remove unused 'dostate' parameter

This parameter hasn't been used since January 2010 (commit 29e02c7).
Fixes the following warning in both radeon and r200:

radeon_common.c: In function 'r200_rcommonBeginBatch':
radeon_common.c:762:14: warning: unused parameter 'dostate' [-Wunused-parameter]

Note that now BEGIN_BATCH and BEGIN_PATCH_NO_AUTOSTATE are identical.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
10 years agoradeon / r200: Fix 'empty body' warning
Ian Romanick [Mon, 20 Jan 2014 18:56:13 +0000 (10:56 -0800)]
radeon / r200: Fix 'empty body' warning

radeon_common.c: In function 'radeon_draw_buffer':
radeon_common.c:237:3: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
10 years agoradeon / r200: Fix incompatible pointer type warning
Ian Romanick [Mon, 20 Jan 2014 18:41:31 +0000 (10:41 -0800)]
radeon / r200: Fix incompatible pointer type warning

When parameters were removed from dd_function_table::Viewport (commit
065bd6ff), radeon_viewport (in both radeon and r200) started generating
a warning.

radeon_common.c: In function 'r200_radeon_viewport':
radeon_common.c:415:15: warning: assignment from incompatible pointer type [enabled by default]
radeon_common.c:419:23: warning: assignment from incompatible pointer type [enabled by default]

I didn't notice this initially, and it's harmless because the function is
never called through the incorrectly typed pointer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
10 years agodraw: Save original driver functions earlier.
José Fonseca [Wed, 20 Jun 2012 13:25:46 +0000 (14:25 +0100)]
draw: Save original driver functions earlier.

Otherwise they will be NULL when stage destroy is invoked prematurely,
(i.e, on out of memory).

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
10 years agomesa: whitespace fixes in glformats.c
Brian Paul [Thu, 23 Jan 2014 15:29:54 +0000 (08:29 -0700)]
mesa: whitespace fixes in glformats.c

Reindent _mesa_get_nongeneric_internalformat() to match other functions.
Remove extraneous empty lines in _mesa_get_linear_internalformat().

Trivial.

10 years agosvga: minor code movement in svga_tgsi_insn.c
Brian Paul [Sat, 18 Jan 2014 13:08:49 +0000 (05:08 -0800)]
svga: minor code movement in svga_tgsi_insn.c

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agosvga: whitespace, formatting fixes in svga_state_framebuffer.c
Brian Paul [Sat, 18 Jan 2014 13:57:32 +0000 (05:57 -0800)]
svga: whitespace, formatting fixes in svga_state_framebuffer.c

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agosvga: simplify common immediate value construction
Brian Paul [Sat, 18 Jan 2014 12:53:43 +0000 (04:53 -0800)]
svga: simplify common immediate value construction

Use some new helper functions to make the code much more readable.
And fix wrong value for XPD's w result.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agosvga: add comments, etc to svga_tgsi_insn.c code
Brian Paul [Sat, 18 Jan 2014 12:28:47 +0000 (04:28 -0800)]
svga: add comments, etc to svga_tgsi_insn.c code

To make things a little easier to understand for newcomers.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agosvga: assorted cleanups in shader code
Brian Paul [Sat, 18 Jan 2014 11:53:27 +0000 (03:53 -0800)]
svga: assorted cleanups in shader code

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agosvga: rename shader_result -> variant
Brian Paul [Sat, 18 Jan 2014 11:45:41 +0000 (03:45 -0800)]
svga: rename shader_result -> variant

To be more consisten with other parts of gallium.  Plus, update/add
various comments.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
10 years agomesa: rename unbind_texobj_from_imgunits()
Brian Paul [Wed, 22 Jan 2014 18:32:28 +0000 (11:32 -0700)]
mesa: rename unbind_texobj_from_imgunits()

... to unbind_texobj_from_image_units() and change a local var's type
to silence an MSVC warning.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agoglsl: silence a couple warnings in find_active_atomic_counters()
Brian Paul [Wed, 22 Jan 2014 18:03:15 +0000 (10:03 -0800)]
glsl: silence a couple warnings in find_active_atomic_counters()

Silence unitialized variable 'id' warning.  Silence unused 'found' warning.
Only seen in release builds.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agomesa: initialize "is_layered" variable to silence warning
Brian Paul [Wed, 22 Jan 2014 18:02:28 +0000 (10:02 -0800)]
mesa: initialize "is_layered" variable to silence warning

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agomesa: fix/add some cases in _mesa_get_linear_internalformat()
Brian Paul [Wed, 22 Jan 2014 00:09:10 +0000 (16:09 -0800)]
mesa: fix/add some cases in _mesa_get_linear_internalformat()

In some cases we were converting generic formats to sized formats
and vice versa.  The point is to simply convert sRGB formats to
corresponding linear formats.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agomesa: add missing ETC2_SRGB cases in formats.c
Brian Paul [Wed, 22 Jan 2014 00:08:18 +0000 (16:08 -0800)]
mesa: add missing ETC2_SRGB cases in formats.c

In the _mesa_get_format_color_encoding() and _mesa_get_srgb_format_linear()
functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agoradeon: More missing stdio.h includes.
José Fonseca [Thu, 23 Jan 2014 14:20:20 +0000 (14:20 +0000)]
radeon: More missing stdio.h includes.

10 years agoos/os_thread: Revert pipe_barrier pre-processing logic.
José Fonseca [Thu, 23 Jan 2014 13:44:10 +0000 (13:44 +0000)]
os/os_thread: Revert pipe_barrier pre-processing logic.

Whitelist platforms instead of blacklisting, as several pthread
implementations are missing pthread_barrier_t, in particular MacOSX.

10 years agoc11: Fix missing pthread_mutex_timedlock declaration warnings on MacOSX.
José Fonseca [Thu, 23 Jan 2014 13:42:38 +0000 (13:42 +0000)]
c11: Fix missing pthread_mutex_timedlock declaration warnings on MacOSX.

10 years agoradeon: Adding missing stdio.h include.
José Fonseca [Thu, 23 Jan 2014 13:23:43 +0000 (13:23 +0000)]
radeon: Adding missing stdio.h include.

Became apparent with the C11 thread changes.  Unfortunately I didn't
have all dependencies to build the driver, and only noticed
this issue on build server.

10 years agomapi: Prevent cast from pointer to integer of different size.
José Fonseca [Thu, 23 Jan 2014 13:21:52 +0000 (13:21 +0000)]
mapi: Prevent cast from pointer to integer of different size.

On Windows64.

10 years agoc11: Update docs/license.html and include verbatim copy of Boost license.
José Fonseca [Thu, 23 Jan 2014 10:49:57 +0000 (10:49 +0000)]
c11: Update docs/license.html and include verbatim copy of Boost license.

10 years agoegl: Use C11 thread abstractions.
José Fonseca [Fri, 26 Apr 2013 07:04:17 +0000 (08:04 +0100)]
egl: Use C11 thread abstractions.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
10 years agomapi: Use C11 thread abstractions.
José Fonseca [Fri, 26 Apr 2013 07:04:06 +0000 (08:04 +0100)]
mapi: Use C11 thread abstractions.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
10 years agogallium: Use C11 thread abstractions.
José Fonseca [Fri, 26 Apr 2013 07:03:33 +0000 (08:03 +0100)]
gallium: Use C11 thread abstractions.

Note that PIPE_ROUTINE now returns an int.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
10 years agoc11: Import threads.h emulation library.
José Fonseca [Tue, 12 Mar 2013 10:37:46 +0000 (10:37 +0000)]
c11: Import threads.h emulation library.

Implementation is based of https://gist.github.com/2223710 with the
following modifications:
- inline implementatation
- retain XP compatability
- add temporary hack for static mutex initializers (as they are not part
  of the stack but still widely used internally)
- make TIME_UTC a conditional macro (some system headers already define
  it, so this prevents conflict)
- respect HAVE_PTHREAD macro

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Chad Versace <chad.versace@linux.intel.com>
10 years agoos: Remove pipe_static_condvar.
José Fonseca [Tue, 12 Mar 2013 11:54:58 +0000 (11:54 +0000)]
os: Remove pipe_static_condvar.

Never used.

Reviewed-by: Brian Paul <brianp@vmware.com>
10 years agodocs: Mark ARB_arrays_of_arrays as started
Timothy Arceri [Thu, 23 Jan 2014 12:24:45 +0000 (23:24 +1100)]
docs: Mark ARB_arrays_of_arrays as started

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoglsl: remove remaining is_array variables
Timothy Arceri [Thu, 23 Jan 2014 12:22:01 +0000 (23:22 +1100)]
glsl: remove remaining is_array variables

Previously the reason we needed is_array was because we used array_size == NULL to
 represent both non-arrays and unsized arrays.  Now that we use a non-NULL
array_specifier to represent an unsized array, is_array is redundant.

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoglsl: create type name for arrays of arrays
Timothy Arceri [Thu, 23 Jan 2014 12:21:02 +0000 (23:21 +1100)]
glsl: create type name for arrays of arrays

We need to insert outermost dimensions in the correct spot otherwise
 the dimension order will be backwards

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoglsl: Allow arrays of arrays as input to vertex shader
Timothy Arceri [Thu, 23 Jan 2014 12:20:25 +0000 (23:20 +1100)]
glsl: Allow arrays of arrays as input to vertex shader

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoglsl: only call mark_max_array if we are assigning an
Timothy Arceri [Thu, 23 Jan 2014 12:19:54 +0000 (23:19 +1100)]
glsl: only call mark_max_array if we are assigning an
 array

This change does not help fix or prevent any bugs
it just seems reasonable to do

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoglsl: Add ARB_arrays_of_arrays support to yacc definition and ast
Timothy Arceri [Thu, 23 Jan 2014 12:16:41 +0000 (23:16 +1100)]
glsl: Add ARB_arrays_of_arrays support to yacc definition and ast

Adds array specifier object to hold array information

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agomesa: Add ARB_arrays_of_arrays
Timothy Arceri [Thu, 23 Jan 2014 12:15:29 +0000 (23:15 +1100)]
mesa: Add ARB_arrays_of_arrays

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: switch eu-emitter to use FS IR and fs_generator
Topi Pohjolainen [Tue, 10 Dec 2013 13:12:30 +0000 (15:12 +0200)]
i965/blorp: switch eu-emitter to use FS IR and fs_generator

No regressions on IVB (piglit quick + unit tests).

v2 (Paul):
  - no need to patch the unit tests anymore. Original logic
    was altered and unit tests updated to match the
    fs-generator
  - lrp emission moves from the blorp compiler core into the
    emitter here (previously there was a separate refactoring
    patch which is not really needed anymore as the lrp logic
    got refactored when the original lrp logic got fixed).
  - pass 'BRW_BLORP_RENDERBUFFER_BINDING_TABLE_INDEX' to the
    generator in fs_inst::target instead of hardcoding it

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/fs: add support for BRW_OPCODE_AVG in fs_generator
Topi Pohjolainen [Tue, 17 Dec 2013 14:39:16 +0000 (16:39 +0200)]
i965/fs: add support for BRW_OPCODE_AVG in fs_generator

Needed for compiling blorp blit programs.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/fs: introduce blorp specific rt-write for fs_generator
Topi Pohjolainen [Tue, 17 Dec 2013 12:00:50 +0000 (14:00 +0200)]
i965/fs: introduce blorp specific rt-write for fs_generator

The compiler for blorp programs likes to emit instructions for
the message construction itself meaning that the generator needs
to skip any such when blorp programs are translated for the hw.
In addition, the binding table control is special for blorp
programs and the generator does not need to update the binding
tables associated with the compiler bookkeeping (this in fact
gets thrown away as the blorp compiler sets the program data
in its own way).

v2 (Paul): do not hardcode the binding table index but use
           fs_inst::target instead.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/fs: allow unit tests to dump the final patched assembly
Topi Pohjolainen [Wed, 11 Dec 2013 08:58:38 +0000 (10:58 +0200)]
i965/fs: allow unit tests to dump the final patched assembly

Unit tests comparing generated blorp programs to known good need
to have the dump in designated file instead of in default
standard output. The comparison also expects the jump counters
of if-else-instructions to be correctly set and hence the dump
needs to be taken _after_ 'patch_IF_ELSE()' is run (the default
dump of the fs_generator does this before).

v2 (Paul): dropped the redundant 'dump_enabled' argument

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap brw_IF/ELSE/ENDIF() into eu-emitter
Topi Pohjolainen [Mon, 2 Dec 2013 08:48:59 +0000 (10:48 +0200)]
i965/blorp: wrap brw_IF/ELSE/ENDIF() into eu-emitter

v2 (Paul): renamed emit_if() to emit_cmp_if()

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap RNDD (/brw_RNDD(&func, /emit_rndd(/)
Topi Pohjolainen [Fri, 29 Nov 2013 11:29:56 +0000 (13:29 +0200)]
i965/blorp: wrap RNDD (/brw_RNDD(&func, /emit_rndd(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap FRC (/brw_FRC(&func, /emit_frc(/)
Topi Pohjolainen [Fri, 29 Nov 2013 11:27:58 +0000 (13:27 +0200)]
i965/blorp: wrap FRC (/brw_FRC(&func, /emit_frc(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap MUL (/brw_MUL(&func, /emit_mul(/)
Topi Pohjolainen [Fri, 29 Nov 2013 11:20:11 +0000 (13:20 +0200)]
i965/blorp: wrap MUL (/brw_MUL(&func, /emit_mul(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap OR (/brw_OR(&func, /emit_or(/)
Topi Pohjolainen [Fri, 29 Nov 2013 11:05:57 +0000 (13:05 +0200)]
i965/blorp: wrap OR (/brw_OR(&func, /emit_or(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap SHL (/brw_SHL(&func, /emit_shl(/)
Topi Pohjolainen [Fri, 29 Nov 2013 11:02:32 +0000 (13:02 +0200)]
i965/blorp: wrap SHL (/brw_SHL(&func, /emit_shl(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap SHR (/brw_SHR(&func, /emit_shr(/)
Topi Pohjolainen [Fri, 29 Nov 2013 10:59:42 +0000 (12:59 +0200)]
i965/blorp: wrap SHR (/brw_SHR(&func, /emit_shr(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap ADD (/brw_ADD(&func, /emit_add(/)
Topi Pohjolainen [Fri, 29 Nov 2013 10:32:03 +0000 (12:32 +0200)]
i965/blorp: wrap ADD (/brw_ADD(&func, /emit_add(/)

In addition, the special case requiring explicit execution size
control is wrapped manually.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap AND (/brw_AND(&func, /emit_and(/)
Topi Pohjolainen [Fri, 29 Nov 2013 10:27:23 +0000 (12:27 +0200)]
i965/blorp: wrap AND (/brw_AND(&func, /emit_and(/)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap MOV (/brw_MOV(&func, /emit_mov(/)
Topi Pohjolainen [Fri, 29 Nov 2013 10:17:38 +0000 (12:17 +0200)]
i965/blorp: wrap MOV (/brw_MOV(&func, /emit_mov(/)

In addition, the two special cases requiring explicit execution
size control are wrapped manually.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap emission of if-equal-assignment
Topi Pohjolainen [Sat, 30 Nov 2013 15:11:41 +0000 (17:11 +0200)]
i965/blorp: wrap emission of if-equal-assignment

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: wrap emission of conditional assignment
Topi Pohjolainen [Sat, 30 Nov 2013 15:06:19 +0000 (17:06 +0200)]
i965/blorp: wrap emission of conditional assignment

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: move emission of sample combining into eu-emitter
Topi Pohjolainen [Mon, 2 Dec 2013 12:56:49 +0000 (14:56 +0200)]
i965/blorp: move emission of sample combining into eu-emitter

v2 (Paul): pass the combining opcode as an argument to emit_combine().
           This keeps manual_blend_average() selfcontained
           documentation wise.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: move emission of rt-write into eu-emitter
Topi Pohjolainen [Mon, 2 Dec 2013 12:12:39 +0000 (14:12 +0200)]
i965/blorp: move emission of rt-write into eu-emitter

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: move emission of texture lookup into eu-emitter
Topi Pohjolainen [Mon, 2 Dec 2013 12:01:54 +0000 (14:01 +0200)]
i965/blorp: move emission of texture lookup into eu-emitter

Resolving of the hardware message type is moved into the
emitter also in preparation for switching to use fs_generator.
The generator wants to translate the high level op-code into
the message type and hence the emitter needs to know the
original op-code.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/fs: introduce non-compressed equivalent of tex_cms
Topi Pohjolainen [Tue, 10 Dec 2013 14:38:15 +0000 (16:38 +0200)]
i965/fs: introduce non-compressed equivalent of tex_cms

v2: introduces 'SHADER_OPCODE_TXF_UMS' also for gen8

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965: rename tex_ms to tex_cms
Topi Pohjolainen [Tue, 10 Dec 2013 14:36:31 +0000 (16:36 +0200)]
i965: rename tex_ms to tex_cms

Prepares for the introduction of non-compressed multi-sampled
lookup used in the blorp programs.

v2: now also taking into account gen8

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: move emission of pixel kill into eu-emitter
Topi Pohjolainen [Mon, 2 Dec 2013 09:09:19 +0000 (11:09 +0200)]
i965/blorp: move emission of pixel kill into eu-emitter

The combination of four separate comparison operations and
and the masked "and" require special treatment when moving
to FS LIR.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965/blorp: introduce separate eu-emitter for blit compiler
Topi Pohjolainen [Fri, 29 Nov 2013 09:57:15 +0000 (11:57 +0200)]
i965/blorp: introduce separate eu-emitter for blit compiler

Prepares for presenting blorp blit programs using FS IR that
allows EU-assembly generation using i965 glsl-compiler
backend (fs_generator).

v2: rebased on top of endif-jump counter fix (moving the
    added brw_set_uip_jip() into the emitter)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
10 years agoi965: Support 32 texture image units on Haswell+.
Kenneth Graunke [Wed, 15 Jan 2014 18:08:38 +0000 (10:08 -0800)]
i965: Support 32 texture image units on Haswell+.

The Intel closed source OpenGL driver recently began supporting 32
texture image units on Haswell.  This makes the open source driver
support 32 as well.

Earlier generations don't have the message header field required to
support more than 16 sampler states, so we continue to advertise 16
there.

On Haswell, this causes us to advertise:
- GL_MAX_TEXTURE_IMAGE_UNITS = 32
- GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 32
- GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 96
instead of the old values of 16, 16, and 48.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/fs: Switch from BRW_MAX_TEX_UNIT to the actual limit.
Kenneth Graunke [Sat, 18 Jan 2014 22:48:11 +0000 (14:48 -0800)]
i965/fs: Switch from BRW_MAX_TEX_UNIT to the actual limit.

BRW_MAX_TEX_UNIT is about to grow, but only Gen7+ will be able to
support the new larger value.  On older platforms, we don't want to
allocate the extra space - it would just be a waste.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agomesa: Bump MAX_TEXTURE_IMAGE_UNITS to 32.
Kenneth Graunke [Wed, 15 Jan 2014 18:08:06 +0000 (10:08 -0800)]
mesa: Bump MAX_TEXTURE_IMAGE_UNITS to 32.

This allows drivers to optionally support more than 16 texture units.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/vec4: Support arbitrarily large sampler state indices on Haswell+.
Kenneth Graunke [Sat, 18 Jan 2014 22:32:49 +0000 (14:32 -0800)]
i965/vec4: Support arbitrarily large sampler state indices on Haswell+.

Like the scalar backend, we add an offset to the "Sampler State Pointer"
field to select a group of 16 samplers, then use the "Sampler Index"
field to select within that group.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/vec4: Refactor sampler message setup.
Kenneth Graunke [Sat, 18 Jan 2014 22:29:19 +0000 (14:29 -0800)]
i965/vec4: Refactor sampler message setup.

The next patch adds an additional case where the message header is
necessary.  So we want to do the g0 copy if inst->header_present is set,
rather than inst->texture_offset.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/vec4: Don't set header_present if texel offsets are all 0.
Kenneth Graunke [Sat, 18 Jan 2014 22:34:07 +0000 (14:34 -0800)]
i965/vec4: Don't set header_present if texel offsets are all 0.

In theory, a shader might use textureOffset() but set all the texel
offsets to zero.  In that case, we don't actually need to set up the
message header - zero is the implicit default.

By moving the texture_offset setup before the header_present setup, we
can easily only set header_present when there are non-zero texel offset
values.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/fs: Support arbitrarily large sampler state indices on Haswell+.
Kenneth Graunke [Sat, 18 Jan 2014 21:29:39 +0000 (13:29 -0800)]
i965/fs: Support arbitrarily large sampler state indices on Haswell+.

The message descriptor's "Sampler Index" field is only 4 bits (on all
generations of hardware), so it can only represent indices 0 through 15.

Haswell introduced a new field in the message header - "Sampler State
Pointer".  Normally, this is copied straight from g0, but we can also
add a byte offset (as long as it's a multiple of 32).

This patch uses a "Sampler State Pointer" offset to select a group of
16 sampler states, and then uses the "Sampler Index" field to select
the state within that group.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/fs: Plumb sampler index into emit_texture_gen7.
Kenneth Graunke [Sat, 18 Jan 2014 21:28:40 +0000 (13:28 -0800)]
i965/fs: Plumb sampler index into emit_texture_gen7.

We'll need this in the next patch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/fs: Refactor sampler message header to duplicate less code.
Kenneth Graunke [Sat, 18 Jan 2014 20:48:18 +0000 (12:48 -0800)]
i965/fs: Refactor sampler message header to duplicate less code.

Previously, the code to copy g0 to the message header existed in two
places - one for the texture offset case, and one for any other case.

By treating texture_offset as a special case of header_present, we can
remove this duplication and shorten the code.  Future patches which add
new header fields also won't have to add additional duplication.

This also clarifies a confusing construct.  The old code contained:

   } else if (inst->header_present) {
      if (brw->gen >= 7) {
         ...explicit copy from g0 to the message header...
      } else {
         /* Set up an implied move from g0 to the MRF. */
      }
   }

This looks like it might set up an implied move on Sandybridge, which
doesn't support those.  However, Sandybridge only uses a message header
for texture offsets, so it would never hit this code path.  The new code
avoids this implicit knowledge by only setting up an implied move on
Gen4-5.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965: Use get_element_ud to shorten texture header access.
Kenneth Graunke [Sat, 18 Jan 2014 20:49:58 +0000 (12:49 -0800)]
i965: Use get_element_ud to shorten texture header access.

This is shorter, easier to read, and further from the 80 column limit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agogallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats
Marek Olšák [Tue, 21 Jan 2014 18:53:45 +0000 (19:53 +0100)]
gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats

This fixes a serious regression introduced
in 4e549ddb500cf677b6fa16d9ebdfa67cc23da097.

Cc: 9.2 10.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
10 years agogallium: remove PIPE_CAP_SCALED_RESOLVE
Marek Olšák [Fri, 17 Jan 2014 21:57:39 +0000 (22:57 +0100)]
gallium: remove PIPE_CAP_SCALED_RESOLVE

If any driver doesn't support this, it can use a blit after resolving
the samples.

Reviewed-by: Brian Paul <brianp@vmware.com>
10 years agoradeonsi: use hardware scissors correctly
Marek Olšák [Mon, 13 Jan 2014 22:42:18 +0000 (23:42 +0100)]
radeonsi: use hardware scissors correctly

Use the WINDOW and VPORT scissors for the framebuffer and scissor test,
respectively. The other two scissors are disabled (they cover the max fb size).

We actually have 16 VPORT scissors, which will map well to ARB_viewport_array.

Also, we don't need to write SC_WINDOW_OFFSET with this commit, because it's
disabled everywhere.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoradeonsi: handle R600_CONTEXT_PS_PARTIAL_FLUSH in si_emit_cache_flush
Marek Olšák [Mon, 13 Jan 2014 12:15:19 +0000 (13:15 +0100)]
radeonsi: handle R600_CONTEXT_PS_PARTIAL_FLUSH in si_emit_cache_flush

For consistency only, This is unused by radeonsi currently.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
10 years agor600g,radeonsi: if discarding whole buffer range, discard whole resource instead
Marek Olšák [Mon, 13 Jan 2014 12:10:06 +0000 (13:10 +0100)]
r600g,radeonsi: if discarding whole buffer range, discard whole resource instead

Also set the unsynchronized flag if the whole resource was discarded
to avoid doing buffer-busy checks again.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>