mesa.git
12 years agogallium/docs: fix sphinx warning
Andreas Boll [Tue, 23 Oct 2012 16:29:41 +0000 (18:29 +0200)]
gallium/docs: fix sphinx warning

src/gallium/docs/source/context.rst:495: WARNING:
malformed hyperlink target.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Do not use -fvisibilty=hidden on Cygwin.
Vinson Lee [Sat, 20 Oct 2012 02:33:11 +0000 (19:33 -0700)]
scons: Do not use -fvisibilty=hidden on Cygwin.

This is a follow-up to commit db78643182dc39ed592dd8c2e5fc7c8eeb7316a1.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: fix indentation in get-pick-list.sh script
Andreas Boll [Sat, 20 Oct 2012 19:50:30 +0000 (21:50 +0200)]
mesa: fix indentation in get-pick-list.sh script

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: grep for commits with cherry picked in commit message only once
Andreas Boll [Fri, 19 Oct 2012 21:13:12 +0000 (23:13 +0200)]
mesa: grep for commits with cherry picked in commit message only once

and save them temporary in already_picked

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: optimize get-pick-list.sh script
Andreas Boll [Fri, 19 Oct 2012 21:00:17 +0000 (23:00 +0200)]
mesa: optimize get-pick-list.sh script

cuts down the while loop iterations from 4600 to 380 commits at the
moment

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: simplify get-pick-list.sh script
Andreas Boll [Fri, 19 Oct 2012 20:54:56 +0000 (22:54 +0200)]
mesa: simplify get-pick-list.sh script

and add a description for the script

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: add get-pick-list.sh script into bin/
Ian Romanick [Fri, 19 Oct 2012 20:30:53 +0000 (22:30 +0200)]
mesa: add get-pick-list.sh script into bin/

NOTE: This is a candidate for the stable branches.

12 years ago_mesa_create_exec_table: GLES3 fixes.
Paul Berry [Fri, 19 Oct 2012 13:37:09 +0000 (06:37 -0700)]
_mesa_create_exec_table: GLES3 fixes.

This patch sets up the dispatch table for the following GLES3
functions when a GLES3 context is in use:

- BeginQuery
- BeginTransformFeedback
- BindSampler
- BindTransformFeedback
- BlitFramebuffer
- ClearBufferfi
- ClearBufferfv
- ClearBufferiv
- ClearBufferuiv
- ClientWaitSync
- CopyBufferSubData
- DeleteQueries
- DeleteSamplers
- DeleteSync
- DeleteTransformFeedbacks
- EndQuery
- EndTransformFeedback
- FenceSync
- FramebufferTextureLayer
- GenQueries
- GenSamplers
- GenTransformFeedbacks
- GetInteger64v
- GetQueryObjectuiv
- GetQueryiv
- GetSamplerParameterfv
- GetSamplerParameteriv
- GetStringi
- GetSynciv
- GetTransformFeedbackVarying
- GetVertexAttribIiv
- GetVertexAttribIuiv
- IsQuery
- IsSampler
- IsSync
- IsTransformFeedback
- PauseTransformFeedback
- RenderbufferStorageMultisample
- ResumeTransformFeedback
- SamplerParameterf
- SamplerParameterfv
- SamplerParameteri
- SamplerParameteriv
- TransformFeedbackVaryings
- VertexAttribDivisor
- VertexAttribIPointer
- WaitSync

And it avoids setting up the dispatch table for these non-GLES3
functions:

- ColorMaski
- GetBooleani_v
- Enablei
- Disablei
- IsEnabledi
- ClearColorIiEXT
- ClearColorIuiEXT
- TextureStorage2DEXT
- TextureStorage3DEXT
- GetActiveUniformName
- GetnUniformdv
- GetnUniformfv
- GetnUniformiv
- GetnUniformuiv

Reviewed-by: Brian Paul <brianp@vmware.com>
v2: Make the ctx argument to _mesa_init_transform_feedback_dispatch()
a const pointer.  Add a comment to remind us to add
GetBufferParameteri64v once tests exist for it.  Also add
VertexAttribDivisor for GLES3, and remove GetActiveUniformName and
GetnUniform{dv,fv,iv,uiv} for GLES3.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years ago_mesa_create_exec_table(): deprecate ProgramStringARB.
Paul Berry [Fri, 19 Oct 2012 13:09:04 +0000 (06:09 -0700)]
_mesa_create_exec_table(): deprecate ProgramStringARB.

