profile/ivi/mesa.git
12 years agointel: remove most of the span Get/PutRow code
Brian Paul [Mon, 16 Jan 2012 18:29:35 +0000 (11:29 -0700)]
intel: remove most of the span Get/PutRow code

12 years agodri/swrast: remove obsolete GetRow/PutRow code
Brian Paul [Mon, 16 Jan 2012 18:28:15 +0000 (11:28 -0700)]
dri/swrast: remove obsolete GetRow/PutRow code

12 years agoosmesa: remove obsolete GetRow/PutRow code
Brian Paul [Mon, 16 Jan 2012 18:28:02 +0000 (11:28 -0700)]
osmesa: remove obsolete GetRow/PutRow code

12 years agoxlib: remove obsolete GetRow/PutRow code
Brian Paul [Mon, 16 Jan 2012 18:24:18 +0000 (11:24 -0700)]
xlib: remove obsolete GetRow/PutRow code

12 years agomesa: remove obsolete PutRow, etc assignments
Brian Paul [Mon, 16 Jan 2012 18:24:09 +0000 (11:24 -0700)]
mesa: remove obsolete PutRow, etc assignments

12 years agoswrast: remove Get/PutRow()-related code
Brian Paul [Fri, 13 Jan 2012 01:33:09 +0000 (18:33 -0700)]
swrast: remove Get/PutRow()-related code

12 years agost/mesa: remove gl_renderbuffer::GetPointer stuff
Brian Paul [Mon, 16 Jan 2012 18:38:46 +0000 (11:38 -0700)]
st/mesa: remove gl_renderbuffer::GetPointer stuff

12 years agoswrast: stop using Put/GetRow/Values() in swrast code
Brian Paul [Mon, 16 Jan 2012 17:55:39 +0000 (10:55 -0700)]
swrast: stop using Put/GetRow/Values() in swrast code

All color buffer rendering is now done by accessing mapped renderbuffer
memory.  We're now able to get rid of all the GetRow/PutRow stuff.

12 years agoswrast: use gl_renderbuffer::StrideInBytes in depth/stencil code
Brian Paul [Mon, 16 Jan 2012 17:55:32 +0000 (10:55 -0700)]
swrast: use gl_renderbuffer::StrideInBytes in depth/stencil code

12 years agomesa: use gl_renderbuffer::Map for all depth/stencil accesses
Brian Paul [Mon, 16 Jan 2012 17:55:25 +0000 (10:55 -0700)]
mesa: use gl_renderbuffer::Map for all depth/stencil accesses

Instead of using the obsolete gl_renderbuffer::Data field.
Color buffer are still accessed through GetRow/PutRow().

12 years agointel: make intel_renderbuffer_map/unmap() static
Brian Paul [Mon, 16 Jan 2012 17:55:20 +0000 (10:55 -0700)]
intel: make intel_renderbuffer_map/unmap() static

12 years agomesa: add new gl_renderbuffer fields
Brian Paul [Mon, 16 Jan 2012 17:55:15 +0000 (10:55 -0700)]
mesa: add new gl_renderbuffer fields

These are temporary, actually, but they'll make follow-on work easier to
implement in a step-by-step manner.  Eventually the Map and RowStrideBytes
fields will go into a new swrast_renderbuffer type, but adding that type
now would involve touching a _lot_ of code that'll eventually be removed.

The fields marked as obsolete will go away completely at some point.

12 years agoswrast: flush pending rendering before unmapping buffers
Brian Paul [Mon, 16 Jan 2012 17:55:10 +0000 (10:55 -0700)]
swrast: flush pending rendering before unmapping buffers

12 years agoswrast: new assertions in _swrast_pixel_address()
Brian Paul [Mon, 16 Jan 2012 17:54:53 +0000 (10:54 -0700)]
swrast: new assertions in _swrast_pixel_address()

12 years agoswrast: use _swrast_pixel_address() in more places
Brian Paul [Mon, 16 Jan 2012 17:54:47 +0000 (10:54 -0700)]
swrast: use _swrast_pixel_address() in more places

12 years agoswrast: s/Data/Map/ in swrast_texture_image
Brian Paul [Mon, 16 Jan 2012 17:54:41 +0000 (10:54 -0700)]
swrast: s/Data/Map/ in swrast_texture_image

