mesa.git
12 years agoglsl: Count builtin uniforms against uniform component limits.
Eric Anholt [Mon, 27 Aug 2012 16:48:34 +0000 (09:48 -0700)]
glsl: Count builtin uniforms against uniform component limits.

We don't fully process the builtin uniforms, but at least
num_uniform_components reflects reality now.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoradeonsi: Handle TGSI_SEMANTIC_FOG.
Michel Dänzer [Thu, 6 Sep 2012 15:53:04 +0000 (17:53 +0200)]
radeonsi: Handle TGSI_SEMANTIC_FOG.

Fixes exponential fog. The pixel shaders for linear fog seem to get
miscompiled still somehow.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Match fexp2 for SI.
Michel Dänzer [Tue, 21 Aug 2012 10:51:18 +0000 (12:51 +0200)]
radeon/llvm: Match fexp2 for SI.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoglapi/glx: rename 'table' variable to 'disp_table'
Brian Paul [Thu, 6 Sep 2012 14:16:56 +0000 (08:16 -0600)]
glapi/glx: rename 'table' variable to 'disp_table'

This fixes an issue where the local 'table' variable was hiding the
function parameter name in glGetColorTable(..., void *table).

This should be OK as long as there's never a GL entrypoint that uses
'disp_table' as a parameter name.

Note: This is a candidate for the 9.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoglx: move 'prime' var into #ifdef'd code block
Brian Paul [Thu, 6 Sep 2012 14:16:08 +0000 (08:16 -0600)]
glx: move 'prime' var into #ifdef'd code block

To silence unused var warning.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoi965: Fix primitive restart on Haswell.
Kenneth Graunke [Sat, 25 Aug 2012 01:40:40 +0000 (18:40 -0700)]
i965: Fix primitive restart on Haswell.

Haswell moved the "Cut Index Enable" bit from the INDEX_BUFFER packet to
a new 3DSTATE_VF packet, so we need to emit that.  Also, it requires us
to specify the cut index rather than assuming it's 0xffffffff.

This adds a new Haswell-specific tracked state atom to gen7_atoms.
Normally, we would create a new generation-specific atom list, but since
there's only one difference over Ivybridge so far, I chose to simply
make it return without doing any work on non-Haswell systems.

Fixes five piglit tests:
- general/primitive-restart-DISABLE_VBO
- general/primitive-restart-VBO_COMBINED_VERTEX_AND_INDEX
- general/primitive-restart-VBO_INDEX_ONLY
- general/primitive-restart-VBO_SEPARATE_VERTEX_AND_INDEX
- general/primitive-restart-VBO_VERTEX_ONLY

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
12 years agobuild: Disable building of d3d1x
Matt Turner [Thu, 6 Sep 2012 23:17:21 +0000 (16:17 -0700)]
build: Disable building of d3d1x

It's broken and unmaintained, and I'm tired of seeing bug reports about
it.

12 years agointel: avoid undefined variable warnings in intel_screen.c
Paul Berry [Fri, 31 Aug 2012 00:22:29 +0000 (17:22 -0700)]
intel: avoid undefined variable warnings in intel_screen.c

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agor600g: order atom emission v3
Jerome Glisse [Wed, 5 Sep 2012 19:18:24 +0000 (15:18 -0400)]
r600g: order atom emission v3

To avoid GPU lockup registers must be emited in a specific order
(no kidding ...). This patch rework atom emission so order in which
atom are emited in respect to each other is always the same. We
don't have any informations on what is the correct order so order
will need to be infered from fglrx command stream.

v2: add comment warning that atom order should not be taken lightly
v3: rebase on top of alphatest atom fix

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: fix num of dwords needed for alphatest_state atom
Jerome Glisse [Thu, 6 Sep 2012 19:09:21 +0000 (15:09 -0400)]
r600g: fix num of dwords needed for alphatest_state atom

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
12 years agomesa: Don't advertise GLES extensions in GL contexts
Chad Versace [Tue, 4 Sep 2012 17:02:43 +0000 (10:02 -0700)]
mesa: Don't advertise GLES extensions in GL contexts