This function is only useful for the ARB_{vertex,fragment}_program
extensions, which we don't expose in core contexts.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years ago_mesa_create_exec_table: de-deprecate GetPointerv.
Paul Berry [Fri, 19 Oct 2012 13:01:42 +0000 (06:01 -0700)]
_mesa_create_exec_table: de-deprecate GetPointerv.

glGetPointerv was de-deprecated in GL 4.3, because GL 4.3 adds
functionality from KHR_debug and ARB_debug_output, which require
glGetPointerv.

This patch modifies _mesa_create_exec_table() to populate
glGetPointerv in the dispatch table for core contexts.

Technically this is not in compliance with the spec--what we really
ought to do for core contexts is expose glGetPointerv only when a GL
4.3 context is in use or one of the two extensions is present.
However, it seems silly to go to that extra work, since the only
client-visible effect would be for glGetPointerv to raise an
INVALID_OPERATION error instead of an INVALID_ENUM error.  Besides,
the other functions set up by _mesa_create_exec_table() only depend on
the API in use, not on the GL version or extensions supported.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoglapi: Alias VertexAttribDivisor and VertexAttribDivisorARB.
Paul Berry [Mon, 22 Oct 2012 22:02:50 +0000 (15:02 -0700)]
glapi: Alias VertexAttribDivisor and VertexAttribDivisorARB.

There's no reason to have separate slots in the dispatch table for
these two functions, since they are synonymous.

Note: previous to this patch, we never populated the dispatch table
slot for VertexAttribDivisor, which was ok, since it is not required
until 3.3.  After this patch, both functions will be usable provided
that the ARB_instanced_arrays extension is present.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoglapi: Alias ClampColor and ClampColorARB.
Paul Berry [Fri, 19 Oct 2012 05:13:02 +0000 (22:13 -0700)]
glapi: Alias ClampColor and ClampColorARB.

There's no reason to have separate slots in the dispatch table for
these two functions, since they are synonymous.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomain: Fix warning ('struct gl_context' declared inside parameter list).
Paul Berry [Sun, 21 Oct 2012 18:16:07 +0000 (11:16 -0700)]
main: Fix warning ('struct gl_context' declared inside parameter list).

This eliminates a warning in GCC 4.7.1.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Return 0 for GL_CURRENT_QUERY with a mismatched query target.
Eric Anholt [Wed, 17 Oct 2012 00:36:42 +0000 (17:36 -0700)]
mesa: Return 0 for GL_CURRENT_QUERY with a mismatched query target.

With the previous two commits, this fixes piglit
GL_ARB_occlusion_query2/api.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Refuse to EndQuery with a mismatched query target.
Eric Anholt [Wed, 17 Oct 2012 00:26:05 +0000 (17:26 -0700)]
mesa: Refuse to EndQuery with a mismatched query target.

v2: Add a comment about what we're checking for.

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Throw an error for a new query on an already-active query target.
Eric Anholt [Wed, 17 Oct 2012 00:21:39 +0000 (17:21 -0700)]
mesa: Throw an error for a new query on an already-active query target.

There's a similar test below, but it's not the same: that one checks whether
this query object is already active (potentially on another target).

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.
Eric Anholt [Wed, 17 Oct 2012 20:07:33 +0000 (13:07 -0700)]
i965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.

v2: Fix mangled sentence in the comment, and make the loop exit early.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
12 years agost/mesa: free TGSI tokens with ureg_free_tokens()
Brian Paul [Fri, 19 Oct 2012 21:34:55 +0000 (15:34 -0600)]
st/mesa: free TGSI tokens with ureg_free_tokens()

since they're allocated by ureg_get_tokens().

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

12 years agost/mesa: replace REALLOC() with realloc()
Brian Paul [Fri, 19 Oct 2012 20:51:20 +0000 (14:51 -0600)]
st/mesa: replace REALLOC() with realloc()

We should use the later since we're freeing the memory with free(),
not the gallium FREE() macro.

