mesa.git
11 years agoglx: Replace DRI2SwapInterval custom protocol with XCB.
Eric Anholt [Tue, 25 Sep 2012 19:15:19 +0000 (12:15 -0700)]
glx: Replace DRI2SwapInterval custom protocol with XCB.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Reuse setSwapInterval for setting initial swap interval.
Eric Anholt [Tue, 25 Sep 2012 19:14:44 +0000 (12:14 -0700)]
glx: Reuse setSwapInterval for setting initial swap interval.

11 years agoglx: Allow glXSwapInterval(0) when vblank_mode=0.
Eric Anholt [Thu, 4 Oct 2012 20:42:16 +0000 (13:42 -0700)]
glx: Allow glXSwapInterval(0) when vblank_mode=0.

There's no reason to say no in this case.

11 years agoglx: Replace DRI2GetMSC custom protocol with XCB.
Eric Anholt [Tue, 25 Sep 2012 19:05:28 +0000 (12:05 -0700)]
glx: Replace DRI2GetMSC custom protocol with XCB.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Replace DRI2WaitForMSC custom protocol with XCB.
Eric Anholt [Tue, 25 Sep 2012 19:01:27 +0000 (12:01 -0700)]
glx: Replace DRI2WaitForMSC custom protocol with XCB.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Replace DRI2WaitForSBC custom protocol with XCB.
Eric Anholt [Tue, 25 Sep 2012 18:39:17 +0000 (11:39 -0700)]
glx: Replace DRI2WaitForSBC custom protocol with XCB.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx/dri1: Remove uncompiled __DRI_SWAP_BUFFER_COUNTER code.
Eric Anholt [Tue, 25 Sep 2012 18:40:36 +0000 (11:40 -0700)]
glx/dri1: Remove uncompiled __DRI_SWAP_BUFFER_COUNTER code.

It's been in place but never enabled since 2010.  Note how one piece called a
DRI2 function, suggesting never being tested.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoegl: Quit checking for a bug in old xcb when we require new xcb.
Eric Anholt [Tue, 25 Sep 2012 16:03:48 +0000 (09:03 -0700)]
egl: Quit checking for a bug in old xcb when we require new xcb.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoegl: Drop xcb ifdefs by just requiring a version from this year.
Eric Anholt [Tue, 25 Sep 2012 16:09:47 +0000 (09:09 -0700)]
egl: Drop xcb ifdefs by just requiring a version from this year.

glx and gallium's xcb_dri2 usage already require this version, so this is
nothing really new.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoegl: Unifdef dri_interface.h defines.
Eric Anholt [Tue, 25 Sep 2012 16:01:20 +0000 (09:01 -0700)]
egl: Unifdef dri_interface.h defines.

dri_interface.h comes from our tree, so why litter our tree with ifdefs for
older versions of it?

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Unifdef some dri_interface.h defines.
Eric Anholt [Tue, 25 Sep 2012 16:00:04 +0000 (09:00 -0700)]
glx: Unifdef some dri_interface.h defines.

dri_interface.h comes from our tree, so why litter our tree with ifdefs for
older versions of it?

I left in the DRI_TEX_BUFFER_VERSION ifdefs, which is broken and uncompiled
(the version wasn't bumped from 2 to 3 when the patch was landed), but I don't
know what should be done with it.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Require xcb_dri2 for building glxdri2.c.
Eric Anholt [Tue, 25 Sep 2012 15:43:44 +0000 (08:43 -0700)]
glx: Require xcb_dri2 for building glxdri2.c.

I'm going to transition a bunch of the protocol to using XCB so we can stop
rolling it ourselves.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Remove the last user of -DUSE_XCB.
Eric Anholt [Tue, 25 Sep 2012 16:07:04 +0000 (09:07 -0700)]
glx: Remove the last user of -DUSE_XCB.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoglx: Unifdef USE_XCB.
Eric Anholt [Tue, 25 Sep 2012 15:39:39 +0000 (08:39 -0700)]
glx: Unifdef USE_XCB.

It's been required for building glx since
b518dfb513742984f27577d25566f93afd86d4fc in january.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoegl: Cleanly cast EGLNative* pointers to X11 types.
Eric Anholt [Tue, 25 Sep 2012 17:09:12 +0000 (10:09 -0700)]
egl: Cleanly cast EGLNative* pointers to X11 types.

The EGLNative* types are all defined to be pointers across all our EGL
implementations, but in the X11 platform they're actually just XIDs (32-bit
integers).

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agor600g: use a select to handle front/back color in llvm
Vincent Lejeune [Sun, 23 Sep 2012 17:46:53 +0000 (19:46 +0200)]
r600g: use a select to handle front/back color in llvm

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agor600g: frontcolor tracks its associated backcolor
Vincent Lejeune [Sun, 23 Sep 2012 14:52:30 +0000 (16:52 +0200)]
r600g: frontcolor tracks its associated backcolor

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agoRemove VAAPI support.
Matt Turner [Fri, 7 Sep 2012 18:12:11 +0000 (11:12 -0700)]
Remove VAAPI support.

