platform/upstream/mesa.git
13 years agomesa: remove redundant buffer checks in copytexsubimage_error_check2()
Brian Paul [Thu, 13 Oct 2011 13:37:43 +0000 (07:37 -0600)]
mesa: remove redundant buffer checks in copytexsubimage_error_check2()

Again, there was already a call to _mesa_source_buffer_exists() earlier in
the function.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agomesa: remove redundant buffer checks in copytexture_error_check()
Brian Paul [Thu, 13 Oct 2011 13:37:43 +0000 (07:37 -0600)]
mesa: remove redundant buffer checks in copytexture_error_check()

There was already a call to _mesa_source_buffer_exists() earlier in
the function.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agomesa: check attachment Type field in renderbuffer_exists()
Brian Paul [Thu, 13 Oct 2011 13:37:43 +0000 (07:37 -0600)]
mesa: check attachment Type field in renderbuffer_exists()

Instead of the renderbuffer pointer.  In the future, attaching a texture
may not mean the renderbuffer pointer gets set too.
Plus, remove some commented-out assertions.

13 years agomesa: consolidate _mesa_source/dest_buffer_exists()
Brian Paul [Thu, 13 Oct 2011 13:37:43 +0000 (07:37 -0600)]
mesa: consolidate _mesa_source/dest_buffer_exists()