This fixes a mismatch when using the gallium debug memory functions.

NOTE: This is a candidate for the 9.0 branch.

12 years agodocs: GL_ARB_texture_storage is supported for all gallium drivers
Brian Paul [Fri, 19 Oct 2012 20:49:39 +0000 (14:49 -0600)]
docs: GL_ARB_texture_storage is supported for all gallium drivers

12 years agoRe-add HAVE_PTHREADS preprocessor macro
Matt Turner [Thu, 11 Oct 2012 17:57:26 +0000 (10:57 -0700)]
Re-add HAVE_PTHREADS preprocessor macro

Broken in commit 814345f54b.

NOTE: This is a candidate for the 9.0 branch.

12 years agogbm: Use the kms dumb ioctls for cursor instead of libkms
Kristian Høgsberg [Sun, 21 Oct 2012 17:00:28 +0000 (13:00 -0400)]
gbm: Use the kms dumb ioctls for cursor instead of libkms

We need to create bos suitable for cursor usage that we can map and
write data into.  The kms dumb ioctls is all we need for this, so drop
the dependency on libkms.

12 years agor600g: Remove special handling of PRED_SET* insructions for LLVM 3.2
Tom Stellard [Wed, 17 Oct 2012 19:21:48 +0000 (19:21 +0000)]
r600g: Remove special handling of PRED_SET* insructions for LLVM 3.2

The 3.2 version of the backend now sets all the correct fields for
PRED_SET* instructions.

12 years agoradeon/llvm: Sort tgsi opcode action initialization
Tom Stellard [Wed, 17 Oct 2012 19:16:00 +0000 (19:16 +0000)]
radeon/llvm: Sort tgsi opcode action initialization

This was done in order to identify and remove duplicate entries.

12 years agoradeon/llvm: Fix lowering TGSI_OPCODE_SSG
Tom Stellard [Wed, 17 Oct 2012 20:19:11 +0000 (20:19 +0000)]
radeon/llvm: Fix lowering TGSI_OPCODE_SSG

12 years agoi965: Stop flushing the batch on timestamp queries, too.
Eric Anholt [Tue, 16 Oct 2012 18:27:27 +0000 (11:27 -0700)]
i965: Stop flushing the batch on timestamp queries, too.

Given the usecase we have of trying to measure timestamps across individual
draw calls, flushing will totally mess up what people are trying to measure.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Don't flush the batch immediately on EndQuery.
Eric Anholt [Tue, 16 Oct 2012 18:13:49 +0000 (11:13 -0700)]
i965: Don't flush the batch immediately on EndQuery.

The theory I had when I wrote the code was that you wanted to minimize latency
on your queries because the app was going to ask soon.  Only, it turns out
that everybody batches up their queries and asks for the results later (often
after the next SwapBuffers!), so this was a pessimization.

Until now, I had no workload where it mattered enough to benchmark.  Recently
I started playing some Minecraft, which uses tons of queries to decide whether
to render chunks of the terrain.  For that app, avoiding the flush in the
query-generation loop improves performance 22.7% +/- 4.7% (n=3) on an apitrace
capture of it (confirmed in game by watching the fps meter found by pressing
F3, 15/16 -> 20/21 fps).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Fix typo in refactor of brw_fs_reg_allocate.cpp.
Eric Anholt [Fri, 19 Oct 2012 18:21:18 +0000 (11:21 -0700)]
i965/fs: Fix typo in refactor of brw_fs_reg_allocate.cpp.

I'm amazed that my usual warnings check didn't catch this, and that this
passed piglit.

12 years agoi965/vs: include format argument in debug printf
Tapani Pälli [Fri, 19 Oct 2012 06:45:20 +0000 (09:45 +0300)]
i965/vs: include format argument in debug printf

otherwise some compilers will throw error
"error: format not a string literal and no format arguments"

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agost/mesa: Fix source miptree level for copying data to finalized miptree.
Michel Dänzer [Fri, 19 Oct 2012 09:59:35 +0000 (11:59 +0200)]
st/mesa: Fix source miptree level for copying data to finalized miptree.

Fixes WebGL texture mips conformance test, no piglit regressions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912

