mesa.git
12 years agou_format_s3tc.c: Don't call getenv() twice
Matt Turner [Wed, 10 Oct 2012 22:34:59 +0000 (15:34 -0700)]
u_format_s3tc.c: Don't call getenv() twice

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoandroid: generate matching remap_helper to dispatch table
Tapani Pälli [Tue, 2 Oct 2012 11:50:31 +0000 (14:50 +0300)]
android: generate matching remap_helper to dispatch table

commit a010215463c63680c69e90202fe3fcd2e5b25fa6 removed ES2 specific dispatch
table and remap_helper, since now we are using dispatch.h which is generated
from gl_and_es_API.xml we need to generate a matching remap_helper using the
same xml.

Note: This is a candidate for the 9.0 branch.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agogallivm: Don't use llvm.x86.avx.max/min.ps.256 inadvertently.
José Fonseca [Wed, 10 Oct 2012 18:44:49 +0000 (19:44 +0100)]
gallivm: Don't use llvm.x86.avx.max/min.ps.256 inadvertently.

Could happen when CPU supports AVX, but LLVM doesn't.

12 years agotgsi: Dump register number when dumping immediates.
José Fonseca [Thu, 11 Oct 2012 13:56:26 +0000 (14:56 +0100)]
tgsi: Dump register number when dumping immediates.

For example:

VERT
DCL IN[0]
DCL OUT[0], POSITION
DCL OUT[1], GENERIC[12]
DCL CONST[0..4]
DCL TEMP[0], LOCAL
DCL TEMP[1], LOCAL
IMM[0] UINT32 {4294967295, 0, 0, 0}
IMM[1] FLT32 {    0.0000,     1.0000,     0.0000,     0.0000}
  0: SEQ TEMP[0].x, CONST[3].xxxx, IMM[0].xxxx
  1: F2I TEMP[0].x, -TEMP[0]
  2: SEQ TEMP[1].x, CONST[4].xxxx, IMM[0].xxxx
  3: F2I TEMP[1].x, -TEMP[1]
  4: AND TEMP[0].x, TEMP[0].xxxx, TEMP[1].xxxx
  5: IF TEMP[0].xxxx :0
  6:   MOV TEMP[0], IMM[1].xyxy
  7: ELSE :0
  8:   MOV TEMP[0], IMM[1].yxxy
  9: ENDIF
 10: MOV OUT[1], TEMP[0]
 11: MOV OUT[0], IN[0]
 12: END

instead of

VERT
DCL IN[0]
DCL OUT[0], POSITION
DCL OUT[1], GENERIC[12]
DCL CONST[0..4]
DCL TEMP[0], LOCAL
DCL TEMP[1], LOCAL
IMM UINT32 {4294967295, 0, 0, 0}
IMM FLT32 {    0.0000,     1.0000,     0.0000,     0.0000}
  0: SEQ TEMP[0].x, CONST[3].xxxx, IMM[0].xxxx
  1: F2I TEMP[0].x, -TEMP[0]
  2: SEQ TEMP[1].x, CONST[4].xxxx, IMM[0].xxxx
  3: F2I TEMP[1].x, -TEMP[1]
  4: AND TEMP[0].x, TEMP[0].xxxx, TEMP[1].xxxx
  5: IF TEMP[0].xxxx :0
  6:   MOV TEMP[0], IMM[1].xyxy
  7: ELSE :0
  8:   MOV TEMP[0], IMM[1].yxxy
  9: ENDIF
 10: MOV OUT[1], TEMP[0]
 11: MOV OUT[0], IN[0]
 12: END

12 years agogallivm: fix rsqrt failures
Roland Scheidegger [Fri, 21 Sep 2012 15:03:48 +0000 (17:03 +0200)]
gallivm: fix rsqrt failures