To indicate that it points to mapped texture memory.

12 years agoswrast: remove gl_renderbuffer::DataType check in DrawPixels()
Brian Paul [Mon, 16 Jan 2012 17:54:36 +0000 (10:54 -0700)]
swrast: remove gl_renderbuffer::DataType check in DrawPixels()

The field will be going away so update this code.

12 years agoswrast: remove gl_renderbuffer::DataType assertions
Brian Paul [Mon, 16 Jan 2012 17:54:31 +0000 (10:54 -0700)]
swrast: remove gl_renderbuffer::DataType assertions

This field will go away, so remove some uses of it.

12 years agost/mesa: remove gl_renderbuffer:DataType assignments
Brian Paul [Mon, 16 Jan 2012 17:54:23 +0000 (10:54 -0700)]
st/mesa: remove gl_renderbuffer:DataType assignments

That field is only used by swrast code so there's no reason to mess
with it in the gallium state tracker.

This also lets us remove the unused st_format_data() type function and
related code.

12 years agoswrast: make _swrast_get_values(), _swrast_get_row() static
Brian Paul [Mon, 16 Jan 2012 17:54:19 +0000 (10:54 -0700)]
swrast: make _swrast_get_values(), _swrast_get_row() static

They were only called from in s_span.c

12 years agoswrast: remove dstType param from _swrast_read_rgba_span()
Brian Paul [Mon, 16 Jan 2012 17:54:13 +0000 (10:54 -0700)]
swrast: remove dstType param from _swrast_read_rgba_span()

It was always GL_FLOAT.

12 years agoswrast: remove unused _swrast_put_row()
Brian Paul [Mon, 16 Jan 2012 17:54:01 +0000 (10:54 -0700)]
swrast: remove unused _swrast_put_row()

12 years agomesa: Don't resurrect deleted ARB VAOs in glPopClientAttrib
Ian Romanick [Sat, 21 Jan 2012 01:23:02 +0000 (17:23 -0800)]
mesa: Don't resurrect deleted ARB VAOs in glPopClientAttrib

When ARB VAOs are used, glPopClientAttrib does not resurrect a deleted
VAO or VBO.  This difference between the two spec is, unfortunately,
not very well spelled out in the specs.

Fixes oglc vao(advanced.pushPop.deleteVAO) and
vao(advanced.pushPop.deleteVBO) tests.

NOTE: This is a candidate for release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Rename gl_array_object::VBOonly to ::ARBsemantics
Ian Romanick [Mon, 23 Jan 2012 22:22:38 +0000 (14:22 -0800)]
mesa: Rename gl_array_object::VBOonly to ::ARBsemantics

There are more differences between Apple and ARB than just requiring
that all arrays be stored in VBOs.  Additional uses will be added in
following commits.

Also, set the flag at Bind time instead of Gen time.  The ARB_vao spec
specifies that behavior.

NOTE: This is a candidate for release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Use fixed-function processing instead _TexEnvProgram for DrawPixels
Ian Romanick [Fri, 20 Jan 2012 01:29:37 +0000 (17:29 -0800)]
swrast: Use fixed-function processing instead _TexEnvProgram for DrawPixels

This is a hack to work around drivers such as i965 that:

    - Set _MaintainTexEnvProgram to generate GLSL IR for
      fixed-function fragment processing.
    - Don't call _mesa_ir_link_shader to generate Mesa IR from the
      GLSL IR.
    - May use swrast to handle glDrawPixels.

Since _mesa_ir_link_shader is never called, there is no Mesa IR to
execute.  Instead do regular fixed-function processing.

Even on platforms that don't need this, the software fixed-function
code is much faster than the software shader code.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44749

12 years agomesa: Make sure _TexEnvProgram points at the current ff fragment program
Ian Romanick [Fri, 20 Jan 2012 01:23:51 +0000 (17:23 -0800)]
mesa: Make sure _TexEnvProgram points at the current ff fragment program