NOTE: This is a candidate for the stable branches.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
12 years agoclover: No need for clover::is_zero() to be a functor.
Francisco Jerez [Fri, 19 Oct 2012 09:29:40 +0000 (11:29 +0200)]
clover: No need for clover::is_zero() to be a functor.

Simplify is_zero() somewhat, and as a side effect work around a gcc compiler
bug that causes build failure.

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

Reported-by: Dmitry Cherkassov <dcherkassov@gmail.com>
12 years agost/mesa: improve the guess_and_alloc_texture() heuristic
Brian Paul [Fri, 19 Oct 2012 00:00:50 +0000 (18:00 -0600)]
st/mesa: improve the guess_and_alloc_texture() heuristic

If GL_BASE_LEVEL==0 and GL_MAX_LEVEL==0 that's a pretty good hint that
there'll be a single mipmap level in the texture.

Google Earth sets the texture's state this way before the first glTexImage
call.  This saves a bit of texture memory.

12 years agogallium: remove unused data pointer from pipe_transfer
Marek Olšák [Wed, 17 Oct 2012 15:01:37 +0000 (17:01 +0200)]
gallium: remove unused data pointer from pipe_transfer

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agointel: Skip texsubimage fastpath for more pixel unpack state (v2)
Chad Versace [Fri, 12 Oct 2012 18:11:57 +0000 (11:11 -0700)]
intel: Skip texsubimage fastpath for more pixel unpack state (v2)

Fixes piglit tests "unpack-teximage2d --pbo=* --format=GL_BGRA" on
Sandybridge+.

The fastpath was checking an incomplete set of pixel unpack state. This
patch adds checks for all the fields of gl_pixelstore_attrib that affect
2D texture uploads.  Also, it begins permitting the case where
GL_UNPACK_ROW_LENGTH is 0.

Ideally, we would just ask a unicorn to JIT this fastpath for us in
a way that safely handles the unpacking state. Until then, it's safer if
only a small set of situations activate the fastpath.

v2: Use _mesa_is_bufferobj(), per Anholt.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoFinish _HAVE_FULL_GL removal
Matt Turner [Wed, 17 Oct 2012 02:37:34 +0000 (19:37 -0700)]
Finish _HAVE_FULL_GL removal

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoconfigure.ac: Fix LLVM 3.2 r600/radeonsi error message
Dmitry Cherkasov [Wed, 17 Oct 2012 18:03:13 +0000 (22:03 +0400)]
configure.ac: Fix LLVM 3.2 r600/radeonsi error message

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Dmitry Cherkasov <Dmitrii.Cherkasov@amd.com>
12 years agosvga: add svga_screen_cache_dump() debug helper
Brian Paul [Wed, 17 Oct 2012 15:55:54 +0000 (09:55 -0600)]
svga: add svga_screen_cache_dump() debug helper

12 years agowayland: Drop support for ill-defined, unused wl_egl_pixmap
Kristian Høgsberg [Tue, 16 Oct 2012 18:30:53 +0000 (14:30 -0400)]
wayland: Drop support for ill-defined, unused wl_egl_pixmap

It doesn't provide the cross-process buffer sharing that a window system
pixmap could otherwise support and we don't have anything left that uses
this type of surface.

12 years agowayland: Remove 0.85 compatibility #ifdefs
Kristian Høgsberg [Tue, 16 Oct 2012 18:04:02 +0000 (14:04 -0400)]
wayland: Remove 0.85 compatibility #ifdefs

12 years agoegl/wayland: Update to Wayland 0.99 API
Kristian Høgsberg [Thu, 11 Oct 2012 02:10:42 +0000 (22:10 -0400)]
egl/wayland: Update to Wayland 0.99 API

The 0.99.0 Wayland release changes the event API to provide a thread-safe
mechanism for receiving events specific to a subsystem (such as EGL) and
we need to use it in the EGL platform.

The Wayland protocol now also requires a commit request to make changes
take effect, issue that from eglSwapBuffers.

12 years agoi965/fs: Statically allocate the reg_sets at context initialization.
Eric Anholt [Wed, 3 Oct 2012 02:07:20 +0000 (19:07 -0700)]
i965/fs: Statically allocate the reg_sets at context initialization.