Not working and unmaintained.

Reviewed-by: Christian König <christian.koenig@amd.com>
11 years agonv50: fix build after "nv50: fix printf warning"
Marcin Slusarz [Tue, 9 Oct 2012 20:36:35 +0000 (22:36 +0200)]
nv50: fix build after "nv50: fix printf warning"

When compiled with C++ compiler, inttypes.h defines PRI* macros only when
__STDC_FORMAT_MACROS is defined.

11 years agonouveau: use pre-calculated stride for resource_get_handle
Marcin Slusarz [Mon, 1 Oct 2012 23:52:23 +0000 (01:52 +0200)]
nouveau: use pre-calculated stride for resource_get_handle

Fixes FDO#55294.

NOTE: This is a candidate for the 9.0 branch.

11 years agor600g: Fix build with --enable-opencl
Tom Stellard [Tue, 9 Oct 2012 19:54:12 +0000 (19:54 +0000)]
r600g: Fix build with --enable-opencl

11 years agomesa/tests: Remove driverCtx parameter from call to _mesa_initialize_context
Ian Romanick [Tue, 9 Oct 2012 00:50:38 +0000 (17:50 -0700)]
mesa/tests: Remove driverCtx parameter from call to _mesa_initialize_context

Fixes 'make check' breakage since 733dba2.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agointel: Add missing #include <time.h>
Quentin Glidic [Tue, 9 Oct 2012 13:15:47 +0000 (15:15 +0200)]
intel: Add missing #include <time.h>

Commit 006c1a3c652803e2ff8d5f7ea55c9cb5d8353279 introduced a call to
clock_gettime, but failed to include <time.h>, breaking the build in
some cases.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Delete some dead code from brw_eu_emit.c.
Kenneth Graunke [Mon, 8 Oct 2012 16:51:08 +0000 (09:51 -0700)]
i965: Delete some dead code from brw_eu_emit.c.

Presumably some of this was used by the old fragment shader backend.

11 years agodocs: add missing release date
Andreas Boll [Tue, 9 Oct 2012 15:50:27 +0000 (17:50 +0200)]
docs: add missing release date

11 years agodocs: update release notes for 9.0
Andreas Boll [Tue, 9 Oct 2012 15:36:41 +0000 (17:36 +0200)]
docs: update release notes for 9.0

11 years agodocs: add news item for 9.0 release
Andreas Boll [Tue, 9 Oct 2012 15:11:06 +0000 (17:11 +0200)]
docs: add news item for 9.0 release

Reviewed-by: Brian Paul <brianp@vmware.com>
ported manually from
8e73273cb95626d9def012eeb508160e4022ff60

11 years agomesa: remove unused _mesa_cpal_compressed_format_type() function
Brian Paul [Mon, 8 Oct 2012 23:45:57 +0000 (17:45 -0600)]
mesa: remove unused _mesa_cpal_compressed_format_type() function

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agonv50: fix printf warning
Marek Olšák [Tue, 9 Oct 2012 12:38:43 +0000 (14:38 +0200)]
nv50: fix printf warning

11 years agonv30: fix type conversion warning
Marek Olšák [Tue, 9 Oct 2012 12:34:27 +0000 (14:34 +0200)]
nv30: fix type conversion warning