At least one place, the _mesa_need_secondary_color function in
state.h, uses this to make decisions.  The next patch in this series
will add another dependency.  Ideally, this field would go away and be
replace by a flag or something.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agosoftpipe: move var initialization to silence warning
Brian Paul [Tue, 24 Jan 2012 18:15:43 +0000 (11:15 -0700)]
softpipe: move var initialization to silence warning

12 years agor600g: remove unused variable
Brian Paul [Tue, 24 Jan 2012 18:15:23 +0000 (11:15 -0700)]
r600g: remove unused variable

12 years agoglsl: Don't use newlocale on Haiku
Alexander von Gluck [Sun, 22 Jan 2012 18:42:38 +0000 (12:42 -0600)]
glsl: Don't use newlocale on Haiku

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Don't use newlocale on Haiku
Alexander von Gluck [Sun, 22 Jan 2012 18:42:32 +0000 (12:42 -0600)]
mesa: Don't use newlocale on Haiku

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agosvga: fix typedef conflicts on Haiku
Alexander von Gluck [Sun, 22 Jan 2012 18:42:24 +0000 (12:42 -0600)]
svga: fix typedef conflicts on Haiku

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agollvmpipe: fix symbol conflict on Haiku
Alexander von Gluck [Sun, 22 Jan 2012 18:42:17 +0000 (12:42 -0600)]
llvmpipe: fix symbol conflict on Haiku

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Remove Haiku one-offs for gallium drivers
Alexander von Gluck [Sun, 22 Jan 2012 18:42:10 +0000 (12:42 -0600)]
scons: Remove Haiku one-offs for gallium drivers

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agogallium/postprocess: Proper reference counting of pp_jimenezmlaa depth buffer.
Michel Dänzer [Tue, 24 Jan 2012 16:57:56 +0000 (17:57 +0100)]
gallium/postprocess: Proper reference counting of pp_jimenezmlaa depth buffer.

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

NOTE: This is a candidate for the stable branches.

12 years agoRevert "Always build shared glapi"
Matt Turner [Tue, 24 Jan 2012 16:34:42 +0000 (11:34 -0500)]
Revert "Always build shared glapi"

This reverts commit adefee50d954151f76150af80207081ae3c247d9.

Shared glapi was never tested with --enable-xlib-glx and turns out
to cause a lot of problems.

Conflicts:

configure.ac

12 years agogbm: install libgbm.so into lib
Matt Turner [Tue, 24 Jan 2012 16:14:42 +0000 (11:14 -0500)]
gbm: install libgbm.so into lib

This partially reverts commit 90e256853418eaaba3717f930cc6a331e4099056.

12 years agollvmpipe: Fix math error in LP_DEBUG=counters output
Adam Jackson [Tue, 24 Jan 2012 15:51:15 +0000 (10:51 -0500)]
llvmpipe: Fix math error in LP_DEBUG=counters output

Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agor600g: fix inconsistency with INTERP* opcode definitions
Vadim Girlin [Tue, 24 Jan 2012 14:22:20 +0000 (18:22 +0400)]
r600g: fix inconsistency with INTERP* opcode definitions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: replace raw opcodes with names in the is_alu_trans/vector
Vadim Girlin [Tue, 24 Jan 2012 11:32:52 +0000 (15:32 +0400)]
r600g: replace raw opcodes with names in the is_alu_trans/vector

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: add missing opcode definitions
Vadim Girlin [Tue, 24 Jan 2012 11:32:51 +0000 (15:32 +0400)]
r600g: add missing opcode definitions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: fix loop break/continue operations
Vadim Girlin [Mon, 23 Jan 2012 09:23:19 +0000 (13:23 +0400)]
r600g: fix loop break/continue operations

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
12 years agor600g: fix fragcoord.w
Vadim Girlin [Mon, 23 Jan 2012 10:12:46 +0000 (14:12 +0400)]
r600g: fix fragcoord.w

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
12 years agotargets/gbm: Fix install path
Benjamin Franzke [Tue, 24 Jan 2012 09:12:59 +0000 (10:12 +0100)]
targets/gbm: Fix install path

GBM_BACKEND_INSTALL_DIR was deleted by commit
06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
Since we dont need this configurable, use $(INSTALL_LIB_DIR)/gbm now.