v2: add a 'reading' parameter to distinguish between reading and writing
to the renderbuffer (we don't want to check if _ColorReadBuffer is null
when we're about to draw).  Eric found this mistake.

13 years agod3d1x: fix check for PIPE_CAP_CONDITIONAL_RENDER
Christoph Bumiller [Tue, 11 Oct 2011 13:04:36 +0000 (15:04 +0200)]
d3d1x: fix check for PIPE_CAP_CONDITIONAL_RENDER

13 years agoscons: Use -fno-builtin-memcmp.
José Fonseca [Wed, 12 Oct 2011 19:42:05 +0000 (20:42 +0100)]
scons: Use -fno-builtin-memcmp.

ipers framerate on llmvpipe improves 60%.

Issue spotted by Adam Jackson <ajax at redhat.com>.

http://lists.freedesktop.org/archives/mesa-dev/2011-June/009077.html

13 years agosoftpipe: fix regression with tex tile cache since integer support.
Dave Airlie [Wed, 12 Oct 2011 07:24:32 +0000 (08:24 +0100)]
softpipe: fix regression with tex tile cache since integer support.

Don't use the uint/int paths for ZS formats for tex tile cache.

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

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: make _mesa_update_depth/stencil_buffer() static
Brian Paul [Tue, 11 Oct 2011 03:00:01 +0000 (21:00 -0600)]
mesa: make _mesa_update_depth/stencil_buffer() static

These functions were only called in framebuffer.c where they were defined.
Remove the unneeded attIndex parameter too.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agointel: Assert that no batch is emitted if a region is mapped
Chad Versace [Thu, 6 Oct 2011 21:18:35 +0000 (14:18 -0700)]
intel: Assert that no batch is emitted if a region is mapped

What I would prefer to assert is that, for each region that is currently
mapped, no batch is emitted that uses that region's bo. However, it's much
easier to implement this big hammer.

Observe that this requires that the batch flush in intel_region_map() be
moved to within the map_refcount guard.

v2: Add comments (borrowed from anholt's reply) explaining why the
assertion is a good idea.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agoi965: Fix computation of abs(-x) in FS
Paul Berry [Fri, 7 Oct 2011 03:58:18 +0000 (20:58 -0700)]
i965: Fix computation of abs(-x) in FS

When updating a register reference to reflect the fact that we were
taking its absolute value, the fragment shader back-end failed to
clear the negate flag, resulting in abs(-x) getting computed as
-abs(x).

I also found (and fixed) a similar problem in brw_eu.h, but I'm not
aware of an actual manifestation of that problem.

Fixes piglit test glsl-fs-abs-neg-with-intermediate.

13 years agonv50: don't crash on TXD opcode
Marcin Slusarz [Mon, 10 Oct 2011 21:31:04 +0000 (23:31 +0200)]
nv50: don't crash on TXD opcode

It doesn't implement full TXD, but at least it does not crash.
Fixes arb_shader_texture_lod-texgrad and glsl-fs-shadow2DGradARB-*
piglit tests.

13 years agoi965: Replace incorrect use of GLboolean with enum brw_compression.
Kenneth Graunke [Fri, 7 Oct 2011 19:32:52 +0000 (12:32 -0700)]
i965: Replace incorrect use of GLboolean with enum brw_compression.

brw_set_compression_control took a GLboolean as an argument, then
promptly used a switch statement to compare it with various enumeration
values.  Clearly it's not actually a boolean.

Introduce a new enumeration type, enum brw_compression, and use that.

Found by converting GLboolean to bool; clang then gave warnings about
switching on a boolean and ultimately duplicated case errors.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agomesa: Only allow queries of window system FBO on desktop GL w/ARB_fbo
Ian Romanick [Mon, 3 Oct 2011 19:04:09 +0000 (12:04 -0700)]
mesa: Only allow queries of window system FBO on desktop GL w/ARB_fbo

Neither OES_framebuffer_object nor EXT_framebuffer_object allow
querying the window system FBO.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
13 years agomesa: Accept GL_DEPTH and GL_STENCIL for window system FBO only
Ian Romanick [Mon, 3 Oct 2011 19:02:18 +0000 (12:02 -0700)]
mesa: Accept GL_DEPTH and GL_STENCIL for window system FBO only

Previously GL_DEPTH_BUFFER and GL_STENCIL_BUFFER were (incorrectly)
allowed for both.  Those enums don't even really exist!  Now GL_DEPTH
and GL_STENCIL are only allowed for the window system FBO.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
13 years agosvga: remove old, unused sincos code for SM2.0
Brian Paul [Tue, 11 Oct 2011 15:39:28 +0000 (09:39 -0600)]
svga: remove old, unused sincos code for SM2.0

13 years agosvga: remove support for shader model 2.0
Brian Paul [Tue, 11 Oct 2011 15:30:09 +0000 (09:30 -0600)]
svga: remove support for shader model 2.0

We've been requiring SM 3.0 all along so this just removes unused code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
13 years agosoftpipe: add integer support
Dave Airlie [Mon, 19 Sep 2011 14:05:51 +0000 (15:05 +0100)]
softpipe: add integer support

This adds support to the clear and tile caches for integer storage
and clearing, avoiding any floating paths.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agogallium: rename ZS stencil type to UINT (v2)
Dave Airlie [Sun, 11 Sep 2011 08:45:10 +0000 (09:45 +0100)]
gallium: rename ZS stencil type to UINT (v2)

these are never USCALED, always UINT in reality.

taken from some work by Christoph Bumiller

v2: fixup formatting of table + tabs

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agollvmpipe: don't support rendering to sRGB surfaces
Brian Paul [Thu, 6 Oct 2011 23:01:48 +0000 (17:01 -0600)]
llvmpipe: don't support rendering to sRGB surfaces

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

13 years agodraw/llvm: set draw->pt.user.planes field in draw_set_clip_state()
Brian Paul [Mon, 10 Oct 2011 23:49:27 +0000 (17:49 -0600)]
draw/llvm: set draw->pt.user.planes field in draw_set_clip_state()

Previously it was getting set in draw_set_mapped_constant_buffer() but
if there were no shader constants, that function wasn't called.  So the
pt.user.planes field was null and we died when we tried to access the
clip planes in the LLVM-generated code.

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

Note: This is a candidate for the 7.11 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 years agodraw/llvm: fix hard-coded number of total clip planes
Brian Paul [Mon, 10 Oct 2011 23:43:59 +0000 (17:43 -0600)]
draw/llvm: fix hard-coded number of total clip planes

Instead of 12 use DRAW_TOTAL_CLIP_PLANES.  The max number of user-defined
clip planes was increased to 8 so the total number of planes is 14.
This doesn't fix any specific bug, but clearly the old code was wrong.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 years agoi915g: fix warning about void pointer arithmetic
Brian Paul [Mon, 10 Oct 2011 22:35:22 +0000 (16:35 -0600)]
i915g: fix warning about void pointer arithmetic

13 years agoi915g: Remove duplicated comment.
Stéphane Marchesin [Tue, 11 Oct 2011 01:18:37 +0000 (18:18 -0700)]
i915g: Remove duplicated comment.

13 years agoi915g: Update TODO once more.
Stéphane Marchesin [Mon, 10 Oct 2011 23:56:49 +0000 (16:56 -0700)]
i915g: Update TODO once more.

13 years agoi965: Change type of brw_context.primitive from GLenum to hardware primitive
Chad Versace [Mon, 26 Sep 2011 23:23:26 +0000 (16:23 -0700)]
i965: Change type of brw_context.primitive from GLenum to hardware primitive

For example, GL_TRIANLGES is converted to _3DPRIM_TRILIST.

The conversion is necessary because HiZ and MSAA resolve operations emit
a 3DPRIM_RECTLIST, which cannot be conveyed by GLenum.

As a consequence, brw_gs_prog_key.primitive is also converted.

v2
----
- [anholt] Split brw_set_prim into brw/gen6 variants in previous commit,
  since not much code is really shared between the two.
- [anholt] Replace switch statements with table lookups, since this is
  a hot path.

Reviewed-by: Eric Anholt <eric@anho.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agoi965: Split brw_set_prim into brw/gen6 variants
Chad Versace [Mon, 26 Sep 2011 22:48:54 +0000 (15:48 -0700)]
i965: Split brw_set_prim into brw/gen6 variants

The "slight optimization to avoid the GS program" in brw_set_prim() is not
used by Gen 6, since Gen 6 doesn't use a GS program. Also, Gen 6 doesn't use
reduced primitives.

Also, document that intel_context.reduced_primitive is only used for Gen < 6

Reviewed-by: Eric Anholt <eric@anho.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agor600g: drop force int type workaround
Dave Airlie [Mon, 10 Oct 2011 19:35:34 +0000 (20:35 +0100)]
r600g: drop force int type workaround

now that we have integer texture types I can drop this workaround so that
copies of values is done properly (as floats would fail on some corner cases).

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add integer texture/render integer formats for r600/700.
Dave Airlie [Mon, 10 Oct 2011 19:27:51 +0000 (20:27 +0100)]
r600g: add integer texture/render integer formats for r600/700.

with these I can drop the force int type hack.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: Prevent repeated glDeleteProgram() from blowing away our refcounts.
Eric Anholt [Tue, 4 Oct 2011 22:36:15 +0000 (15:36 -0700)]
mesa: Prevent repeated glDeleteProgram() from blowing away our refcounts.

glDeleteProgram should only be able to remove the one refcount for the
user's reference to the program from the hash table (even though that
ref does live on in the hash table until the last other ref is
removed).

Fixes piglit ARB_shader_objects/delete-repeat.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Fix timer query on gen6+
Zou Nan hai [Wed, 20 Jul 2011 16:12:59 +0000 (00:12 +0800)]
i965: Fix timer query on gen6+

PIPE_CONTROL reported time stamp are 64 bits value incrementing every
80 ns, and only the low 32 bits are active (high 32 are always 0).

v2: Cleaned up whitespace, function arguments (anholt).

Fixes piglit EXT_timer_query/time-elapsed

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
13 years agolinker: Fix a slightly incorrect comment
Ian Romanick [Thu, 6 Oct 2011 17:25:34 +0000 (10:25 -0700)]
linker: Fix a slightly incorrect comment

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agohash_table: Make string_to_uint_map make a copy of the name
Ian Romanick [Fri, 7 Oct 2011 21:29:51 +0000 (14:29 -0700)]
hash_table: Make string_to_uint_map make a copy of the name

The hash table needs a copy of the key that it can keep for
comparisons during searches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41499
Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
Tested-by: Luzipher <luziphermcleod@yahoo.ie>
Tested-by: Michał Lipski <tallica@o2.pl>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agou_blitter: clean up velem setup
Dave Airlie [Mon, 10 Oct 2011 16:20:30 +0000 (17:20 +0100)]
u_blitter: clean up velem setup

as per Brian's suggestion, drop the pointless loops.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi915g: Update the TODO with another idea.
Stéphane Marchesin [Mon, 10 Oct 2011 07:12:40 +0000 (00:12 -0700)]
i915g: Update the TODO with another idea.

13 years agoi915g: Enable instanced drawing.
Stéphane Marchesin [Mon, 10 Oct 2011 00:14:16 +0000 (17:14 -0700)]
i915g: Enable instanced drawing.

13 years agomesa/st: Check for a NULL _LinkedShader[i] before using it.
Stéphane Marchesin [Sun, 9 Oct 2011 23:49:19 +0000 (16:49 -0700)]
mesa/st: Check for a NULL _LinkedShader[i] before using it.

The rest of the linker/glsl translation code checks for NULL, so I suppose we should check here too. Fixes crash on exit with i915g instanced drawing.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agou_blitter: query vertex shader caps instead of geometry for int vertices
Marek Olšák [Sun, 9 Oct 2011 16:19:58 +0000 (18:19 +0200)]
u_blitter: query vertex shader caps instead of geometry for int vertices

13 years agor600g: uarl fixes.
Dave Airlie [Sun, 25 Sep 2011 14:41:59 +0000 (15:41 +0100)]
r600g: uarl fixes.

Not 100% sure these are correct yet

13 years agor600g: enable integer shader cap for evergreen.
Dave Airlie [Sun, 9 Oct 2011 15:47:03 +0000 (16:47 +0100)]
r600g: enable integer shader cap for evergreen.

Will get to adding r600/r700/cayman support, have it mostly written on
another PC.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agou_blitter: don't create integer vertex elements unless shader supports them
Dave Airlie [Sun, 9 Oct 2011 15:35:28 +0000 (16:35 +0100)]
u_blitter: don't create integer vertex elements unless shader supports them

Should fix https://bugs.freedesktop.org/show_bug.cgi?id=41613

We don't want to create these vertex elements unless the pipe driver
vertex stage can handle integers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agost/glx/xlib: Advertise GLX_ARB_create_context(_profile)
José Fonseca [Sun, 9 Oct 2011 12:20:00 +0000 (13:20 +0100)]
st/glx/xlib: Advertise GLX_ARB_create_context(_profile)

They were already implemented, but not advertised.

13 years agonouveau: hide some debugging messages behind environment variable
Marcin Slusarz [Sat, 8 Oct 2011 21:58:32 +0000 (23:58 +0200)]
nouveau: hide some debugging messages behind environment variable

They spam console, but are not very useful - hide them behind
NOUVEAU_MESA_DEBUG environment variable.

13 years agonv50,nvc0: avoid unnecessary flushes
Marcin Slusarz [Sat, 8 Oct 2011 22:10:47 +0000 (00:10 +0200)]
nv50,nvc0: avoid unnecessary flushes

Relocations don't consume pushbuffer space, so there is no need to
ensure there is any space in pushbuffer.

13 years agonouveau: fix fence hang
Marcin Slusarz [Sat, 8 Oct 2011 21:05:25 +0000 (23:05 +0200)]
nouveau: fix fence hang

If there is not enough space in pushbuffer for fence emission
(nouveau_fence_emit -> nv50_screen_fence_emit -> MARK_RING),
the pushbuffer is flushed, which through flush_notify ->
nv50_default_flush_notify -> nouveau_fence_update marks currently
emitting fence as flushed. But actual emission is done after this mark.
So later when there is a need to wait on this fence and pushbuffer
was not flushed in between, fence wait will never finish causing
application to hang.

To fix this, introduce new fence state between AVAILABLE and EMITTED,
set it before emission and handle it everywhere.

Additionally obtain fence sequence numbers after possible flush in
MARK_RING, because we want to emit fences in correct order.

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Note: This is a candidate for the 7.11 branch.

13 years agor600g/eg: add integer types support
Dave Airlie [Mon, 26 Sep 2011 18:06:40 +0000 (19:06 +0100)]
r600g/eg: add integer types support

adds handling for int texture/vertices to evergreen.

TODO r600/700 support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agou_blitter: add integer clear support
Dave Airlie [Mon, 26 Sep 2011 18:05:18 +0000 (19:05 +0100)]
u_blitter: add integer clear support

We need add a new set of fragment shader variants, along with new vertex
elements for signed and unsigned clears.

The new fragment shader variants are due to the integers values requiring
CONSTANT interpolation. The new vertex element descriptions are for passing
the clear color as an unsigned or signed integer value.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi915g: Remove another TODO item which was done a while ago.
Stéphane Marchesin [Sun, 9 Oct 2011 06:58:46 +0000 (23:58 -0700)]
i915g: Remove another TODO item which was done a while ago.

13 years agoi915g: Remove a TODO item.
Stéphane Marchesin [Sun, 9 Oct 2011 06:58:06 +0000 (23:58 -0700)]
i915g: Remove a TODO item.

13 years agoi915g: Fix comment.
Stéphane Marchesin [Sun, 9 Oct 2011 06:57:27 +0000 (23:57 -0700)]
i915g: Fix comment.

13 years agoi915g: Implement vertex textures.
Stéphane Marchesin [Sun, 9 Oct 2011 06:54:53 +0000 (23:54 -0700)]
i915g: Implement vertex textures.

13 years agoi915g: Silence warning.
Stéphane Marchesin [Sun, 9 Oct 2011 03:19:53 +0000 (20:19 -0700)]
i915g: Silence warning.

13 years agoi915g: Remove old heuristic flusing remains.
Stéphane Marchesin [Sun, 9 Oct 2011 00:42:18 +0000 (17:42 -0700)]
i915g: Remove old heuristic flusing remains.

13 years agoi915g: Cleanup caps code a bit.
Stéphane Marchesin [Sun, 9 Oct 2011 00:12:37 +0000 (17:12 -0700)]
i915g: Cleanup caps code a bit.

13 years agopb_bufmgr_cache: flush cache when create_buffer fails and try again
Marek Olšák [Fri, 7 Oct 2011 22:27:16 +0000 (00:27 +0200)]
pb_bufmgr_cache: flush cache when create_buffer fails and try again

NOTE: This is a candidate for the stable branches.

13 years agost/mesa: add readpixel integer support
Dave Airlie [Mon, 19 Sep 2011 14:06:23 +0000 (15:06 +0100)]
st/mesa: add readpixel integer support

This adds support for readpixels integer paths, it deals with the signed/unsigned crossovers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agost/mesa: add support for int type conversion
Dave Airlie [Mon, 19 Sep 2011 15:01:00 +0000 (16:01 +0100)]
st/mesa: add support for int type conversion

This adds the various mesa->gallium and gallium->mesa format conversions
along with the GL->gallium texture choosers for integers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agogallium: add initial pure integer support (v2)
Dave Airlie [Mon, 19 Sep 2011 14:04:48 +0000 (15:04 +0100)]
gallium: add initial pure integer support (v2)

This add support for unsigned/signed integer types via adding a 'pure' bit
in the format description table. It adds 4 new u_format get/put hooks,
for get/put uint and get/put sint so that accessors can get native access
to the integer bits. This is used to avoid precision loss via float converting
paths.

It doesn't add any float fetchers for these types at the moment, GL doesn't
require float fetching from these types and I expect we'll introduce a lot
of hidden bugs if we start allowing such conversions without an API mandating
it.

It adds all formats from EXT_texture_integer and EXT_texture_rg.

0 regressions on llvmpipe here with this.

(there is some more follow on code in my gallium-int-work branch, bringing
 softpipe and mesa to a pretty integer clean state)

v2: fixup python generator to get signed->unsigned and unsigned->signed
fetches working.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa/texformat: add integer fallbacks to other formats
Dave Airlie [Wed, 5 Oct 2011 18:21:32 +0000 (19:21 +0100)]
mesa/texformat: add integer fallbacks to other formats

This fixes up the integer format choosing to pick the closest mesa format
then the most likely fallback.

(the formatting in this file needs cleaning in another patch).

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: add packing for int/uint
Dave Airlie [Mon, 19 Sep 2011 14:06:13 +0000 (15:06 +0100)]
mesa: add packing for int/uint

This just adds a simple packing for GL_UNSIGNED_INT/GL_INT destination formats.
This is enough for at least the gallium drivers to pack both unsigned and signed types for read pixels.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agou_format: add inline helper to find first non void channel
Dave Airlie [Sat, 8 Oct 2011 16:41:33 +0000 (17:41 +0100)]
u_format: add inline helper to find first non void channel

This is used in a few places in drivers as well, also the integer support
can use it as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi965: Fix inconsistent indentation in brw_eu_emit.c.
Kenneth Graunke [Fri, 7 Oct 2011 18:59:06 +0000 (11:59 -0700)]
i965: Fix inconsistent indentation in brw_eu_emit.c.

Most of these functions used three spaces for the first level of
indentation, but four spaces for the next level.  One used tabs and then
three spaces.  Some used 3/4 in a then block but 3/3 in the else block.

Normally I try to avoid field days like this, but since the functions
were so inconsistent, even internally, it was making it difficult to
edit without introducing spurious whitespace changes.

So, just get it over with.  git diff -b shows 0 lines changed.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agor300g: remove unused r300_resource::tex_offset
Marek Olšák [Fri, 7 Oct 2011 23:06:36 +0000 (01:06 +0200)]
r300g: remove unused r300_resource::tex_offset

13 years agoglsl: Remove unused method ir_variable::component_slots
Ian Romanick [Tue, 6 Sep 2011 23:11:14 +0000 (16:11 -0700)]
glsl: Remove unused method ir_variable::component_slots

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Silence several 'warning: unused parameter' in _mesa_GetnUniformdvARB
Ian Romanick [Wed, 7 Sep 2011 19:39:47 +0000 (12:39 -0700)]
mesa: Silence several 'warning: unused parameter' in _mesa_GetnUniformdvARB

This function isn't implemented yet, so none of its parameters are
used yet.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove unused function _mesa_append_uniform
Ian Romanick [Sat, 27 Aug 2011 05:58:51 +0000 (22:58 -0700)]
mesa: Remove unused function _mesa_append_uniform

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Simplify calling Driver.ProgramStringNotify after previous refactors
Ian Romanick [Sat, 20 Aug 2011 23:07:10 +0000 (16:07 -0700)]
mesa: Simplify calling Driver.ProgramStringNotify after previous refactors

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
13 years agomesa: Simplify destroy_shader_program_variants_cb after previous refactors
Ian Romanick [Sat, 20 Aug 2011 23:06:34 +0000 (16:06 -0700)]
mesa: Simplify destroy_shader_program_variants_cb after previous refactors

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Simplify validate_shader_program after previous refactors
Ian Romanick [Sat, 20 Aug 2011 23:05:43 +0000 (16:05 -0700)]
mesa: Simplify validate_shader_program after previous refactors

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgram
Ian Romanick [Sat, 20 Aug 2011 22:00:36 +0000 (15:00 -0700)]
mesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Use gl_shader_program::_LinkedShaders instead of GeometryProgram
Ian Romanick [Sat, 20 Aug 2011 21:26:12 +0000 (14:26 -0700)]
mesa: Use gl_shader_program::_LinkedShaders instead of GeometryProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram
Ian Romanick [Sat, 20 Aug 2011 20:51:36 +0000 (13:51 -0700)]
mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Close Doxygen group
Chad Versace [Fri, 7 Oct 2011 20:16:01 +0000 (13:16 -0700)]
mesa: Close Doxygen group

In dd_function_table, close the Doxygen group beginning with
   \name Support for multiple T&L engines

13 years agou_blitter: bind a NULL geometry shader
Marek Olšák [Fri, 7 Oct 2011 17:28:19 +0000 (19:28 +0200)]
u_blitter: bind a NULL geometry shader

13 years agou_blitter: cleanup checking for and restoring saved states
Marek Olšák [Fri, 7 Oct 2011 17:10:41 +0000 (19:10 +0200)]
u_blitter: cleanup checking for and restoring saved states

13 years agor300g: disable stream output on SWTCL chipsets
Marek Olšák [Thu, 6 Oct 2011 16:29:02 +0000 (18:29 +0200)]
r300g: disable stream output on SWTCL chipsets

Unimplemented and not so useful for this driver.

13 years agoi915g: Add two new unsupported PIPE_CAPs.
Stéphane Marchesin [Fri, 7 Oct 2011 22:14:39 +0000 (15:14 -0700)]
i915g: Add two new unsupported PIPE_CAPs.

13 years agoi915,i830: Remove dead HiZ assertions in *update_draw_buffer()
Chad Versace [Fri, 7 Oct 2011 17:26:12 +0000 (10:26 -0700)]
i915,i830: Remove dead HiZ assertions in *update_draw_buffer()

i915 and i830 hardware doesn't have HiZ, so remove all HiZ related
assertions from *update_draw_buffer().

I've removed the dead format checks completely rather than replace them
with more appropriate checks. This doesn't reduce "assertion coverage",
however, because when I added these HiZ related assertions in c8fdf66
there were no pre-existing checks there.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agotnl: fix result vector allocation regression
Brian Paul [Fri, 7 Oct 2011 16:55:43 +0000 (10:55 -0600)]
tnl: fix result vector allocation regression

We need to allocate all the output vectors.
Fixes a regression from commit f7f678331d5e95d2266fe6b3ea1cfa47d6421065
Fixes fd.o bugs 41441 and 41492.

13 years agoi965: make swizzle_for_size() return unsigned
Brian Paul [Fri, 7 Oct 2011 16:38:30 +0000 (10:38 -0600)]
i965: make swizzle_for_size() return unsigned

Silences a warning about comparing to an unsigned variable.  It looks like
the result of swizzle_for_size() is always assigned to unsigned vars.

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agoi965: make size_swizzles[] static const
Brian Paul [Fri, 7 Oct 2011 16:38:30 +0000 (10:38 -0600)]
i965: make size_swizzles[] static const

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agoi965: silence unused var warnings in non-debug builds
Brian Paul [Fri, 7 Oct 2011 16:38:30 +0000 (10:38 -0600)]
i965: silence unused var warnings in non-debug builds

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agointel: silence uninitialized var warning
Brian Paul [Fri, 7 Oct 2011 16:38:30 +0000 (10:38 -0600)]
intel: silence uninitialized var warning

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agomesa: fix software mipmap generation code for packed Z/stencil formats
Brian Paul [Thu, 6 Oct 2011 22:52:36 +0000 (16:52 -0600)]
mesa: fix software mipmap generation code for packed Z/stencil formats

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

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agor300: fix incompatible pointer type warnings
Brian Paul [Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)]
r300: fix incompatible pointer type warnings