Now that we've replaced all the variable settings other than reg_width, it's
easy to hang on to this (the expensive part of setting up the allocator).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Allocate registers in the unused parts of the gen7 MRF hack range.
Eric Anholt [Tue, 2 Oct 2012 23:31:51 +0000 (16:31 -0700)]
i965/fs: Allocate registers in the unused parts of the gen7 MRF hack range.

This should also reduce register pressure on gen7+, like the previous commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Reduce the interference between payload regs and virtual GRFs.
Eric Anholt [Tue, 2 Oct 2012 22:01:24 +0000 (15:01 -0700)]
i965/fs: Reduce the interference between payload regs and virtual GRFs.

Improves performance of the Lightsmark penumbra shadows scene by 15.7% +/-
1.0% (n=15), by eliminating register spilling. (tested by smashing the list of
scenes to have all other scenes have 0 duration -- includes additional
rendering of scene description text that normally doesn't appear in that
scene)

v2: Allow allocation of all but g0/g1 of the payload.
v3: Pull count_to_loop_end() out to a helper function.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2, recommended v3)
12 years agoi965/fs: Expose the payload registers to the register allocator.
Eric Anholt [Tue, 2 Oct 2012 00:54:10 +0000 (17:54 -0700)]
i965/fs: Expose the payload registers to the register allocator.

For now, nothing else can get allocated over them, but that will change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Remove extra allocation for classes[].
Eric Anholt [Mon, 1 Oct 2012 23:41:02 +0000 (16:41 -0700)]
i965/fs: Remove extra allocation for classes[].

This was to slot in the magic aligned pairs class, but it got moved to a
descriptive name later.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Make the register allocation class_sizes[] choice static.
Eric Anholt [Mon, 1 Oct 2012 23:39:54 +0000 (16:39 -0700)]
i965/fs: Make the register allocation class_sizes[] choice static.

Based on split_virtual_grfs(), we choose the same set every time, so set it in
stone.  This will help us avoid regenerating the somewhat expensive
class/register set setup every compile.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Improve live interval calculation.
Eric Anholt [Wed, 3 Oct 2012 20:44:12 +0000 (13:44 -0700)]
i965/vs: Improve live interval calculation.

This is derived from the FS visitor code for the same, but tracks each channel
separately (otherwise, some typical fill-a-channel-at-a-time patterns would
produce excessive live intervals across loops and cause spilling).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48375
          (crash -> failure, can turn into pass by forcing unrolling still)

12 years agoi965/vs: Fix the mlen of scratch read/write messages.
Eric Anholt [Wed, 3 Oct 2012 23:15:07 +0000 (16:15 -0700)]
i965/vs: Fix the mlen of scratch read/write messages.

These messages always have m0 = g0 and m1 = offset, and write has m2 = data.
Avoids regression in opt_compute_to_mrf() with a change to scratch writes to
set up the data as an MRF write in the IR.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Make the cfg reusable from the VS.
Eric Anholt [Wed, 3 Oct 2012 20:17:58 +0000 (13:17 -0700)]
i965: Make the cfg reusable from the VS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Share the predicate field between FS and VS.
Eric Anholt [Wed, 3 Oct 2012 20:23:05 +0000 (13:23 -0700)]
i965: Share the predicate field between FS and VS.

Note that BRW_PREDICATE_NONE is 0 and BRW_PREDICATE_NORMAL is 1, so that's a
lot like the true/false we had in the FS before.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Rename fs_cfg types to not mention fs.
Eric Anholt [Wed, 3 Oct 2012 20:16:09 +0000 (13:16 -0700)]
i965: Rename fs_cfg types to not mention fs.

fs_bblock_link -> bblock_link
fs_bblock -> bblock_t (to avoid conflicting with all the fs_bblock *bblock)
fs_cfg -> cfg_t (to avoid conflicting with all the fs_cfg *cfg)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Move brw_fs_cfg.* to brw_cfg.*.
Eric Anholt [Wed, 3 Oct 2012 20:03:12 +0000 (13:03 -0700)]
i965: Move brw_fs_cfg.* to brw_cfg.*.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Make the FS and VS share a few visitor/instruction fields.
Eric Anholt [Wed, 3 Oct 2012 20:01:23 +0000 (13:01 -0700)]
i965: Make the FS and VS share a few visitor/instruction fields.