12 years agogbm/Makefile.template: Remove builtin-compile path
Benjamin Franzke [Tue, 24 Jan 2012 08:29:43 +0000 (09:29 +0100)]
gbm/Makefile.template: Remove builtin-compile path

Builtins are handled by the main gbm Makefile since
06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.

12 years agoegl,gbm_gallium: Fix linkage against gbm from automake
Benjamin Franzke [Tue, 24 Jan 2012 08:24:06 +0000 (09:24 +0100)]
egl,gbm_gallium: Fix linkage against gbm from automake

Add src/gbm/.libs to ldflags.
The gbm lib is src/gbm/.libs/ instead of lib/
as of commit 06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.

12 years agor600g: fix interpolation with clipvertex
Vadim Girlin [Mon, 23 Jan 2012 11:58:31 +0000 (15:58 +0400)]
r600g: fix interpolation with clipvertex

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoswrast: Fix unsigned promotion in pointer arithmetic
Chad Versace [Wed, 18 Jan 2012 23:56:58 +0000 (15:56 -0800)]
swrast: Fix unsigned promotion in pointer arithmetic

When rowstride was negatie, unsigned promotion caused a segfault here:

299│    if (rb->Format == MESA_FORMAT_S8) {
300│       const GLuint rowStride = rb->RowStride;
301│       for (i = 0; i < count; i++) {
302│          if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
303├>            stencil[i] = *(map + y[i] * rowStride + x[i]);
304│          }
305│       }
306│    }

Fixes segfault in oglconform
separatestencil-neu(NonPolygon.BothFacesBitmapCoreAPI),
though test still fails.

Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agometa: Fallback for glBlitFramebuffer from a multisample surface
Ian Romanick [Sat, 21 Jan 2012 00:08:01 +0000 (16:08 -0800)]
meta: Fallback for glBlitFramebuffer from a multisample surface

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44818

12 years agoi965/vs: Fix bogus assertion in emit_block_move()
Paul Berry [Thu, 19 Jan 2012 23:49:43 +0000 (15:49 -0800)]
i965/vs: Fix bogus assertion in emit_block_move()

i965 processes assignments of whole structures using
vec4_visitor::emit_block_move, a recursive function which visits each
element of a structure or array (to arbitrary nesting depth) and
copies it from the source to the destination.  Then it increments the
source and destination register numbers so that further recursive
invocations will copy the rest of the structure.  In addition, it sets
the swizzle field for the source register to an appropriate value of
swizzle_for_size(...) for the size of each element being copied, so
that later optimization passes won't be fooled into thinking that
unused vector elements are live.

This all works fine.  However, emit_block_move also contains an
assertion to verify, before setting the swizzle field for the source
register, that the source register doesn't already contain a
nontrivial swizzle.  The intention is to make sure that the caller of
emit_block_move hasn't already done some swizzling of the data before
the call, which emit_block_move would then counteract when it
overwrites the swizzle field.  But the assertion is at the lowest
level of nesting of emit_block_move, which means that after the first
element is copied, instead of checking the swizzle field set by the
caller, it checks the swizzle field used when moving the previous
element.  That means that if the structure contains elements of
different vector sizes (which therefore require different swizzles),
the assertion will erroneously fire.

This patch moves the assertion from emit_block_move to the calling
function, vec4_visitor::visit(ir_assignment *).  Since the caller is
non-recursive, the assertion will only happen once, and won't be
fooled by emit_block_move's modification of the swizzle field.

This patch also reverts commit fe006a7 (i965/vs: Fix swizzle related
assertion), which attempted to fix the bug by making the assertion
more lenient, but only worked properly for structures, arrays, and
matrices in which each constituent vector is the same size.

This fixes the problem described in comment 9 of
https://bugs.freedesktop.org/show_bug.cgi?id=40865.  Unfortunately, it
doesn't fix the whole bug, since the test in question is also failing
due to lack of register spilling support in the VS.

Fixes piglit test vs-assign-varied-struct.  No piglit regressions on
Sandy Bridge.

This is a candidate for the 8.0 release branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40865#c9
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agor600g: clean up register headers
Alex Deucher [Mon, 23 Jan 2012 21:41:52 +0000 (16:41 -0500)]
r600g: clean up register headers