13 years agomesa: update gl_texture_image comments
Brian Paul [Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)]
mesa: update gl_texture_image comments

13 years agoswrast: s/FetchTexelf/FetchTexel/
Brian Paul [Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)]
swrast: s/FetchTexelf/FetchTexel/

13 years agoswrast: silence unused var warnings in non-debug builds
Brian Paul [Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)]
swrast: silence unused var warnings in non-debug builds

13 years agoswrast: remove unused swrast_texture_image::FetchTexelc method
Brian Paul [Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)]
swrast: remove unused swrast_texture_image::FetchTexelc method

We only use the float-valued function now.

13 years agomesa: fix image unpacking when storing compressed textures
Brian Paul [Fri, 7 Oct 2011 14:14:46 +0000 (08:14 -0600)]
mesa: fix image unpacking when storing compressed textures

This fixes failures found with the new piglit texsubimage test.

Two things were broken:
1. The dxt code doesn't handle sources images where width != row stride.
   Check for that and take the _mesa_make_temp_ubyte_image() path to get
   an image where width = rowstride.
2. If we don't take the _mesa_make_temp_ubyte_image() path we need to
   take the source image unpacking parameters into account in order to
   get the proper starting memory address of the source texels.

Note: This is a candidate for the 7.11 branch.

13 years agoi915g: handle seperate stencil clear
Daniel Vetter [Sun, 25 Sep 2011 16:49:02 +0000 (18:49 +0200)]
i915g: handle seperate stencil clear

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: actually try to clear 16bit depth bufs
Daniel Vetter [Sun, 25 Sep 2011 16:35:12 +0000 (18:35 +0200)]
i915g: actually try to clear 16bit depth bufs