This will let us reuse brw_fs_cfg.cpp from brw_vec4_*.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Trim the swizzle of the scratch write temporary.
Eric Anholt [Tue, 16 Oct 2012 00:51:59 +0000 (17:51 -0700)]
i965/vs: Trim the swizzle of the scratch write temporary.

This fixes confusion by the upcoming live variable analysis which saw e.g. use
of temp.w when only temp.xyz were initialized in the basic block, and
concluded that temp.w must have come from outside of the block (even though it
was never initialized anywhere).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Do the temporary allocation in emit_scratch_write().
Eric Anholt [Tue, 16 Oct 2012 00:48:07 +0000 (17:48 -0700)]
i965/vs: Do the temporary allocation in emit_scratch_write().

Both callers were doing basically the same thing, just written differently.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Simplify emit_scratch_write() prototype.
Eric Anholt [Tue, 16 Oct 2012 00:42:43 +0000 (17:42 -0700)]
i965/vs: Simplify emit_scratch_write() prototype.

Both callers used (effectively) inst->dst as the argument, so just reference
it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Add a little bit of IR-level debug ability.
Eric Anholt [Wed, 3 Oct 2012 23:11:26 +0000 (16:11 -0700)]
i965/vs: Add a little bit of IR-level debug ability.

This is super basic, but it let me visualize a problem I had with
opt_compute_to_mrf().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglx: Add GLXBadProfileARB to the error string list
Adam Jackson [Wed, 17 Oct 2012 18:34:53 +0000 (14:34 -0400)]
glx: Add GLXBadProfileARB to the error string list

Note: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agoglx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()
Owen W. Taylor [Wed, 17 Oct 2012 04:50:28 +0000 (00:50 -0400)]
glx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()

Due to a string mismatch, INTEL_swap_event wasn't listed among GLX
extensions for the connection, even when present on both client and
server. That is, glXQueryServerString and glXGetClientString reported the
extension, but glXQueryExtensionsString did not.

Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56057
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agogallivm: Hide AVX support when requested by LP_NATIVE_VECTOR_WIDTH or unsupported...
José Fonseca [Wed, 17 Oct 2012 14:38:50 +0000 (15:38 +0100)]
gallivm: Hide AVX support when requested by LP_NATIVE_VECTOR_WIDTH or unsupported by LLVM.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agogallivm: Use mcjit for ppc_64 architecture
Will Schmidt [Thu, 4 Oct 2012 21:25:52 +0000 (16:25 -0500)]
gallivm: Use mcjit for ppc_64 architecture

Per commentary and direction in the LLVM community, support for ppc64 is
going into MCJIT rather than the old JIT.  There is no existing support
in prior llvm versions, so no need to specify LLVM version numbers.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agost/mesa: silence MSVC signed/unsigned comparison warning
Brian Paul [Wed, 17 Oct 2012 00:33:08 +0000 (18:33 -0600)]
st/mesa: silence MSVC signed/unsigned comparison warning

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agost/mesa: silence MSVC double/unsigned assignment warning
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
st/mesa: silence MSVC double/unsigned assignment warning

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agotgsi: silence MSVC signed/unsigned comparison warnings
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
tgsi: silence MSVC signed/unsigned comparison warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoutil: fix MSVC signed/unsigned comparison warning in u_upload_mgr.c code
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC signed/unsigned comparison warning in u_upload_mgr.c code

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoutil: fix MSVC signed/unsigned comparison warning in u_vbuf.c code
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC signed/unsigned comparison warning in u_vbuf.c code

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoutil: fix MSVC double/float conversion warning in u_format_r11g11b10f.h
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC double/float conversion warning in u_format_r11g11b10f.h

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agodraw: silence MSVC signed/unsigned comparison warnings
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
draw: silence MSVC signed/unsigned comparison warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoutil/blitter: silence assorted MSVC warnings
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util/blitter: silence assorted MSVC warnings

Fix signed/unsigned comparison warnings and float/int assignment warnings.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agowmesa: remove old, unused span code
Brian Paul [Wed, 17 Oct 2012 00:32:56 +0000 (18:32 -0600)]
wmesa: remove old, unused span code