- CP_INTERRUPT packet doesn't exist
- remove lots of r6xx copy/paste remnants from evergreen reg header
- fix some cayman specific registers

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoi965/vs: Enable workaround-free math on gen7.
Eric Anholt [Wed, 18 Jan 2012 22:42:26 +0000 (14:42 -0800)]
i965/vs: Enable workaround-free math on gen7.

This is similar to a commit that did the same for the FS.

Shaves several more instructions off of the VS in Lightsmark, but no
statistically significant performance difference (n=5).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Use the embedded-comparison SEL on gen6+, like the FS does.
Eric Anholt [Wed, 18 Jan 2012 20:58:45 +0000 (12:58 -0800)]
i965/vs: Use the embedded-comparison SEL on gen6+, like the FS does.

Shaves a few instructions off of the VS in Lightsmark, but no
statistically significant performance difference on gen7 (n=5).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautomake: src/gbm
Matt Turner [Mon, 16 Jan 2012 02:30:26 +0000 (21:30 -0500)]
automake: src/gbm

libgbm.so.1.0.0 (instead of libgbm.so.1.0) is installed now
along with libgbm.so.1 (no change).

12 years agoautoconf: Fix build of dri symbols test to not manually link expat.
Eric Anholt [Wed, 18 Jan 2012 19:27:24 +0000 (11:27 -0800)]
autoconf: Fix build of dri symbols test to not manually link expat.

AC_CHECK_LIB has this nasty behavior, like the cflags tests, of
automatically putting the tested value into the global LIBS on
success.  This caused -lexpat to end up in LIBS, but without the
--with-expat dir, so my 32-bit build on a 64 system using expat from a
custom prefix could only find the system expat and fail to link on the
one current consumer of the LIBS variable: the dri driver test link.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Fix border color on Sandybridge and Ivybridge.
Kenneth Graunke [Fri, 20 Jan 2012 11:33:40 +0000 (03:33 -0800)]
i965: Fix border color on Sandybridge and Ivybridge.

While reading through the simulator, I found some interesting code that
looks like it checks the sampler default color pointer against the bound
set in STATE_BASE_ADDRESS.  On failure, it appears to program it to the
base address itself.

So I decided to try programming a legitimate bound, and lo and behold,
border color worked.

+92 piglits on Sandybridge.  Also fixes Lightsmark on Ivybridge.

NOTE: This is a candidate for stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28924
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38868
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoFix underlinking in libOSMesa since commit adefee5 "Always build shared glapi"
Jon TURNEY [Sun, 22 Jan 2012 13:23:26 +0000 (13:23 +0000)]
Fix underlinking in libOSMesa since commit adefee5 "Always build shared glapi"

Since we now always build shared glapi, this exposes the fact that libOSMesa was
underlinked when glapi was built shared.

Fix this by doing the same thing as drivers/X11/Makefile already does, ensuring
that the library is linked with the shared glapi library.