... with the right value.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: hw can't fastclear both depth and color when bbp doesn't match
Daniel Vetter [Sun, 25 Sep 2011 16:14:16 +0000 (18:14 +0200)]
i915g: hw can't fastclear both depth and color when bbp doesn't match

Do it in two passes in that case.

v2: Don't forget to handle stencil clears.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: disable scissor in fast clear
Daniel Vetter [Sun, 25 Sep 2011 16:02:34 +0000 (18:02 +0200)]
i915g: disable scissor in fast clear

Docs say this is obeyed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: add some obscure sampler formats
Daniel Vetter [Sun, 25 Sep 2011 13:54:30 +0000 (15:54 +0200)]
i915g: add some obscure sampler formats

4bit palette ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: fixup clear params emission
Daniel Vetter [Sun, 25 Sep 2011 13:53:55 +0000 (15:53 +0200)]
i915g: fixup clear params emission

Docs say that default shader input color input need to be spec
as ARGB8888. And a clear rect prim essentially uses this value
instead of default diffuse. Depth on the other hands is an ieee
32 bit float. Clear stencil is U8.

Completely different are the clear values for zone init prims.
These are speced in the actual output pixel layout (and need
to be repeated for 16 bit formats).

Clear up the confusion by adding some comments.

v2: Retain the target swizzling support added by Stephan Marchesin.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: make fixup swizzle into a real hw state
Daniel Vetter [Mon, 26 Sep 2011 07:47:38 +0000 (09:47 +0200)]
i915g: make fixup swizzle into a real hw state