glGetStringi(GL_EXTENSIONS) failed to respect the context's API, and so
returned all internally enabled GLES extensions from a GL context.
Likewise, glGetIntegerv(GL_NUM_EXTENSIONS) also failed to repsect the
context's API.

Note: This is a candidate for the 8.0 and 9.0 branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agollvmpipe: Make driver name more informative.
José Fonseca [Thu, 6 Sep 2012 09:29:04 +0000 (10:29 +0100)]
llvmpipe: Make driver name more informative.

Such as

  "llvmpipe (LLVM 3.1, 128 bits)"

or

  "llvmpipe (LLVM 3.1, 256 bits)"

when leveraging AVX 8-wide registers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agoradeonsi: Handle more L/I/A format cases.
Michel Dänzer [Wed, 5 Sep 2012 16:24:14 +0000 (18:24 +0200)]
radeonsi: Handle more L/I/A format cases.

Fixes piglit fbo-generatemipmap-formats.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: Enable whole quad mode for pixel shaders.
Michel Dänzer [Fri, 31 Aug 2012 17:04:08 +0000 (19:04 +0200)]
radeonsi: Enable whole quad mode for pixel shaders.

Fixes wrong mipmap level being sampled at some triangle edges.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Add intrinsic for enabling whole quad mode in SI pixel shaders.
Michel Dänzer [Wed, 29 Aug 2012 16:55:08 +0000 (18:55 +0200)]
radeon/llvm: Add intrinsic for enabling whole quad mode in SI pixel shaders.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: SI shader vector instructions implicitly use the EXEC register.
Michel Dänzer [Fri, 31 Aug 2012 17:05:31 +0000 (19:05 +0200)]
radeon/llvm: SI shader vector instructions implicitly use the EXEC register.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Extend SI EXEC register support.
Michel Dänzer [Wed, 29 Aug 2012 16:52:53 +0000 (18:52 +0200)]
radeon/llvm: Extend SI EXEC register support.

Add 32 bit lo and hi variants, and binary encodings.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Remove R600InstrInfo.td from TD_FILES
Tom Stellard [Thu, 6 Sep 2012 14:05:22 +0000 (14:05 +0000)]
radeon/llvm: Remove R600InstrInfo.td from TD_FILES

Fixes build bug introduced by
cebbdd4ac23725963207bf6f8fc7101150e6065f

12 years agoradeonsi: Enable NPOT textures again.
Michel Dänzer [Wed, 5 Sep 2012 16:27:02 +0000 (18:27 +0200)]
radeonsi: Enable NPOT textures again.

Should be at least mostly working now (with the corresponding fixes in
libdrm_radeon).

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
12 years agoradeonsi: Mipmaps require memory footprint to be padded to powers of two.
Michel Dänzer [Tue, 4 Sep 2012 16:58:38 +0000 (18:58 +0200)]
radeonsi: Mipmaps require memory footprint to be padded to powers of two.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
12 years agoradeonsi: Sampler view state simplification.
Michel Dänzer [Mon, 27 Aug 2012 09:48:55 +0000 (11:48 +0200)]
radeonsi: Sampler view state simplification.

We can always use the offset and tiling mode from level 0 and restrict the
first and last mipmap level to be used in the sampler resource.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
12 years agoradeonsi: Untiled textures are linear aligned, not linear general.
Michel Dänzer [Wed, 29 Aug 2012 10:11:04 +0000 (12:11 +0200)]
radeonsi: Untiled textures are linear aligned, not linear general.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
12 years agoradeon/llvm: Cleanup makefile
Tom Stellard [Wed, 29 Aug 2012 13:01:15 +0000 (13:01 +0000)]
radeon/llvm: Cleanup makefile

Hopefully, this will fix all the parallel make problems people have
been having.

12 years agoRemove useless checks for NULL before freeing
Matt Turner [Wed, 5 Sep 2012 06:33:28 +0000 (23:33 -0700)]
Remove useless checks for NULL before freeing