(I'm not clear why we link with both glapi.a and glapi.so, so this may be all wrong)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
12 years agoDon't build shared dricore when unneeded
Jon TURNEY [Sun, 22 Jan 2012 14:21:56 +0000 (14:21 +0000)]
Don't build shared dricore when unneeded

Refine "always build shared dricore" so we don't build it if we don't need
it because we aren't actually building any dri drivers because of --disable-driglx-direct

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agor600g: cayman fix integer multiplies
Dave Airlie [Mon, 23 Jan 2012 13:18:16 +0000 (13:18 +0000)]
r600g: cayman fix integer multiplies

Looks insane, but it does appear we need a full slot per input/output.

This fixes another 180 or so piglit tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: cayman initial integer support
Dave Airlie [Mon, 23 Jan 2012 11:21:43 +0000 (11:21 +0000)]
r600g: cayman initial integer support

Adds all the easier lowhanging opcodes.

Fixes ~3000 piglit tests with GLSL1.30 enabled on cayman.

This just leaves the mul/div/mod ops to fix up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix VS fog export
Vadim Girlin [Mon, 23 Jan 2012 09:47:51 +0000 (13:47 +0400)]
r600g: fix VS fog export

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodri: install dri_interface.h
Matt Turner [Sun, 22 Jan 2012 22:15:03 +0000 (17:15 -0500)]
dri: install dri_interface.h

Broken in commit 129213e7.

Reported-by Kai Wasserbäch <kai@dev.carbon-project.org>

12 years agor600g: shift integer ops are trans unit only on r600.
Dave Airlie [Sun, 22 Jan 2012 17:24:29 +0000 (17:24 +0000)]
r600g: shift integer ops are trans unit only on r600.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: replace trans/vector-only instruction lists with ranges (v2)
Vadim Girlin [Sat, 21 Jan 2012 20:17:11 +0000 (00:17 +0400)]
r600g: replace trans/vector-only instruction lists with ranges (v2)

airlied : assert on cayman cases to keep compiler happy

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoRevert "r600g: replace trans/vector-only instruction lists with ranges"
Dave Airlie [Sun, 22 Jan 2012 17:09:34 +0000 (17:09 +0000)]
Revert "r600g: replace trans/vector-only instruction lists with ranges"

This reverts commit 946309067c835d35a85ab2ad774df6698e6669ab.

Until we check the cayman bits out properly

12 years agor600g: srgb mode is only valid on certain format types.
Dave Airlie [Sun, 22 Jan 2012 16:52:19 +0000 (16:52 +0000)]
r600g: srgb mode is only valid on certain format types.

"If set, forces degamma on XYZ if format is
FMT_8_8_8_8, FMT_BC1, FMT_BC2, or FMT_BC3"

Don't claim support for sRGB on any other formts.

This fixes glean texture_srgb.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: initial cube shadow sampling
Dave Airlie [Sun, 22 Jan 2012 16:14:32 +0000 (16:14 +0000)]
r600g: initial cube shadow sampling

It doesn't pass the piglit test, but it seems to be a lot closer
than it was before. I need to track down if there is another problem.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: take into account kcache banks for bank swizzle check
Vadim Girlin [Sat, 21 Jan 2012 21:49:46 +0000 (01:49 +0400)]
r600g: take into account kcache banks for bank swizzle check

Due to the changes for multiple kcache banks support, now we are assigning
final SRCx_SEL values for kcache access at the later stage, when building the
bytecode. So we need to take into account kcache banks to distinguish
the constants with the same address but different bank index.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen
Vadim Girlin [Sat, 21 Jan 2012 20:17:12 +0000 (00:17 +0400)]
r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: replace trans/vector-only instruction lists with ranges
Vadim Girlin [Sat, 21 Jan 2012 20:17:11 +0000 (00:17 +0400)]
r600g: replace trans/vector-only instruction lists with ranges

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix some interpolation tests for evergreen
Vadim Girlin [Sat, 21 Jan 2012 20:17:10 +0000 (00:17 +0400)]
r600g: fix some interpolation tests for evergreen

Same fix as previously done by Dave Airlie for r600/r700

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoconfigure.ac: use AC_PROG_MKDIR_P
Matt Turner [Sun, 22 Jan 2012 03:43:02 +0000 (22:43 -0500)]
configure.ac: use AC_PROG_MKDIR_P

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

12 years agoRemove src/mesa/ppc
Matt Turner [Fri, 20 Jan 2012 21:01:38 +0000 (16:01 -0500)]
Remove src/mesa/ppc

It didn't actually do anything except modify the GL_RENDERER string.

12 years agoFix mistake in 349845f7b
Andrei Slăvoiu [Sat, 21 Jan 2012 16:36:26 +0000 (11:36 -0500)]
Fix mistake in 349845f7b

12 years agor600g: implement clip vertex v2
Vadim Girlin [Fri, 20 Jan 2012 21:37:48 +0000 (01:37 +0400)]
r600g: implement clip vertex v2

Clip planes are uploaded as a constant buffer and used by the vertex
shader to produce corresponding clip distances for hw clipping.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: improve kcache line sets handling v2
Vadim Girlin [Fri, 20 Jan 2012 19:24:32 +0000 (23:24 +0400)]
r600g: improve kcache line sets handling v2

Add support for multiple kcache banks (constant buffers).
Lock the required lines only.
Allow up to 4 kcache line sets in the alu clause by using ALU_EXTENDED on eg+.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: no need to do CUBE coordinate handling for TXQ.
Dave Airlie [Sat, 21 Jan 2012 12:15:10 +0000 (22:15 +1000)]
r600g: no need to do CUBE coordinate handling for TXQ.

Fixes texSize on cube.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: make INTERP_LOAD_P0 vector-only
Vadim Girlin [Sat, 21 Jan 2012 00:48:12 +0000 (04:48 +0400)]
r600g: make INTERP_LOAD_P0 vector-only

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoglsl: Fix 'control reaches end of non-void function' warning.
Vinson Lee [Tue, 17 Jan 2012 02:01:22 +0000 (18:01 -0800)]
glsl: Fix 'control reaches end of non-void function' warning.

Fix this GCC warning on non-debug builds.
glsl_types.cpp: In member function 'gl_texture_index
glsl_type::sampler_index() const':
glsl_types.cpp:157: warning: control reaches end of non-void function

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agor600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable
Alex Deucher [Fri, 20 Jan 2012 23:04:44 +0000 (18:04 -0500)]
r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: update streamout support for virtual addresses
Alex Deucher [Fri, 20 Jan 2012 23:01:58 +0000 (18:01 -0500)]
r600g: update streamout support for virtual addresses

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoRemove reference to now deleted dri/Makefile.targets
Matt Turner [Fri, 20 Jan 2012 21:53:31 +0000 (16:53 -0500)]
Remove reference to now deleted dri/Makefile.targets

12 years agoautomake: src/mesa/drivers/dri
Matt Turner [Sun, 15 Jan 2012 16:50:20 +0000 (11:50 -0500)]
automake: src/mesa/drivers/dri

12 years agoautomake: src/mesa/drivers/dri/swrast
Matt Turner [Sun, 15 Jan 2012 16:39:48 +0000 (11:39 -0500)]
automake: src/mesa/drivers/dri/swrast

12 years agoautomake: src/mesa/drivers/dri/nouveau
Matt Turner [Sun, 15 Jan 2012 15:20:30 +0000 (10:20 -0500)]
automake: src/mesa/drivers/dri/nouveau

12 years agoautomake: src/mesa/drivers/dri/r200
Matt Turner [Sun, 15 Jan 2012 15:04:58 +0000 (10:04 -0500)]
automake: src/mesa/drivers/dri/r200

12 years agoautomake: src/mesa/drivers/dri/radeon
Matt Turner [Sun, 15 Jan 2012 03:21:30 +0000 (22:21 -0500)]
automake: src/mesa/drivers/dri/radeon

12 years agoautomake: src/mesa/drivers/dri/i915
Matt Turner [Sun, 15 Jan 2012 02:57:32 +0000 (21:57 -0500)]
automake: src/mesa/drivers/dri/i915

12 years agor600g: fix streamout on evergreen
Vadim Girlin [Wed, 18 Jan 2012 09:46:26 +0000 (13:46 +0400)]
r600g: fix streamout on evergreen

Enable it in the evergreen_context_draw if needed.
Same as already done in the r600_context_draw for r6xx/r7xx.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: fix combined MEM_STREAM instructions
Vadim Girlin [Wed, 18 Jan 2012 19:17:29 +0000 (23:17 +0400)]
r600g: fix combined MEM_STREAM instructions

BURST_COUNT is clipped with ARRAY_SIZE, so set it to the max value
to avoid clipping.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoAlways build shared dricore
Matt Turner [Fri, 13 Jan 2012 19:30:36 +0000 (14:30 -0500)]
Always build shared dricore

Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoAlways build shared glapi
Matt Turner [Wed, 11 Jan 2012 23:32:14 +0000 (18:32 -0500)]
Always build shared glapi

libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all
come from the same version of Mesa or bad things may happen.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoRemove -ffast-math from default CFLAGS
Matt Turner [Thu, 12 Jan 2012 00:02:26 +0000 (19:02 -0500)]
Remove -ffast-math from default CFLAGS

Fixes glsl-const-folding-01. inversesqrt(1.0) != 1.0 was evaluating as
true.

Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agointel/gen6: Some framebuffers having separate depthstencil should be unsupported
Chad Versace [Thu, 19 Jan 2012 21:08:48 +0000 (13:08 -0800)]
intel/gen6: Some framebuffers having separate depthstencil should be unsupported

When the framebuffer has separate depth and stencil buffers, and HiZ is
not enabled on the depth buffer, mark the framebuffer as unsupported. This
happens when trying to create a framebuffer with Z16/S8 because we haven't
enabled HiZ on Z16 yet.

Fixes gles2conform test stencil8.

Note: This is a candiate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44948
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed--by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agomesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)
Chad Versace [Tue, 17 Jan 2012 20:01:34 +0000 (12:01 -0800)]
mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