11 years agoi915g: fix unused variable and type conversion warnings
Marek Olšák [Tue, 9 Oct 2012 12:33:16 +0000 (14:33 +0200)]
i915g: fix unused variable and type conversion warnings

11 years agoteximage: Remove unnecessary compressed format check
Daniel Stone [Tue, 9 Oct 2012 03:41:38 +0000 (14:41 +1100)]
teximage: Remove unnecessary compressed format check

Ever since df4a88ac, the check for compressed formats has been
unnecessary.  And ever since cb72ec5f, the build has been broken with
FEATURE_ES.  Remove it, as it does nothing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
11 years agodocs: update FAQ
Andreas Boll [Fri, 5 Oct 2012 21:14:10 +0000 (23:14 +0200)]
docs: update FAQ

Reported-by: Fabio Pedretti <fabio.ped@libero.it>
v2: (Chad Versace <chad.versace@linux.intel.com>)
  - Rewrite FAQ - proper place for installing mesa.

v3: fix some typos

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agonv50: point vertex runout at a valid address
Ben Skeggs [Mon, 8 Oct 2012 00:25:39 +0000 (10:25 +1000)]
nv50: point vertex runout at a valid address

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agonvc0: point vertex runout at a valid address
Ben Skeggs [Mon, 8 Oct 2012 00:16:49 +0000 (10:16 +1000)]
nvc0: point vertex runout at a valid address

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agonvc0: fix missing permanent bo reference on poly cache
Ben Skeggs [Sun, 7 Oct 2012 23:13:46 +0000 (09:13 +1000)]
nvc0: fix missing permanent bo reference on poly cache

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoRevert "st/mesa: remove unused variables to fix compile warnings"
Brian Paul [Mon, 8 Oct 2012 23:31:10 +0000 (17:31 -0600)]
Revert "st/mesa: remove unused variables to fix compile warnings"

This reverts commit 810d2e167c5a507084d1865a260809b847ca3201.

The pscreen variable is used in an assertion.  Use "(void) pscreen;"
to silence the warning.

11 years agomesa: minor whitespace fixes in teximage.c
Brian Paul [Mon, 8 Oct 2012 21:18:48 +0000 (15:18 -0600)]
mesa: minor whitespace fixes in teximage.c

11 years agost/mesa: remove unused variables to fix compile warnings
Marek Olšák [Mon, 8 Oct 2012 23:11:56 +0000 (01:11 +0200)]
st/mesa: remove unused variables to fix compile warnings

11 years agomesa: remove unused variables to fix compile warnings
Marek Olšák [Mon, 8 Oct 2012 23:11:56 +0000 (01:11 +0200)]
mesa: remove unused variables to fix compile warnings

11 years agosoftpipe: initialize quadColor2 to fix compile warnings
Marek Olšák [Mon, 8 Oct 2012 23:11:56 +0000 (01:11 +0200)]
softpipe: initialize quadColor2 to fix compile warnings

11 years agor600g: remove unused variables to fix compile warnings
Marek Olšák [Mon, 8 Oct 2012 23:11:56 +0000 (01:11 +0200)]
r600g: remove unused variables to fix compile warnings

11 years agollvmpipe: remove unused variables to fix compile warnings
Marek Olšák [Mon, 8 Oct 2012 23:10:56 +0000 (01:10 +0200)]
llvmpipe: remove unused variables to fix compile warnings

11 years agoi915g: Don't clobber I915_NEW_FS on new framebuffer.
Stéphane Marchesin [Mon, 8 Oct 2012 19:30:46 +0000 (12:30 -0700)]
i915g: Don't clobber I915_NEW_FS on new framebuffer.

This snuck in with a previous commit.

11 years agoi965/fs: Improve performance of copy/constant propagation.
Eric Anholt [Fri, 21 Sep 2012 14:06:17 +0000 (16:06 +0200)]
i965/fs: Improve performance of copy/constant propagation.

Use a simple chaining hash table for the ACP.  This is not really very good,
because we still do a full walk of the tree per destination write, but it
still reduces fp-long-alu runtime from 5.3 to 3.9s.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965/fs: Move constant propagation to the same codebase as copy prop.
Eric Anholt [Fri, 21 Sep 2012 11:11:54 +0000 (13:11 +0200)]
i965/fs: Move constant propagation to the same codebase as copy prop.