12 years agoscons: Fix graw-xlib lib order.
José Fonseca [Wed, 17 Oct 2012 14:28:26 +0000 (15:28 +0100)]
scons: Fix graw-xlib lib order.

Avoids "undefined symbol: XShmCreateImage" error.

12 years agotgsi: Add support to parse IMM[x] too.
José Fonseca [Wed, 17 Oct 2012 14:27:26 +0000 (15:27 +0100)]
tgsi: Add support to parse IMM[x] too.

Thanks to Brian for pointing this out.

12 years agoRevert "gallivm: Don't use llvm.x86.avx.max/min.ps.256 inadvertently."
José Fonseca [Wed, 17 Oct 2012 14:04:20 +0000 (15:04 +0100)]
Revert "gallivm: Don't use llvm.x86.avx.max/min.ps.256 inadvertently."

This reverts commit bf2edc776b02a2a63862bf69a23adf666ecfcc57.

12 years agobuild: Build on Cygwin with gnu99 instead of c99.
Vinson Lee [Fri, 12 Oct 2012 01:19:49 +0000 (18:19 -0700)]
build: Build on Cygwin with gnu99 instead of c99.

The GCC c99 standard on Cygwin sets __STRICT_ANSI__ and symbols such as
strdup are not available.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoes2api: Add GL ES 3 headers
Matt Turner [Mon, 15 Oct 2012 18:20:40 +0000 (11:20 -0700)]
es2api: Add GL ES 3 headers

12 years agoglapi: Add es2="3.0" attributes to XML.
Matt Turner [Mon, 15 Oct 2012 22:09:38 +0000 (15:09 -0700)]
glapi: Add es2="3.0" attributes to XML.

Note that we are missing the ARB_internalformat_query extension, which
provides the glGetInternalformativ function needed by GL ES 3.0.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
12 years agosvga: whitespace fixes, remove useless comments
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: whitespace fixes, remove useless comments

12 years agosvga: silence MSVC warning about negating an unsigned value
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC warning about negating an unsigned value

12 years agosvga: silence MSVC double/float assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC double/float assignment warnings

12 years agosvga: fix MSVC double/float parameter warning
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: fix MSVC double/float parameter warning

12 years agosvga: silence MSVC float/int assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC float/int assignment warnings

12 years agosvga: silence MSVC double/float assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC double/float assignment warnings

12 years agosvga: silence some MSVC signed/unsigned comparison warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence some MSVC signed/unsigned comparison warnings

12 years agomesa/tests: Add ES1.1 dispatch table sanity test
Ian Romanick [Mon, 15 Oct 2012 22:22:57 +0000 (15:22 -0700)]
mesa/tests: Add ES1.1 dispatch table sanity test

This test actually depends on FEATURE_ES1 because
_mesa_create_exec_table_es1 doesn't exist without it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
12 years agomesa/tests: Compile ES2 test regardless of FEATURE_ES2 setting
Ian Romanick [Mon, 15 Oct 2012 22:00:53 +0000 (15:00 -0700)]
mesa/tests: Compile ES2 test regardless of FEATURE_ES2 setting