This loosens the format validation in glBlitFramebuffer. When blitting
depth bits, don't require an exact match between the depth formats; only
require that the two formats have the same number of depth bits and the
same depth datatype (float vs uint). Ditto for stencil.

Between S8_Z24 buffers, the EXT_framebuffer_blit spec allows
glBlitFramebuffer to blit the depth and stencil bits separately. So I see
no reason to prevent blitting the depth bits between X8_Z24 and S8_Z24 or
the stencil bits between S8 and S8_Z24. However, we of course don't want
to allow blitting from Z32 to Z32_FLOAT.

Fixes Piglit fbo/fbo-blit-d24s8 on Intel drivers with separate stencil
enabled.

The problem was that, on Intel drivers with separate stencil, the default
framebuffer has separate depth and stencil buffers with formats X8_Z24 and
S8. The test attempts to blit the depth bits from a S8_Z24 buffer into the
default framebuffer.

v2: Check that depth datatypes match.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44665
Note: This is a candidate for the 8.0 branch.
Reported-by: Xunx Fang <xunx.fang@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agonvc0: fix some limit cap values
Christoph Bumiller [Fri, 20 Jan 2012 12:43:32 +0000 (13:43 +0100)]
nvc0: fix some limit cap values

NOTE: This is a candidate for the 8.0 branch.