This means that we don't get constant prop across into the first block after a
BRW_OPCODE_IF or a BRW_OPCODE_DO, but we have hope for properly doing it
across control flow at some point.  More importantly, with the next commit it
will help avoid O(n^2) with instruction count runtime for shaders that have
many constant moves.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Remove the old ARB_fragment_program backend.
Eric Anholt [Tue, 18 Sep 2012 09:29:43 +0000 (02:29 -0700)]
i965: Remove the old ARB_fragment_program backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Replace brw_wm_* with dumping code into the fs_visitor.
Eric Anholt [Mon, 27 Aug 2012 21:35:01 +0000 (14:35 -0700)]
i965: Replace brw_wm_* with dumping code into the fs_visitor.

This makes a giant pile of code newly dead.  It also fixes TXB on newer
chipsets, which has been totally broken (I now have a piglit test for that).
It passes the same set of Ian's ARB_fragment_program tests.  It also improves
high-settings ETQW performance by 3.2 +/- 1.9% (n=3), thanks to better
optimization and having 8-wide along with 16-wide shaders.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24355
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Reduce maximum GL_ARB_fragment_program instruction count to 1024.
Eric Anholt [Fri, 21 Sep 2012 14:04:52 +0000 (16:04 +0200)]
i965: Reduce maximum GL_ARB_fragment_program instruction count to 1024.

I don't know of any programs that would need more than this.  The larger
programs I've seen have neared 100 instructions.  This prevent excessive
runtimes of automatic tests that attempt to test up to the exposed maximums
(like fp-long-alu).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965/fs: Add a couple more algebraic cases that help some ARB_fp patterns.
Eric Anholt [Thu, 20 Sep 2012 09:06:07 +0000 (11:06 +0200)]
i965/fs: Add a couple more algebraic cases that help some ARB_fp patterns.

ARB_fp doesn't go through the GLSL optimizer, and these were things you see
frequently thanks to conditionals being lowered to SLT/SGE and MUL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.
Eric Anholt [Sat, 22 Sep 2012 15:25:20 +0000 (17:25 +0200)]
i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.

This will be reused from the ARB_fp compiler.  I touched up the pre-gen6 path
to not overwrite dst in the first instruction, which prevents the need for
aliasing checks (we'll need that in the ARB_fp compiler, but it actually
hasn't been needed in this codebase since the revert of the nasty old
MOV-avoidance code).  I also made the conditional_mod between gen6 and
pre-gen6 consistent, which shouldn't matter except for denorm/(+/-)0
comparisons where the choice between left and right hand side of the
comparison changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965/fs: Refactor rectangle/GL_CLAMP texture coordinate adjustment.
Eric Anholt [Sat, 22 Sep 2012 14:56:02 +0000 (16:56 +0200)]
i965/fs: Refactor rectangle/GL_CLAMP texture coordinate adjustment.

We'll want to reuse this for ARB_fp handling.

v2: Fold the remaining bit of emit_texcoord back into visit(ir_texture).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965/fs: Pass fragment depth to the fb write as a fs_reg, not an ir_variable.
Eric Anholt [Tue, 18 Sep 2012 16:12:48 +0000 (18:12 +0200)]
i965/fs: Pass fragment depth to the fb write as a fs_reg, not an ir_variable.