Same as earlier commit, except for "FREE"

This patch has been generated by the following Coccinelle semantic
patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ FREE (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   FREE(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
type T;
@@
+ FREE ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   FREE((T) E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ FREE (E);
- if (unlikely (E != NULL)) {
-   FREE (E);
- }

@@
expression E;
type T;
@@
+ FREE ((T) E);
- if (unlikely (E != NULL)) {
-   FREE ((T) E);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoReplace another malloc/memset-0 combination with calloc
Matt Turner [Wed, 5 Sep 2012 06:12:46 +0000 (23:12 -0700)]
Replace another malloc/memset-0 combination with calloc

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoRemove useless memset after calloc
Matt Turner [Wed, 5 Sep 2012 06:10:52 +0000 (23:10 -0700)]
Remove useless memset after calloc

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoUse calloc instead of malloc/memset-0
Matt Turner [Wed, 5 Sep 2012 06:09:22 +0000 (23:09 -0700)]
Use calloc instead of malloc/memset-0

This patch has been generated by the following Coccinelle semantic
patch:

@@
expression E;
identifier I;
@@
- I = malloc(E);
+ I = calloc(1, E);
...
- memset(I, 0, sizeof *I);

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoRemove useless checks for NULL before freeing
Matt Turner [Tue, 4 Sep 2012 03:24:35 +0000 (20:24 -0700)]
Remove useless checks for NULL before freeing

This patch has been generated by the following Coccinelle semantic
patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
type T;
@@
+ free ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   free((T) E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
-   free (E);
- }

@@
expression E;
type T;
@@
+ free ((T) E);
- if (unlikely (E != NULL)) {
-   free ((T) E);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglX_proto_send.py: Don't cast the return value of malloc
Matt Turner [Wed, 5 Sep 2012 05:57:48 +0000 (22:57 -0700)]
glX_proto_send.py: Don't cast the return value of malloc

12 years agoDon't cast the return value of malloc/realloc
Matt Turner [Tue, 4 Sep 2012 02:44:00 +0000 (19:44 -0700)]
Don't cast the return value of malloc/realloc

This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)

12 years agoglX_proto_send.py: Remove deprecated Xmalloc/Xfree calls
Matt Turner [Mon, 3 Sep 2012 21:19:43 +0000 (14:19 -0700)]
glX_proto_send.py: Remove deprecated Xmalloc/Xfree calls

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoRemove Xcalloc/Xmalloc/Xfree calls
Matt Turner [Wed, 5 Sep 2012 05:52:36 +0000 (22:52 -0700)]
Remove Xcalloc/Xmalloc/Xfree calls

These calls allowed Xlib to use a custom memory allocator, but Xlib has
used the standard C library functions since at least its initial import
into git in 2003. It seems unlikely that it will grow a custom memory
allocator. The functions now just add extra overhead. Replacing them
will make future Coccinelle patches simpler.

This patch has been generated by the following Coccinelle semantic
patch:

// Remove Xcalloc/Xmalloc/Xfree calls

@@ expression E1, E2; @@
- Xcalloc (E1, E2)
+ calloc (E1, E2)

@@ expression E; @@
- Xmalloc (E)
+ malloc (E)

@@ expression E; @@
- Xfree (E)
+ free (E)

@@ expression E; @@
- XFree (E)
+ free (E)

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoUse the correct macro _WIN32 for Windows.
Vinson Lee [Wed, 5 Sep 2012 05:53:42 +0000 (22:53 -0700)]
Use the correct macro _WIN32 for Windows.

The correct predefined macro for Windows is _WIN32, not WIN32 or
__WIN32__.  _WIN32 is defined for 32-bit and 64-bit version of Windows
by both MSVC and MinGW compilers.

http://sourceforge.net/p/predef/wiki/OperatingSystems
http://msdn.microsoft.com/en-us/library/b0084kay.aspx

This patch also fixes a MinGW automake build error.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: remove #undef CONST in get.c
Brian Paul [Thu, 6 Sep 2012 02:26:28 +0000 (20:26 -0600)]
mesa: remove #undef CONST in get.c

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agomesa: remove now unused CONST macro
Brian Paul [Thu, 6 Sep 2012 02:26:28 +0000 (20:26 -0600)]
mesa: remove now unused CONST macro

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agomesa: s/CONST/const/ in a comment
Brian Paul [Thu, 6 Sep 2012 02:26:28 +0000 (20:26 -0600)]
mesa: s/CONST/const/ in a comment

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agomesa: s/CONST/const/ in math/ files
Brian Paul [Thu, 6 Sep 2012 02:26:28 +0000 (20:26 -0600)]
mesa: s/CONST/const/ in math/ files

The CONST macro hack will go away soon.

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoradeon/llvm: Fix operand ordering for V_CNDMASK_B32
Tom Stellard [Wed, 5 Sep 2012 15:30:16 +0000 (11:30 -0400)]
radeon/llvm: Fix operand ordering for V_CNDMASK_B32

This fixes several hundred piglit tests.

12 years agoradeon/llvm: Use correct float->int conversion opcode on SI.
Tom Stellard [Wed, 5 Sep 2012 15:28:31 +0000 (11:28 -0400)]
radeon/llvm: Use correct float->int conversion opcode on SI.

V_CVT_I32_F32 converts floats to signed integers, but we were using
V_CVT_F32_I32 which convertes signed integers to float.

12 years agoconfigure.ac: Don't link gallium drivers with libdricore
Tom Stellard [Tue, 4 Sep 2012 13:37:02 +0000 (09:37 -0400)]
configure.ac: Don't link gallium drivers with libdricore

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoi965/blorp: Fix incorrect indentation.
Paul Berry [Thu, 30 Aug 2012 18:03:33 +0000 (11:03 -0700)]
i965/blorp: Fix incorrect indentation.

12 years agomapi: Add shared-glapi-test to .gitignore
Paul Berry [Thu, 30 Aug 2012 19:15:29 +0000 (12:15 -0700)]
mapi: Add shared-glapi-test to .gitignore

12 years agomesa: fix per-level max texture size error checking
Brian Paul [Wed, 5 Sep 2012 02:17:15 +0000 (20:17 -0600)]
mesa: fix per-level max texture size error checking

This is a long-standing omission in Mesa's texture image size checking.
We need to take the mipmap level into consideration when checking if the
width, height and depth are too large.

Fixes the new piglit max-texture-size-level test.
Thanks to Stéphane Marchesin for finding this problem.

Note: This is a candidate for the stable branches.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoi965: Don't use brw->fragment_program in the old brw_wm_pass2.c.
Kenneth Graunke [Sat, 1 Sep 2012 05:50:26 +0000 (22:50 -0700)]
i965: Don't use brw->fragment_program in the old brw_wm_pass2.c.

According to Eric, this shouldn't matter since we don't do precompiles
using the old backend.  In other words, brw->fragment_program (the
currently active program) should equal c->fp (the program currently
being compiled).

However, it's just not a good idea to access brw->fragment_program
directly in compiler code.  It's totally illegal in the new backend, so
let's just not do it here either.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reported-by: Paul Berry <stereotype441@gmail.com>
12 years agoradeon/llvm: Fix lowering of SI_V_CNDLT
Tom Stellard [Tue, 4 Sep 2012 15:20:01 +0000 (11:20 -0400)]
radeon/llvm: Fix lowering of SI_V_CNDLT

SREG_LIT_0 is a scalar register, so it can only be used in the
first argument of vector instructoins.

12 years agoradeon/llvm: Fix encoding of V_CNDMASK_B32
Tom Stellard [Fri, 31 Aug 2012 20:11:38 +0000 (16:11 -0400)]
radeon/llvm: Fix encoding of V_CNDMASK_B32

The CodeEmitter was not setting the VGPR bit for src0, because the
instruction definition had the VCC register in the src0 slot, instead of
the actual src0 register.  This has been fixed by moving the VCC
register to the end of the operand list.

12 years agomesa: fix DIFFERENT_SIGNS() function
Brian Paul [Tue, 4 Sep 2012 16:02:20 +0000 (10:02 -0600)]
mesa: fix DIFFERENT_SIGNS() function

Looks like converting this to a macro, returning bool, caused us to
lose the high (31st) bit result.  Fixes piglit fbo-1d test.  Strange
that none of the other tests I ran caught this.

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

Tested-by: Vinson Lee <vlee@freedesktop.org>
12 years agoradeon/llvm: do not convert f32 operand of select_cc node
Vincent Lejeune [Tue, 4 Sep 2012 15:28:26 +0000 (17:28 +0200)]
radeon/llvm: do not convert f32 operand of select_cc node

v2:-use camel coding style

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: custom lowering for FP_TO_UINT when dst is i1 (bool)
Vincent Lejeune [Tue, 4 Sep 2012 15:29:48 +0000 (17:29 +0200)]
radeon/llvm: custom lowering for FP_TO_UINT when dst is i1 (bool)

v2:-wrap line at 80 characters

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: support setcc on f32
Vincent Lejeune [Tue, 4 Sep 2012 15:04:28 +0000 (17:04 +0200)]
radeon/llvm: support setcc on f32

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradon/llvm: br_cc f32 now lowered without cast
Vincent Lejeune [Tue, 4 Sep 2012 15:04:27 +0000 (17:04 +0200)]
radon/llvm: br_cc f32 now lowered without cast

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: swap wrong OPCODE_IS_*_ZERO_* opcode and use
Vincent Lejeune [Tue, 4 Sep 2012 14:49:25 +0000 (16:49 +0200)]
radeon/llvm: swap wrong OPCODE_IS_*_ZERO_* opcode and use

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agowinsys/radeon: create only one winsys for each fd
Christian König [Thu, 30 Aug 2012 08:26:48 +0000 (10:26 +0200)]
winsys/radeon: create only one winsys for each fd

Fixing problems with GLAMOR.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeonsi: stop big offsets from hanging the GPU v2
Christian König [Wed, 29 Aug 2012 08:48:01 +0000 (10:48 +0200)]
radeonsi: stop big offsets from hanging the GPU v2

v2: rebased of radeon/llvm fix.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeonsi: adjust PIPE_SHADER_CAP_MAX_CONSTS
Christian König [Fri, 31 Aug 2012 11:59:14 +0000 (13:59 +0200)]
radeonsi: adjust PIPE_SHADER_CAP_MAX_CONSTS

So it matches what we really can do.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeon/llvm: fix SelectADDR8BitOffset
Christian König [Fri, 31 Aug 2012 11:49:06 +0000 (13:49 +0200)]
radeon/llvm: fix SelectADDR8BitOffset

The offset is unsigned, not signed.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agogallivm,llvmpipe: Use 4-wide vectors on AMD Bulldozer.
José Fonseca [Fri, 31 Aug 2012 16:01:50 +0000 (17:01 +0100)]
gallivm,llvmpipe: Use 4-wide vectors on AMD Bulldozer.

8-wide vectors is slower.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agomesa: add missing return statements after recording errors
Brian Paul [Mon, 3 Sep 2012 14:12:04 +0000 (08:12 -0600)]
mesa: add missing return statements after recording errors

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: remove more null pointer checks before free() calls
Brian Paul [Mon, 3 Sep 2012 14:12:04 +0000 (08:12 -0600)]
mesa: remove more null pointer checks before free() calls

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: remove null pointer checks before free() calls
Brian Paul [Mon, 3 Sep 2012 14:12:04 +0000 (08:12 -0600)]
mesa: remove null pointer checks before free() calls

Since free(NULL) is fine.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.
Brian Paul [Mon, 3 Sep 2012 18:19:15 +0000 (12:19 -0600)]
mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.

We were already defining sqrtf where we don't have the C99 version.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agor600g: adjust QUANT_MODE for higher precision
Vadim Girlin [Mon, 3 Sep 2012 20:18:13 +0000 (00:18 +0400)]
r600g: adjust QUANT_MODE for higher precision

Use 1/256 for R6xx/7xx, 1/4096 for evergreen, instead of default 1/16.

Helps to pass some piglit tests (fbo, multisample).

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoutil: Add cpuid for Solaris Studio.
Vinson Lee [Sat, 1 Sep 2012 06:30:35 +0000 (23:30 -0700)]
util: Add cpuid for Solaris Studio.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agometa: Don't save and restore fog state when there is no fog state
Ian Romanick [Fri, 31 Aug 2012 22:26:27 +0000 (15:26 -0700)]
meta: Don't save and restore fog state when there is no fog state

I wonder if the better solution is to have _mesa_meta_GenerateMipmap not
use MESA_META_ALL for the GLSL path.  Even on compatibility profiles
there is no reason to save and restore fog on this path.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54295

12 years agomesa: remove accidentally committed __SUNPRO_C sqrtf() code
Brian Paul [Mon, 3 Sep 2012 14:03:05 +0000 (08:03 -0600)]
mesa: remove accidentally committed __SUNPRO_C sqrtf() code

12 years agoradeonsi: disable array-textures for now
Christian König [Wed, 29 Aug 2012 11:41:47 +0000 (13:41 +0200)]
radeonsi: disable array-textures for now

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agoradeonsi: disable Z16 for now
Christian König [Mon, 27 Aug 2012 15:36:08 +0000 (17:36 +0200)]
radeonsi: disable Z16 for now

It's causing crashes.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: disable NPOT textures for now
Christian König [Mon, 27 Aug 2012 09:14:26 +0000 (11:14 +0200)]
radeonsi: disable NPOT textures for now

Looks like we have an alignment issue with NPOT textures
and mipmaps. So disable NPOT textures until we figure out
what is going wrong here.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: handle indirect constants gracefully
Christian König [Fri, 24 Aug 2012 10:55:34 +0000 (12:55 +0200)]
radeonsi: handle indirect constants gracefully

It's not supported yet, so at least don't try to crash the box.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeon: fix free/FREE mistake
Brian Paul [Sat, 1 Sep 2012 15:47:29 +0000 (09:47 -0600)]
radeon: fix free/FREE mistake

12 years agovega: include u_debug.h for assert()
Brian Paul [Sat, 1 Sep 2012 15:03:24 +0000 (09:03 -0600)]
vega: include u_debug.h for assert()

12 years agomesa: s/FREE/free/
Brian Paul [Sat, 1 Sep 2012 13:47:24 +0000 (07:47 -0600)]
mesa: s/FREE/free/

v2: replace instances in dri/common/ dirs

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: s/CALLOC/calloc/
Brian Paul [Sat, 1 Sep 2012 13:47:24 +0000 (07:47 -0600)]
mesa: s/CALLOC/calloc/

v2: replace instances in dri/common/ dirs

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: s/MALLOC/malloc/
Brian Paul [Sat, 1 Sep 2012 13:47:24 +0000 (07:47 -0600)]
mesa: s/MALLOC/malloc/

v2: replace instances in dri/common/ dirs

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoutil: remove u_debug.h from u_math.h
Brian Paul [Fri, 31 Aug 2012 14:33:32 +0000 (08:33 -0600)]
util: remove u_debug.h from u_math.h

No debug code is used in u_math.h

12 years agoutil: include u_debug.h
Brian Paul [Fri, 31 Aug 2012 14:33:31 +0000 (08:33 -0600)]
util: include u_debug.h

12 years agotgsi: include u_debug.h
Brian Paul [Fri, 31 Aug 2012 14:33:31 +0000 (08:33 -0600)]
tgsi: include u_debug.h

12 years agomesa: clean-up LOG2() function
Brian Paul [Fri, 31 Aug 2012 14:33:31 +0000 (08:33 -0600)]
mesa: clean-up LOG2() function

12 years agomesa: move IS_NEGATIVE() and DIFFERENT_SIGNS() to macros.h
Brian Paul [Fri, 31 Aug 2012 14:33:31 +0000 (08:33 -0600)]
mesa: move IS_NEGATIVE() and DIFFERENT_SIGNS() to macros.h

12 years agomesa: clean up F_TO_I, IFLOOR, ICEIL functions
Brian Paul [Fri, 31 Aug 2012 14:33:31 +0000 (08:33 -0600)]
mesa: clean up F_TO_I, IFLOOR, ICEIL functions

Put all the #ifdef stuff inside the function bodies instead of outside.

12 years agoi965/fs: Don't use brw->fragment_program in calculate_urb_setup().
Kenneth Graunke [Fri, 31 Aug 2012 08:00:15 +0000 (01:00 -0700)]
i965/fs: Don't use brw->fragment_program in calculate_urb_setup().

Reading brw->fragment_program is nonsensical in compiler code: it
contains the currently active program (if any), not the one currently
being compiled.  Attempting to access it may either lead to crashes
(null pointer dereference if no program is active) or wrong results.

Fixes piglit regressions since 9ef710575b914ddfc8e9a162d98ad554c1c217f7
on pre-Sandybridge hardware.  The actual bug was created in commit
7b1fbc688999fd568e65211d79d7678562061594.

NOTE: This is a candidate for the 9.0 and 8.0 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54183
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
12 years agobuild: Remove left over echo from GLU removal
Matt Turner [Fri, 31 Aug 2012 22:11:11 +0000 (15:11 -0700)]
build: Remove left over echo from GLU removal

12 years agomesa: don't wait in _mesa_ClientWaitSync if timeout is 0
Vadim Girlin [Fri, 31 Aug 2012 21:02:24 +0000 (01:02 +0400)]
mesa: don't wait in _mesa_ClientWaitSync if timeout is 0

From ARB_sync spec:

    If the value of <timeout> is zero, then ClientWaitSync does not
    block, but simply tests the current state of <sync>. TIMEOUT_EXPIRED
    will be returned in this case if <sync> is not signaled, even though
    no actual wait was performed.

Fixes random fails of the arb_sync-timeout-zero piglit test on r600g.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoRemove libGLU
Matt Turner [Thu, 23 Aug 2012 23:39:20 +0000 (16:39 -0700)]
Remove libGLU

It's been moved to its own repository, found at
http://cgit.freedesktop.org/mesa/glu/

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodri: Rework planar image interface
Jakob Bornecrantz [Fri, 31 Aug 2012 17:48:26 +0000 (19:48 +0200)]
dri: Rework planar image interface

As discussed with Kristian on #wayland. Pushes the decision of components into
the dri driver giving it greater freedom to allow t to implement YUV samplers
in hardware, and which mode to use.

This interface will also allow drivers like SVGA to implement YUV surfaces
without the need to sub-allocate and instead send 3 seperate buffers for each
channel, currently not implemented.

I have tested these changes on Gallium Svga. Scott tested them on both intel
and Gallium Radeon. Kristan and Pekka tested them on intel.

v2: Fix typo in dri2_from_planar.
v3: Merge in intel changes.

Tested-by: Scott Moreau <oreaus@gmail.com>
Tested-by: Pekka Paalanen <ppaalanen@gmail.com>
Tested-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoradeon/llvm: Rework how immediate operands are handled with SI
Tom Stellard [Fri, 31 Aug 2012 15:29:49 +0000 (11:29 -0400)]
radeon/llvm: Rework how immediate operands are handled with SI

Immediate operands were previously handled in the CodeEmitter, but that
code was buggy and very confusing.  This commit adds a pass that simplifies
the handling of immediate operands by spliting the loading of the
immediate into a sperate insruction that is bundled with the original.

12 years agoradeon/llvm: Fix typo in assert
Tom Stellard [Fri, 31 Aug 2012 14:48:49 +0000 (10:48 -0400)]
radeon/llvm: Fix typo in assert

12 years agoradeon/llvm: Fix isEG tablegen predicate
Tom Stellard [Fri, 31 Aug 2012 14:46:56 +0000 (10:46 -0400)]
radeon/llvm: Fix isEG tablegen predicate

This predicate incorrectly included SI GPUs, so some Evergreen
instructions were being emmitted on SI.

12 years agoradeon/llvm: Add support for RCP instruction on SI
Tom Stellard [Fri, 31 Aug 2012 13:59:00 +0000 (09:59 -0400)]
radeon/llvm: Add support for RCP instruction on SI

12 years agoradeon/llvm: Support AMDGPUfmin DAG node on SI
Tom Stellard [Thu, 30 Aug 2012 15:10:14 +0000 (11:10 -0400)]
radeon/llvm: Support AMDGPUfmin DAG node on SI

12 years agoradeonsi: Handle TGSI_SEMANTIC_PSIZE
Tom Stellard [Thu, 30 Aug 2012 14:35:36 +0000 (10:35 -0400)]
radeonsi: Handle TGSI_SEMANTIC_PSIZE

The relevant POINT_SIZE registers are being set using the
pipe_rasterizer_state, so we just need to tell the shader compiler which
export type to use.

This fixes several of the glean glsl tests.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoandroid: do not expose single buffered eglconfigs
Tapani Pälli [Mon, 13 Aug 2012 13:47:52 +0000 (16:47 +0300)]
android: do not expose single buffered eglconfigs

On Android we want to add only double buffered configs for visuals.
Earlier implementation set the SurfaceType as 0 for single buffered
configs but driver still exposed these configs that were not compatible
with any egl surface type.  This caused Khronos conformance test runs to
fail on Android. This patch fixes the issue by skipping single buffered
configs earlier and not exposing them.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoandroid: fix liblog API changes
Tapani Pälli [Mon, 13 Aug 2012 06:03:06 +0000 (09:03 +0300)]
android: fix liblog API changes

android logging macros changed their name in JellyBean.

Signed-off-by: Bruce E. Robertson <bruce.e.robertson@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoxmlconfig: use __progname when building for Android
Tapani Pälli [Tue, 5 Jun 2012 13:04:14 +0000 (16:04 +0300)]
xmlconfig: use __progname when building for Android

__progname symbol and strrchr are available with bionic.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoscons: Remove leftover print statement.
Vinson Lee [Fri, 31 Aug 2012 15:23:28 +0000 (08:23 -0700)]
scons: Remove leftover print statement.

Remove print statement left over from commit
c57fb034b19156e06e2ec25d9b06a0e174d861c9.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
12 years agodocs: update relnotes-9.0
Andreas Boll [Fri, 31 Aug 2012 14:53:25 +0000 (16:53 +0200)]
docs: update relnotes-9.0

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: also bump version in Makefile.am and configure.ac to 9.0
Andreas Boll [Fri, 31 Aug 2012 14:43:56 +0000 (16:43 +0200)]
mesa: also bump version in Makefile.am and configure.ac to 9.0

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Add default libraries to Solaris build.
Vinson Lee [Thu, 30 Aug 2012 06:16:44 +0000 (23:16 -0700)]
scons: Add default libraries to Solaris build.

Fixes SCons build on Solaris.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54293
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: s/CALLOC/calloc/ to fix allocation bug
Brian Paul [Thu, 30 Aug 2012 22:12:53 +0000 (16:12 -0600)]
st/mesa: s/CALLOC/calloc/ to fix allocation bug

The CALLOC() macro only takes one argument so this was being treated
as a comma expression.  Simply use calloc() instead.

A follow-on patch will replace all CALLOC() calls with calloc().

NOTE: This is a candidate for the 8.0 and 9.0 branches.

12 years agoutil: add casts to silence signed/unsigned comparison warnings
Brian Paul [Thu, 30 Aug 2012 19:49:30 +0000 (13:49 -0600)]
util: add casts to silence signed/unsigned comparison warnings