The relevant ES2 code is always in Mesa.  Always building the tests
ensures that things aren't accidentally broken when people don't build
with --enable-es2.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agomesa: remove FEATURE_ES1 tests in enable.c code
Brian Paul [Sun, 23 Sep 2012 00:45:37 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES1 tests in enable.c code

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove FEATURE_ES test in _mesa_get_compressed_formats()
Brian Paul [Sun, 23 Sep 2012 00:45:36 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES test in _mesa_get_compressed_formats()

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove FEATURE_ES test in _mesa_is_compressed_format()
Brian Paul [Sun, 23 Sep 2012 00:45:35 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES test in _mesa_is_compressed_format()

The code already has a runtime ES1 test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove FEATURE_GL test from updated_drawbuffers()
Brian Paul [Sun, 23 Sep 2012 00:45:34 +0000 (18:45 -0600)]
mesa: remove FEATURE_GL test from updated_drawbuffers()

There's already a runtime test for full OpenGL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove #if _HAVE_FULL_GL checks
Brian Paul [Sun, 23 Sep 2012 00:45:33 +0000 (18:45 -0600)]
mesa: remove #if _HAVE_FULL_GL checks

This is basically more of the "remove FEATURE_x" clean-up.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove ASSERT_NO_FEATURE macro
Brian Paul [Sun, 23 Sep 2012 00:45:32 +0000 (18:45 -0600)]
mesa: remove ASSERT_NO_FEATURE macro

Was only used in one place.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi965: Fix rendering to small mipmaps of depth/stencil buffers using a temp mt.
Eric Anholt [Wed, 8 Aug 2012 16:03:26 +0000 (09:03 -0700)]
i965: Fix rendering to small mipmaps of depth/stencil buffers using a temp mt.

Fixes 51 piglit tests (fbo-clear-formats, and most of the remaining failures
in depthstencil).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Share the draw x/y offset masking code between main/blorp and all gens.
Eric Anholt [Tue, 7 Aug 2012 23:53:24 +0000 (16:53 -0700)]
i965: Share the draw x/y offset masking code between main/blorp and all gens.

This code is twisty, and the comment before most of the blocks was actually
giving me the opposite impression from its intention: We want to apply as much
of our offset as possible through coarse tile-aligned adjustment, since we can
do so independently per buffer, and apply the minimum we can through
fine-grained drawing offset x/y, since it has to agree between all buffers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Make a helper function for the renderbuffer temporary mt workaround.
Eric Anholt [Wed, 8 Aug 2012 16:29:46 +0000 (09:29 -0700)]
i965: Make a helper function for the renderbuffer temporary mt workaround.

We now have a case of wanting to do that on gen6+ as well, so make this logic
usable elsewhere.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Warn on a couple of workarounds in blending.
Eric Anholt [Fri, 12 Oct 2012 19:53:08 +0000 (12:53 -0700)]
i965: Warn on a couple of workarounds in blending.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agointel: Add a macro for printing a debug warning once.
Eric Anholt [Fri, 12 Oct 2012 19:41:56 +0000 (12:41 -0700)]
intel: Add a macro for printing a debug warning once.

There are a number of places where some obscure piece of the code is not
currently worth fixing, and we have some workaround behavior available.  It's
nicer for users to do some lame workaround than to just assert, but without
asserts we never knew when the workaround was at fault.

This should give us a nice compromise: Execute the workaround, but mention
that the obscure workaround was hit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodocs: add note about removal of GL_NV_fragment_program
Andreas Boll [Tue, 16 Oct 2012 19:24:04 +0000 (21:24 +0200)]
docs: add note about removal of GL_NV_fragment_program

12 years agoglapi: Delete gles_api.py, since it is no longer used.
Paul Berry [Wed, 10 Oct 2012 23:59:20 +0000 (16:59 -0700)]
glapi: Delete gles_api.py, since it is no longer used.

Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomapi_abi: Use GLES information from XML rather than gles_api.py.
Paul Berry [Wed, 10 Oct 2012 23:31:01 +0000 (16:31 -0700)]
mapi_abi: Use GLES information from XML rather than gles_api.py.

Note: mapi_abi can consume API information from either XML or a .csv
file.  A side effect of this change is that the ES1 and ES2 API
printers can only be used with XML input now.  That's ok, since the
.csv input format is only used for the OpenVG API.

Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomapi_abi: Override 'hidden' and 'handcode' attributes using polymorphism.
Paul Berry [Wed, 10 Oct 2012 22:19:21 +0000 (15:19 -0700)]
mapi_abi: Override 'hidden' and 'handcode' attributes using polymorphism.

Previously, the ES1, ES2, and shared GLAPI printers passed a list of
function names to the base class constructor, which was used by the
_override_for_api() function to loop over all the API functions and
adjust their 'hidden' and 'handcode' attributes as appropriate for the
API flavour being code-generated.

This patch lifts the loop from _override_for_api() into its caller,
and makes it into a polymorphic function, so that the derived classes
can customize its behaviour directly.  In a future patch, this will
allow us to override the 'hidden' and 'handcode' attributes based on
information from the XML rather than a list of functions.

Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>