This way it can be reused in the fastclear path.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoglsl: Remove version check when looking for identifiers containing "__".
Jason Wood [Fri, 7 Oct 2011 05:37:48 +0000 (22:37 -0700)]
glsl: Remove version check when looking for identifiers containing "__".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi915g: Announce GL 2.0.
Stéphane Marchesin [Fri, 7 Oct 2011 03:36:47 +0000 (20:36 -0700)]
i915g: Announce GL 2.0.

We leave the debug code in place to troubleshoot issues while we complete the transition. That code might be removed after that.

13 years agoi965 Gen6+: De-compact clip planes.
Paul Berry [Tue, 27 Sep 2011 19:57:08 +0000 (12:57 -0700)]
i965 Gen6+: De-compact clip planes.

Previously, if the user enabled a non-consecutive set of clip planes
(e.g. 0, 1, and 3), the driver would compact them down to a
consecutive set starting at 0.  This optimization was of dubious
value, and complicated the implementation of gl_ClipDistance.

This patch changes the driver so that with Gen6 and later chipsets, we
no longer compact the clip planes.  However, we still discard any clip
planes beyond the highest number that is in use, so performance should
not be affected for applications that use clip planes consecutively
from 0.

With chipsets previous to Gen6, we still compact the clip planes,
since the pre-Gen6 clipper thread relies on this behavior.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965 VS: Change nr_userclip to nr_userclip_planes.
Paul Berry [Thu, 29 Sep 2011 22:36:41 +0000 (15:36 -0700)]
i965 VS: Change nr_userclip to nr_userclip_planes.

The only remaining uses of brw_vs_prog_key::nr_userclip only occurred
when using clip planes (as opposed to gl_ClipDistance).  This patch
renames the value to nr_userclip_planes and sets it to zero when
gl_ClipDistance is in use.  This avoids unnecessary VS recompiles.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>