12 years agonvc0: handle discontiguous outputs in stream_output_info
Christoph Bumiller [Fri, 20 Jan 2012 12:29:42 +0000 (13:29 +0100)]
nvc0: handle discontiguous outputs in stream_output_info

12 years agomesa: allocate transform_feedback_info::Outputs array dynamically
Christoph Bumiller [Fri, 20 Jan 2012 12:24:46 +0000 (13:24 +0100)]
mesa: allocate transform_feedback_info::Outputs array dynamically

The nvc0 gallium driver is advertising 128 MAX_INTERLEAVED_COMPS
which made it always assert in the linker when TFB was used since
the Outputs array was smaller than that maximum.

v2: added assertions

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
12 years agor600g: fixup AR handling (v5)
Dave Airlie [Wed, 18 Jan 2012 15:16:55 +0000 (15:16 +0000)]
r600g: fixup AR handling (v5)

So it appears R600s (except rv670) do AR handling different using a different
opcode. This patch fixes up r600g to work properly on r600.

This fixes ~100 piglit tests here (in GLSL1.30 mode) on rv610.

v3: add index_mode as per the docs.

This still fails any dst relative tests for some reason I can't quite see yet,
but it passes a lot more tests than without.

v4: add a nop after dst.rel this could be improved using a second pass,
where we only insert nops if two instructions are sure to collide.
The docs say r600, rv610, rv630 needs this, and not rv670, rs780, rs880,
need AMD to confirm rv620, rv635.

v5: add is_nop_inst.

NOTE: This is a candidate for stable branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: include arrayobj.h to silence implicit function declaration warning
Brian Paul [Fri, 20 Jan 2012 17:55:15 +0000 (10:55 -0700)]
mesa: include arrayobj.h to silence implicit function declaration warning

Caused by commit 7a1e941ebee43cb97a2c77fd2269999b202308a2.

12 years agomesa: Fix and speedup gl_array_object::_MaxElement computation.
Mathias Fröhlich [Thu, 29 Dec 2011 12:10:01 +0000 (13:10 +0100)]
mesa: Fix and speedup gl_array_object::_MaxElement computation.

Use a bitmask approach to compute gl_array_object::_MaxElement.
To make this work correctly depending on the shader type actually used,
make use of the newly introduced typed bitmask getters.
With this change I gain about 5% draw time on some osgviewer examples.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>