lp_build_rsqrt initially did not do any newton-raphson step. This meant that
precision was only ~11 bits, but this handled both input 0.0 and +infinity
correctly. It did not however handle input 1.0 accurately, and denormals
always generated infinity result.
Doing a newton-raphson step increased precision significantly (but notably
input 1.0 still doesn't give output 1.0), however this fails for inputs
0.0 and infinity (both result in NaNs).
Try to fix this up by using cmp/select but since this is all quite fishy
(and still doesn't handle denormals) disable for now. Note that even with
workarounds it should still have been faster since the fallback uses sqrt/div
(which both use the usually unpipelined and slow divider hw).
Also add some more test values to lp_test_arit and test lp_build_rcp() too while
there.

v2: based on José's feedback, avoid hacky infinity definition which doesn't
work with msvc (unfortunately using INFINITY won't cut it neither on non-c99
compilers) in lp_build_rsqrt, and while here fix up the input infinity case
too (it's disabled anyway). Only test infinity input case if we have c99,
and use float cast for calculating reference rsqrt value so we really get
what we expect.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agogalahad: galahad_context_blit
José Fonseca [Fri, 12 Oct 2012 17:36:22 +0000 (18:36 +0100)]
galahad: galahad_context_blit

must unwrap.

12 years agor600g: move shader structures into r600_shader.h
Marek Olšák [Fri, 12 Oct 2012 16:30:51 +0000 (18:30 +0200)]
r600g: move shader structures into r600_shader.h

12 years agomesa/st: Fix assertions.
José Fonseca [Fri, 12 Oct 2012 16:02:55 +0000 (17:02 +0100)]
mesa/st: Fix assertions.

Can't access ptDraw before it is written.

12 years agodoxygen: add gbm to .gitignore
Andreas Boll [Fri, 12 Oct 2012 15:44:19 +0000 (17:44 +0200)]
doxygen: add gbm to .gitignore

12 years agor600g: implement MSAA resolving for 8-bit and 16-bit integer formats
Marek Olšák [Fri, 12 Oct 2012 04:04:01 +0000 (06:04 +0200)]
r600g: implement MSAA resolving for 8-bit and 16-bit integer formats

by changing the format to NORM.

12 years agointel: print debug either to stdout or `logcat' depending on platform.
Oliver McFadden [Tue, 25 Sep 2012 14:47:45 +0000 (17:47 +0300)]
intel: print debug either to stdout or `logcat' depending on platform.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoutil: fix broken pipe_get_tile_rgba() call
Brian Paul [Thu, 11 Oct 2012 21:51:02 +0000 (15:51 -0600)]
util: fix broken pipe_get_tile_rgba() call

Fix breakage from commit 369e468.

12 years agoradeon/llvm: Fix build with LLVM 3.2
Tom Stellard [Wed, 10 Oct 2012 21:00:13 +0000 (21:00 +0000)]
radeon/llvm: Fix build with LLVM 3.2

12 years agoclover: Fix build with LLVM 3.2
Tom Stellard [Wed, 10 Oct 2012 20:22:22 +0000 (20:22 +0000)]
clover: Fix build with LLVM 3.2

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
12 years agoclover: Don't link against libclangRewrite
Tom Stellard [Wed, 10 Oct 2012 13:55:19 +0000 (13:55 +0000)]
clover: Don't link against libclangRewrite

This library does not exist in LLVM 3.2 and libOpenCL.so links fine
without it on LLVM 3.1

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
12 years agoradeonsi: handle unhandled CAPs
Marek Olšák [Thu, 11 Oct 2012 19:35:45 +0000 (21:35 +0200)]
radeonsi: handle unhandled CAPs

12 years agoradeonsi: fixup the return type of is_format_supported
Marek Olšák [Thu, 11 Oct 2012 19:32:47 +0000 (21:32 +0200)]
radeonsi: fixup the return type of is_format_supported

12 years agoradeonsi: remove unused local variables
Marek Olšák [Thu, 11 Oct 2012 19:31:36 +0000 (21:31 +0200)]
radeonsi: remove unused local variables

12 years agor600g: put user indices in the command stream for small index counts
Marek Olšák [Sun, 7 Oct 2012 20:47:49 +0000 (22:47 +0200)]
r600g: put user indices in the command stream for small index counts

This improves performance a little bit if there are lots of small indexed
draw commands.

12 years agor600g: inline r600_translate_index_buffer
Marek Olšák [Sun, 7 Oct 2012 20:13:11 +0000 (22:13 +0200)]
r600g: inline r600_translate_index_buffer

12 years agogallium: unify transfer functions
Marek Olšák [Mon, 8 Oct 2012 02:06:42 +0000 (04:06 +0200)]
gallium: unify transfer functions

"get_transfer + transfer_map" becomes "transfer_map".
"transfer_unmap + transfer_destroy" becomes "transfer_unmap".

transfer_map must create and return the transfer object and transfer_unmap
must destroy it.

transfer_map is successful if the returned buffer pointer is not NULL.
If transfer_map fails, the pointer to the transfer object remains unchanged
(i.e. doesn't have to be NULL).

Acked-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: use the renderbuffer chosen by core Mesa in CopyTexSubImage
Marek Olšák [Tue, 9 Oct 2012 16:18:31 +0000 (18:18 +0200)]
st/mesa: use the renderbuffer chosen by core Mesa in CopyTexSubImage

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agosoftpipe: remove unused functions
Marek Olšák [Tue, 9 Oct 2012 13:05:58 +0000 (15:05 +0200)]
softpipe: remove unused functions

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: use transfer_inline_write in st_texture_image_data
Marek Olšák [Mon, 8 Oct 2012 00:48:19 +0000 (02:48 +0200)]
st/mesa: use transfer_inline_write in st_texture_image_data

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: remove useless checking in reset_cache
Marek Olšák [Mon, 8 Oct 2012 00:27:35 +0000 (02:27 +0200)]
st/mesa: remove useless checking in reset_cache

It's always NULL here.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodocs: start release notes file for 9.1
Andreas Boll [Wed, 10 Oct 2012 15:55:05 +0000 (17:55 +0200)]
docs: start release notes file for 9.1

12 years agosvga: don't use uninitialized framebuffer state
Brian Paul [Thu, 11 Oct 2012 00:31:52 +0000 (18:31 -0600)]
svga: don't use uninitialized framebuffer state

Only the first 'nr_cbufs' color buffers in the pipe_framebuffer_state are
valid.  The rest of the color buffer pointers might be unitialized.
Fixes a regression in the piglit fbo-srgb-blit test since changes in the
gallium blitter code.

NOTE: This is a candidate for the 9.0 branch (just to be safe).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agosvga: Remove wierd code which forces non-sRGB formats.
John Kåre Alsaker [Sun, 23 Sep 2012 11:44:09 +0000 (13:44 +0200)]
svga: Remove wierd code which forces non-sRGB formats.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agosvga: Add support for 16-bit per channel RGBA
John Kåre Alsaker [Mon, 8 Oct 2012 22:50:53 +0000 (00:50 +0200)]
svga: Add support for 16-bit per channel RGBA

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agoi965/vs: Add support for splitting virtual GRFs.
Eric Anholt [Wed, 3 Oct 2012 17:04:22 +0000 (10:04 -0700)]
i965/vs: Add support for splitting virtual GRFs.

This should improve our ability to register allocate without spilling.
Unfortuantely, due to the live variable analysis being ignorant of loops, we
still have register allocation failures on some programs.

v2: Add more context to the comment explaining the function.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
12 years agoi965/vs: Try again when we've successfully spilled a reg.
Eric Anholt [Wed, 3 Oct 2012 17:03:22 +0000 (10:03 -0700)]
i965/vs: Try again when we've successfully spilled a reg.

Before, we'd spill one reg, then continue on without actually register
allocating, then assertion fail when we tried to use a vgrf number as a
register number.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Implement register spilling.
Kenneth Graunke [Mon, 1 Oct 2012 22:28:56 +0000 (15:28 -0700)]
i965/vs: Implement register spilling.

To validate this code, I ran piglit -t vs quick.tests with the "go spill
everything" debugging code enabled.  There was only one regression:
glsl-vs-unroll-explosion simply ran out of registers.  This should be
fine in the real world, since no one actually spills every single
register.

NOTE: This is a candidate for the 9.0 branch. Even if it proves to have
bugs, it's likely better than simply failing to compile.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965/vs: Fix unit mismatch in scratch base_offset parameter.
Kenneth Graunke [Mon, 1 Oct 2012 22:28:55 +0000 (15:28 -0700)]
i965/vs: Fix unit mismatch in scratch base_offset parameter.

move_grf_array_access_to_scratch() calculates scratch buffer offsets in
bytes.  However, emit_scratch_read/write() expects the base_offset
parameter to be measured in OWords.

As a result, a shader using a scratch read/write offset greater than
zero (in practice, a shader containing more than one variable in
scratch) would use too large an offset, frequently exceeding the
available scratch space.

This patch corrects the mismatch by removing spurious conversion from
OWords to bytes in move_grf_array_access_to_scratch().

This is based on a patch by Paul Berry.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoegl: Return EGL_BAD_MATCH for invalid profile attributes
Matt Turner [Tue, 9 Oct 2012 00:01:34 +0000 (17:01 -0700)]
egl: Return EGL_BAD_MATCH for invalid profile attributes

Version 12 of the EGL_KHR_create_context spec changed this behavior.

NOTE: This is a candidate for the 9.0 branch
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoradeon/llvm: use ceil intrinsic instead of llvm.AMDIL.round.posinf
Vincent Lejeune [Mon, 8 Oct 2012 13:37:39 +0000 (15:37 +0200)]
radeon/llvm: use ceil intrinsic instead of llvm.AMDIL.round.posinf

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: use floor intrinsic instead of llvm.AMDIL.floor
Vincent Lejeune [Mon, 8 Oct 2012 13:34:36 +0000 (15:34 +0200)]
radeon/llvm: use floor intrinsic instead of llvm.AMDIL.floor

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: use llvm fabs intrinsic
Vincent Lejeune [Mon, 8 Oct 2012 13:27:47 +0000 (15:27 +0200)]
radeon/llvm: use llvm fabs intrinsic

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: use llvm intrinsic for flog2
Vincent Lejeune [Thu, 4 Oct 2012 21:55:02 +0000 (23:55 +0200)]
radeon/llvm: use llvm intrinsic for flog2

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: add support for cos/sin intrinsic
Vincent Lejeune [Wed, 3 Oct 2012 20:28:59 +0000 (22:28 +0200)]
radeon/llvm: add support for cos/sin intrinsic

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: add a pattern for fsqrt
Vincent Lejeune [Wed, 3 Oct 2012 19:40:49 +0000 (21:40 +0200)]
radeon/llvm: add a pattern for fsqrt

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoglapi: Reformat python code generation scripts to use 4-space indentation.
Paul Berry [Wed, 10 Oct 2012 14:20:57 +0000 (07:20 -0700)]
glapi: Reformat python code generation scripts to use 4-space indentation.

This brings us into accordance with the official Python style guide
(http://www.python.org/dev/peps/pep-0008/#indentation).

To preserve the indentation of the c code that is generated by these
scripts, I've avoided re-indenting triple-quoted strings (unless those
strings appear to be docstrings).

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Avoid C99 indexed initializers.
José Fonseca [Wed, 10 Oct 2012 11:25:06 +0000 (12:25 +0100)]
mesa: Avoid C99 indexed initializers.

Not supported by MSVC.

Reviewed-by: Imre Deak <imre.deak@intel.com>
12 years agomesa: Prevent CONST macro re-definition.
José Fonseca [Wed, 10 Oct 2012 10:40:07 +0000 (11:40 +0100)]
mesa: Prevent CONST macro re-definition.

Should fix MSVC build, as windows.h also defines CONST.

CONST usage in get.c is not new, so probably this just appeared now due
to changes in the includes.

12 years agomesa: Silence 'assignment makes integer from pointer without a cast' warnings.
José Fonseca [Wed, 10 Oct 2012 10:35:34 +0000 (11:35 +0100)]
mesa: Silence 'assignment makes integer from pointer without a cast' warnings.

12 years agoglget: fix make check for glGet GL_POLYGON_OFFSET_BIAS
Imre Deak [Wed, 10 Oct 2012 09:48:19 +0000 (12:48 +0300)]
glget: fix make check for glGet GL_POLYGON_OFFSET_BIAS

This got broken by:
7182a1f glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension
section

Fix it by appending the _EXT suffix to the enum in the test too.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: remove the unused TYPE_API_MASK flags
Imre Deak [Mon, 10 Sep 2012 05:46:51 +0000 (08:46 +0300)]
mesa: glGet: remove the unused TYPE_API_MASK flags

Since we generate the hash tables in build time, these flags aren't used
any more, remove them.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: use the build time generated hash tables
Imre Deak [Mon, 10 Sep 2012 05:46:16 +0000 (08:46 +0300)]
mesa: glGet: use the build time generated hash tables

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: add script to generate hash tables in build time
Imre Deak [Mon, 10 Sep 2012 05:46:13 +0000 (08:46 +0300)]
mesa: glGet: add script to generate hash tables in build time

This will be needed by the next patch, which will switch to using
the parameter descriptor- and hash tables generated by the script.

The hash algorithm remains the same, the output parameter descriptor
table format changes slightly. There the TYPE_API_MASK entries are
removed and an invalid NULL entry is inserted at the beginning. This is
ok, as get.c:find_value() doesn't rely on TYPE_API_MASK any more to
detect an invalid enum.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agoscons/android: add flag to check for enabled GL APIs
Imre Deak [Wed, 12 Sep 2012 16:46:05 +0000 (19:46 +0300)]
scons/android: add flag to check for enabled GL APIs

Needed by the next patch.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: rename *{_EXT,_ARB} enums missing from the XML spec
Imre Deak [Mon, 10 Sep 2012 05:46:10 +0000 (08:46 +0300)]
mesa: glGet: rename *{_EXT,_ARB} enums missing from the XML spec

The following enums used to be extensions but later became part of the
core specification. The _EXT/_ARB versions of these are not present in
in the current XML spec files, only defined in GL/glext.h

Later we'll need to look up these in a python script using the XML spec.
As a preparation for that remove the _EXT,_ARB suffix from these enums
and rename GL_DISTANCE_ATTENUATION_EXT to GL_POINT_DISTANCE_ATTENUATION.
Naturally, all enums keep their numerical values.

Note that similar renames shouldn't be necessary in the future: in case
of a new extension the XML spec is updated with the new _EXT/_ARB etc.
name and this name is added to the enum table in get.c.  Later the
extension may become part of the core spec, at which point the name w/o
the _EXT/_ARB suffix is added to the XML spec and the table in get.c
remains the same.

GL_BLEND_DST_ALPHA_EXT
GL_BLEND_DST_RGB_EXT
GL_BLEND_SRC_ALPHA_EXT
GL_BLEND_SRC_RGB_EXT
GL_COLOR_SUM_EXT
GL_COMPRESSED_TEXTURE_FORMATS_ARB
GL_CURRENT_FOG_COORDINATE_EXT
GL_CURRENT_SECONDARY_COLOR_EXT
GL_DISTANCE_ATTENUATION_EXT
GL_FOG_COORDINATE_ARRAY_EXT
GL_FOG_COORDINATE_ARRAY_STRIDE_EXT
GL_FOG_COORDINATE_ARRAY_TYPE_EXT
GL_FOG_COORDINATE_SOURCE_EXT
GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB
GL_PACK_IMAGE_HEIGHT_EXT
GL_PACK_SKIP_IMAGES_EXT
GL_SECONDARY_COLOR_ARRAY_EXT
GL_SECONDARY_COLOR_ARRAY_SIZE_EXT
GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT
GL_SECONDARY_COLOR_ARRAY_TYPE_EXT
GL_UNPACK_IMAGE_HEIGHT_EXT
GL_UNPACK_SKIP_IMAGES_EXT

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: simplify the 'enum not found' condition
Imre Deak [Mon, 10 Sep 2012 05:46:02 +0000 (08:46 +0300)]
mesa: glGet: simplify the 'enum not found' condition

When traversing the hash table looking up an enum that is invalid we
eventually reach the first element in the descriptor array. By looking
at the type of that element, which is always TYPE_API_MASK, we know that
we can stop the search and return error. Since this element is always
the first it's enough to check for its index being 0 without looking at
its type.

Later in this patchset, when we generate the hash tables during build
time, this will allow us to remove the TYPE_API_MASK and related flags
completly.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix parameter lookup for apps using multiple APIs
Imre Deak [Mon, 10 Sep 2012 05:45:56 +0000 (08:45 +0300)]
mesa: glGet: fix parameter lookup for apps using multiple APIs

The glGet hash was initialized only once for a single GL API, even if
the application later created a context for a different API. This
resulted in glGet failing for otherwise valid parameters in a context
if that parameter was invalid in another context created earlier.

Fix this by using a separate hash table for each API.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agoglapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section
Imre Deak [Mon, 10 Sep 2012 05:46:07 +0000 (08:46 +0300)]
glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section

This should be named GL_POLYGON_OFFSET_BIAS_EXT and listed under the
EXT_polygon_offset section. (Solution by Ian Romanick)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agor600g: move SQ_GPR_RESOURCE_MGMT_1 into new config_state
Marek Olšák [Sat, 6 Oct 2012 04:18:24 +0000 (06:18 +0200)]
r600g: move SQ_GPR_RESOURCE_MGMT_1 into new config_state

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: move DB_SHADER_CONTROL into db_misc_state
Marek Olšák [Sat, 6 Oct 2012 04:05:32 +0000 (06:05 +0200)]
r600g: move DB_SHADER_CONTROL into db_misc_state

Also update the register value in more appropriate places
than r600_update_derived_state.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: emit PS_PARTIAL_FLUSH at the beginning of CS
Marek Olšák [Sun, 7 Oct 2012 13:38:32 +0000 (15:38 +0200)]
r600g: emit PS_PARTIAL_FLUSH at the beginning of CS

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize depth-stencil-alpha state
Marek Olšák [Fri, 5 Oct 2012 18:11:15 +0000 (20:11 +0200)]
r600g: atomize depth-stencil-alpha state

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize rasterizer state
Marek Olšák [Fri, 5 Oct 2012 17:39:14 +0000 (19:39 +0200)]
r600g: atomize rasterizer state

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: sort variables in r600_context
Marek Olšák [Fri, 5 Oct 2012 14:51:41 +0000 (16:51 +0200)]
r600g: sort variables in r600_context

Some variables have been removed from there too.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: initialize SQ_VTX_SEMANTIC_* in the start_cs command buffer
Marek Olšák [Fri, 5 Oct 2012 03:50:30 +0000 (05:50 +0200)]
r600g: initialize SQ_VTX_SEMANTIC_* in the start_cs command buffer

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize scissor state
Marek Olšák [Fri, 5 Oct 2012 03:37:38 +0000 (05:37 +0200)]
r600g: atomize scissor state

The workaround for R600 lacking VPORT_SCISSOR_ENABLE has also been simplified.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize polygon offset state
Marek Olšák [Fri, 5 Oct 2012 02:59:50 +0000 (04:59 +0200)]
r600g: atomize polygon offset state

POLY_OFFSET_DB_FMT_CNTL is moved to the framebuffer state, because it only
depends on the zbuffer format.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize fetch shader
Marek Olšák [Fri, 5 Oct 2012 02:02:22 +0000 (04:02 +0200)]
r600g: atomize fetch shader

The state object is actually a buffer, it's literally a buffer containing
the shader code.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: remove the dual_src_blend flag from the shader key
Marek Olšák [Fri, 5 Oct 2012 01:00:38 +0000 (03:00 +0200)]
r600g: remove the dual_src_blend flag from the shader key

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: atomize blend state
Marek Olšák [Fri, 5 Oct 2012 00:45:29 +0000 (02:45 +0200)]
r600g: atomize blend state

This is not so trivial, because we disable blending if the dual src
blending is turned on and the number of color outputs is less than 2.
I decided to create 2 command buffers in the blend state object and just
switch between them when needed, because there are other states unrelated
to blending (like the color mask) and those shouldn't be changed
(the old code had it wrong).

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: inline r600_atom_dirty
Marek Olšák [Sun, 7 Oct 2012 01:47:43 +0000 (03:47 +0200)]
r600g: inline r600_atom_dirty

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agor600g: remove the "atom" variable from r600_command_buffer
Marek Olšák [Thu, 4 Oct 2012 22:20:27 +0000 (00:20 +0200)]
r600g: remove the "atom" variable from r600_command_buffer

r600_command_buffer is not an atom.

The "atoms" have evolved into state slots (or groups of state slots) where
you can bind states. There is a fixed amount of atoms (state slots)
in the context.

The command buffers are nothing like that. They represent states, not state
slots.

We could probably give r600_atom a better name someday.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agoegl: Remove bogus invalidate code.
Eric Anholt [Tue, 25 Sep 2012 21:45:16 +0000 (14:45 -0700)]
egl: Remove bogus invalidate code.

The invalidate event support is a careful dance between driver and loader,
where both have to say they can handle it, and then the loader reports
invalidate events for the driver so the driver can do the optimization.

The EGL code doesn't report __DRIuseInvalidateExtension to the driver, so it
has no responsibility to call the driver's invalidate function, and the driver
is doing the glViewport hack because it assume.  This is not
the only time invalidate would need to be called (we need it *any* time an
invalidate event comes down the pipe, but we don't watch for them), so just
stop calling the driver's function.

Acked-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoegl: Add support for driconf control of swapinterval.
Eric Anholt [Tue, 25 Sep 2012 21:05:30 +0000 (14:05 -0700)]
egl: Add support for driconf control of swapinterval.

This behavior mostly matches glx_dri2.  It's slightly complicated in
comparison because EGL exposes the implementation limits in the EGL config.

Note that platform_x11 was the only one setting swap_available, so the move of
the MaxSwapInterval into it is appropriate.

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

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoglx: Fix some indentation.
Eric Anholt [Tue, 25 Sep 2012 19:16:49 +0000 (12:16 -0700)]
glx: Fix some indentation.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 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>
12 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.

12 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.

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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.

12 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.

12 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

12 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>
12 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>
12 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.

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

12 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

12 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

12 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>
12 years agonv50: fix printf warning
Marek Olšák [Tue, 9 Oct 2012 12:38:43 +0000 (14:38 +0200)]
nv50: fix printf warning