This will be used for the ARB_fp change to use this backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Note that OPCODE_RFL is not part of ARB_fp (it's NV_fp only).
Eric Anholt [Thu, 20 Sep 2012 09:39:10 +0000 (11:39 +0200)]
mesa: Note that OPCODE_RFL is not part of ARB_fp (it's NV_fp only).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agost/wgl: Don't cache HDC anywhere.
José Fonseca [Mon, 8 Oct 2012 10:40:58 +0000 (11:40 +0100)]
st/wgl: Don't cache HDC anywhere.

Applications may destroy HDC at any time. So always get a HDC as needed.

Fixes lack of presents with Solidworks eDrawings when screen resolution is
changed.

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agometa: Make shader template literal strings be parameters to asprintf
Ian Romanick [Fri, 5 Oct 2012 22:19:45 +0000 (15:19 -0700)]
meta: Make shader template literal strings be parameters to asprintf

This enables the C compiler to generate warnings if the formats and the
arguments don't match.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agometa: Always enable GL_EXT_texture_array in mipmap shader
Ian Romanick [Fri, 5 Oct 2012 22:17:29 +0000 (15:17 -0700)]
meta: Always enable GL_EXT_texture_array in mipmap shader

'#extension foo: enable' is harmless.  The functionality is only
actually enabled if the extension is supported.  The shader won't use
the functionality if it's not supported, so we're fine.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agometa: Since mipmap output type is always vec4, don't sprintf it
Ian Romanick [Fri, 5 Oct 2012 22:16:24 +0000 (15:16 -0700)]
meta: Since mipmap output type is always vec4, don't sprintf it

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agometa: Don't use GLSL 1.30 shader on OpenGL ES 2
Ian Romanick [Fri, 5 Oct 2012 22:22:54 +0000 (15:22 -0700)]
meta: Don't use GLSL 1.30 shader on OpenGL ES 2

Fixes GLES2 CoverageGL conformance test.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agometa: Rearrange shader creation in setup_glsl_generate_mipmap
Ian Romanick [Fri, 5 Oct 2012 22:13:34 +0000 (15:13 -0700)]
meta: Rearrange shader creation in setup_glsl_generate_mipmap

The diff looks weird, but this moves the code from the first 'if
(ctx->Const.GLSLVersion < 130)' block down into the second block.  It
also moves some variable decalarations closer to their use.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agometa: Remove unsafe global mem_ctx pointer
Ian Romanick [Fri, 5 Oct 2012 22:11:31 +0000 (15:11 -0700)]
meta: Remove unsafe global mem_ctx pointer

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agoi915g: Call draw_set_mapped_vertex_buffer from draw_vbo
Stéphane Marchesin [Sat, 6 Oct 2012 20:08:36 +0000 (13:08 -0700)]
i915g: Call draw_set_mapped_vertex_buffer from draw_vbo

This regressed with the draw rework. Fixes glest and vdrift crash.

11 years agor600g: fix possible issue with stencil mipmap rendering
Marek Olšák [Sat, 6 Oct 2012 03:23:47 +0000 (05:23 +0200)]
r600g: fix possible issue with stencil mipmap rendering

Somehow I only hit this issue with my latest libdrm changes.
This won't be needed with DB texturing.

NOTE: This is a candidate for the 9.0 branch.

11 years agor600g: ensure PERFECT_ZPASS+NOOP_CULL_DISABLE are 0 for blits+decompression
Marek Olšák [Sat, 29 Sep 2012 01:33:29 +0000 (03:33 +0200)]
r600g: ensure PERFECT_ZPASS+NOOP_CULL_DISABLE are 0 for blits+decompression

When an occlusion query was active, the derived DB state wasn't changed
for u_blitter even though all the occlusion queries were suspended.

It's fixed by moving the state update into the emit functions, which are
called whenever queries are stopped or suspended.

11 years agor600g: don't modify pipe_resource in resource_copy_region, fixing race condition
Marek Olšák [Sun, 23 Sep 2012 21:12:17 +0000 (23:12 +0200)]
r600g: don't modify pipe_resource in resource_copy_region, fixing race condition

pipe_resource can be shared between contexts, we shouldn't modify its
description. Instead, let's use the resource "views" (sampler views and
surfaces), where we can freely change almost any property of a resource.

11 years agor600g: fix streamout on RS780 and RS880
Marek Olšák [Mon, 24 Sep 2012 23:43:49 +0000 (01:43 +0200)]
r600g: fix streamout on RS780 and RS880

The latest kernel from git is required. Transform feedback (along with GL3.0)
is turned off on older kernels.

11 years agogallium: allow debug helpers in the release build
Marek Olšák [Thu, 4 Oct 2012 20:31:49 +0000 (22:31 +0200)]
gallium: allow debug helpers in the release build

No idea why this is #ifdef'd. Trace and Noop are definitely useful no matter
how Mesa is built.

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: remove the driverCtx parameter to _mesa_create/initialize_context()
Brian Paul [Sat, 29 Sep 2012 14:47:56 +0000 (08:47 -0600)]
mesa: remove the driverCtx parameter to _mesa_create/initialize_context()

No longer used.

11 years agomesa: remove unused gl_context::DriverCtx field
Brian Paul [Sat, 29 Sep 2012 14:47:56 +0000 (08:47 -0600)]
mesa: remove unused gl_context::DriverCtx field

11 years agoradeon/r200: remove use of gl_context::DriverCtx field
Brian Paul [Sat, 29 Sep 2012 14:47:55 +0000 (08:47 -0600)]
radeon/r200: remove use of gl_context::DriverCtx field

11 years agoradeon/r200: make radeon_context subclass of gl_context
Brian Paul [Sat, 29 Sep 2012 14:47:55 +0000 (08:47 -0600)]
radeon/r200: make radeon_context subclass of gl_context

radeon_context now contains a gl_context, rather than a pointer to one.
This will allow some minor core Mesa clean-up.

11 years agomesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.
Kenneth Graunke [Tue, 2 Oct 2012 03:11:38 +0000 (20:11 -0700)]
mesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.

The idea here is to not flag _NEW_VARYING_VP_INPUTS when shaders (either
GLSL or ARB vp/fp) are in use.  If either TNL or TexEnv programs are
active, at least one stage is using fixed function.

On Pineview, fixes 20 Piglit, 60 oglconforms, and 7 ES 1.1 conformance
tests, as well as missing textures in Xonotic.  These were all
regressions since commit fb4a34e60eb4c1bdc7b0fdcd98d1bf3038c354e8.

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49127
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54807
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoi915g: Get rid of the fixup state functions.
Stéphane Marchesin [Fri, 5 Oct 2012 00:57:31 +0000 (17:57 -0700)]
i915g: Get rid of the fixup state functions.

Now that the saved_* state is gone, we don't need those any longer.

11 years agoi915g: Remove the i915_context->saved_* stuff.
Stéphane Marchesin [Fri, 5 Oct 2012 00:37:37 +0000 (17:37 -0700)]
i915g: Remove the i915_context->saved_* stuff.

When using u_blitter, the state was being saved from saved_*, but we
don't use that. So after u_blitter resumed we got some corrupted
state in.

So let's just remove the saved_* stuff. I thought it was weird but
harmless, it's actually broken.

11 years agoi915g: Don't update I915_HW_PROGRAM in update_framebuffer
Stéphane Marchesin [Fri, 5 Oct 2012 00:33:22 +0000 (17:33 -0700)]
i915g: Don't update I915_HW_PROGRAM in update_framebuffer

It's already going to be updated in update_dst_buf_vars.

11 years agoRevert "i915g: Don't bind 0-length programs"
Stéphane Marchesin [Fri, 5 Oct 2012 19:43:49 +0000 (12:43 -0700)]
Revert "i915g: Don't bind 0-length programs"

This reverts commit 8c28a9bd733f5b51ab459c6bc626a5aaac5a6c0c.

11 years agoglapi: Do not use backtrace on Cygwin.
Vinson Lee [Sat, 29 Sep 2012 22:22:14 +0000 (15:22 -0700)]
glapi: Do not use backtrace on Cygwin.

execinfo.h is not available on Cygwin.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: don't enable glVertexPointer() when using API_OPENGLES2.
Paul Berry [Wed, 3 Oct 2012 21:20:17 +0000 (14:20 -0700)]
mesa: don't enable glVertexPointer() when using API_OPENGLES2.

This function is only present in GLES1 and in the OpenGL compatibility
profile.

Fixes the following "make check" failure:

    [----------] 1 test from DispatchSanity_test
    [ RUN      ] DispatchSanity_test.GLES2
    Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
    compression/decompression unavailable
    dispatch_sanity.cpp:122: Failure
    Value of: table[i]
       Actual: 0x4de54e
    Expected: (_glapi_proc) _mesa_generic_nop
    Which is: 0x41af72
    i = 321
    [  FAILED  ] DispatchSanity_test.GLES2 (4 ms)
    [----------] 1 test from DispatchSanity_test (4 ms total)

NOTE: This is a candidate for stable release branches.

Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Tested-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoi915g: Don't bind 0-length programs
Stéphane Marchesin [Thu, 4 Oct 2012 04:06:56 +0000 (21:06 -0700)]
i915g: Don't bind 0-length programs

Since we started doing fixups for different render target formats,
this has been an issue. Instead just don't do anything, when the
program gets emitted later it'll get the correct fixup.

Fixes a bunch of piglit tests.

11 years agomesa: don't call TexImage driver hooks for zero-sized images
Brian Paul [Tue, 2 Oct 2012 15:51:12 +0000 (09:51 -0600)]
mesa: don't call TexImage driver hooks for zero-sized images

This simply avoids some failed assertions but there's no reason to
call the driver hooks for storing a tex image if its size is zero.

Note: This is a candidate for the stable branches.

11 years agointel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case
Rob Bradford [Tue, 2 Oct 2012 13:18:39 +0000 (14:18 +0100)]
intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case

413c49141 added an optimisation to improve the performance of teximage
under a limited set of circumstances. If GL_EXT_unpack_subimage has been
used then we we must also skip this optimisation since the optimised
codepath does not take the packing values into consideration.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agodri drivers: Link dricommon before dynamic libraries
Matt Turner [Mon, 1 Oct 2012 20:00:18 +0000 (13:00 -0700)]
dri drivers: Link dricommon before dynamic libraries

I think libtool should be handling this for us, but the build fails for
Jordan because libdricommon (a static library, which uses expat) appears
before -lexpat on the linker command.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoregister_allocate: don't consider trivially colorable registers for spilling.
Paul Berry [Fri, 28 Sep 2012 21:21:38 +0000 (14:21 -0700)]
register_allocate: don't consider trivially colorable registers for spilling.

Previously, we considered all registers as candidates for spilling.
This was counterproductive--for any registers that have already been
removed from the interference graph, there is no benefit to spilling
them, since they don't contribute to register pressure.

This patch ensures that we will only try to spill registers that are
still in the interference graph after register allocation has failed.

This is consistent with the recommendations of the paper "Retargetable
Graph-Coloring Register Allocation for Irregular Architectures", on
which our register allocator is based.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoglx/dri2: use uint64_t instead of double to represent time for FPS calculation
Marek Olšák [Sun, 30 Sep 2012 19:41:33 +0000 (21:41 +0200)]
glx/dri2: use uint64_t instead of double to represent time for FPS calculation

Wine or a windows app changes fpucw to 0x7f, causing doubles to be equivalent
to floats, which broke the calculation of FPS.
We should be very careful about using doubles in Mesa.

Henri Verbeet adds:
  For reference, this is done by for example d3d9 when a D3D device is
  created without D3DCREATE_FPU_PRESERVE set. In the general case
  applications can do all kinds of terrible things to the FPU control
  word of course.

11 years agomesa: tests: EnumStrings.LookUpByNumber
Oliver McFadden [Mon, 1 Oct 2012 23:31:03 +0000 (02:31 +0300)]
mesa: tests: EnumStrings.LookUpByNumber

[ RUN      ] EnumStrings.LookUpByNumber
enum_strings.cpp:43: Failure
Value of: _mesa_lookup_enum_by_nr(everything[i].value)
  Actual: "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE"
Expected: everything[i].name
Which is: "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT"
enum_strings.cpp:43: Failure
Value of: _mesa_lookup_enum_by_nr(everything[i].value)
  Actual: "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE"
Expected: everything[i].name
Which is: "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT"
[  FAILED  ] EnumStrings.LookUpByNumber (2 ms)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55505
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
11 years agodocs: add link to the GLSL compiler page
Andreas Boll [Tue, 2 Oct 2012 13:38:17 +0000 (15:38 +0200)]
docs: add link to the GLSL compiler page

This reverts commit 9e0931e355a21ff9902a4127cc63b392d8def0cd

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agodocs: update shading documentation
Andreas Boll [Tue, 2 Oct 2012 13:35:27 +0000 (15:35 +0200)]
docs: update shading documentation

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agobuild: Remove autoconf check for signbit
Matt Turner [Wed, 3 Oct 2012 05:50:02 +0000 (22:50 -0700)]
build: Remove autoconf check for signbit

rebase failure in 7da12426f7682ffc44ae40e31d1b5712521fbb70.

11 years agoi915g: Implement srgb textures the easy way.
Stéphane Marchesin [Mon, 1 Oct 2012 08:57:33 +0000 (01:57 -0700)]
i915g: Implement srgb textures the easy way.

Since the hw can do it, let's use the hw. It's less accurate
but doesn't have the shader instruction count shortcomings.

11 years agoi915g: Use X tiling for textures
Stéphane Marchesin [Tue, 11 Sep 2012 03:56:29 +0000 (20:56 -0700)]
i915g: Use X tiling for textures

This is what the classic driver does, and it allows faster
texture uploads.

11 years agoSwapBuffersRegionNOK: invert rectangles on y axis
Robert Bragg [Tue, 18 Sep 2012 15:10:03 +0000 (16:10 +0100)]
SwapBuffersRegionNOK: invert rectangles on y axis

The EGL_NOK_swap_region2 spec states that the rectangles are specified
with a bottom-left origin within a surface coordinate space also with a
bottom left origin, so this patch ensures the rectangles are flipped
before passing them on to dri2_copy_region.

Fixes piglit's egl-nok-swap-region test.

Tested-by: Matt Turner <mattst88@gmail.com>
11 years agomesa: remove bogus compressed texture size checks
Brian Paul [Tue, 2 Oct 2012 15:52:55 +0000 (09:52 -0600)]
mesa: remove bogus compressed texture size checks

A compressed texture image size doesn't have to be a multiple of the
compressed block size (only sub-images do).  Fixes issues when building
compressed mipmaps because we often wind up with non-block-size images
for the higher mipmap levels.

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

Note: This is a candidate for the stable branches.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Sven Arvidsson <sa@whiz.se>
11 years agoradeonsi: Fix double compilation of shader variants.
Michel Dänzer [Thu, 27 Sep 2012 14:39:26 +0000 (16:39 +0200)]
radeonsi: Fix double compilation of shader variants.

Fixes crash in piglit glsl-max-varyings.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: Better indexing of parameters in the pixel shader.
Michel Dänzer [Thu, 27 Sep 2012 18:01:33 +0000 (20:01 +0200)]
radeonsi: Better indexing of parameters in the pixel shader.

We were previously using the TGSI input index, which can exceed the number of
parameters passed from the vertex shader via the parameter cache. Now we use
a separate index which only counts those parameters.

Prevents piglit regressions with the following fix.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeon/llvm: Disable SI flow control again for now.
Michel Dänzer [Thu, 27 Sep 2012 12:15:44 +0000 (14:15 +0200)]
radeon/llvm: Disable SI flow control again for now.

It makes piglit unreliable due to VM protection faults and GPU lockups.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agodocs/helpwanted: cleanup todo list links
Andreas Boll [Tue, 2 Oct 2012 12:05:44 +0000 (14:05 +0200)]
docs/helpwanted: cleanup todo list links

split into common and driver specific To-Do lists
add an explanation for each To-Do list

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agodocs: document how to apply a candidate to a stable branch
Andreas Boll [Tue, 2 Oct 2012 11:55:53 +0000 (13:55 +0200)]
docs: document how to apply a candidate to a stable branch

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agodocs: document how to mark a candidate for a stable branch
Andreas Boll [Tue, 2 Oct 2012 11:37:34 +0000 (13:37 +0200)]
docs: document how to mark a candidate for a stable branch

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agoandroid: glcpp: fix abuse of yylex
Negreanu Marius Adrian [Fri, 28 Sep 2012 14:36:40 +0000 (17:36 +0300)]
android: glcpp: fix abuse of yylex

Port the 'glcpp: fix abuse of yylex' commit to Android.mk
Also, since the Android.*.mk are sourced in a global namespace,
the local-y-to-c-and-h is prefixed with the LOCAL_MODULE name,

The initial fix commit is 53d46bc787318ccf9911fdd1d5fe99ee4db7f41a

There's also a bugzilla for this: 54947

Signed-off-by: Negreanu Marius Adrian <adrian.m.negreanu@intel.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
11 years agobuild: Don't build libdricore if not building classic drivers
Matt Turner [Thu, 20 Sep 2012 22:08:02 +0000 (15:08 -0700)]
build: Don't build libdricore if not building classic drivers