mesa.git
13 years agou_vbuf_mgr: fix uploading if format size is greater than stride
Marek Olšák [Sun, 19 Jun 2011 17:38:48 +0000 (19:38 +0200)]
u_vbuf_mgr: fix uploading if format size is greater than stride

13 years agoi965: Enable extension GL_ARB_shader_texture_lod.
Kenneth Graunke [Fri, 10 Jun 2011 22:17:37 +0000 (15:17 -0700)]
i965: Enable extension GL_ARB_shader_texture_lod.

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

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for TXD with shadow comparisons.
Kenneth Graunke [Fri, 10 Jun 2011 21:48:46 +0000 (14:48 -0700)]
i965/fs: Add support for TXD with shadow comparisons.

Our hardware doesn't have a sample_d_c message, so we have to do a
regular sample_d and emit instructions to manually perform the
comparison.

This requires a state dependent recompile whenever the sampler's compare
mode or function change.  This adds the per-sampler comparison functions
to brw_wm_prog_key, but only sets them when the sampler's compare mode
is GL_COMPARE_R_TO_TEXTURE (i.e. only for shadow sampling).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Refactor texture result swizzling into a helper function.
Kenneth Graunke [Fri, 10 Jun 2011 21:45:24 +0000 (14:45 -0700)]
i965/fs: Refactor texture result swizzling into a helper function.

The next patch will add a few additional uses.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Move sampler fetch to the top of the ir_texture visit function.
Kenneth Graunke [Fri, 10 Jun 2011 21:49:36 +0000 (14:49 -0700)]
i965/fs: Move sampler fetch to the top of the ir_texture visit function.

This makes it available earlier, which will soon be necessary.
(Separating code motion from actual changes.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on gen4.
Kenneth Graunke [Wed, 8 Jun 2011 23:05:34 +0000 (16:05 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on gen4.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on gen5/6.
Kenneth Graunke [Wed, 8 Jun 2011 23:06:49 +0000 (16:06 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on gen5/6.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on Ivybridge.
Kenneth Graunke [Wed, 8 Jun 2011 23:08:07 +0000 (16:08 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on Ivybridge.

This is somewhat ugly, but I couldn't think of a nicer way to handle the
interleaved coordinate/derivative parameter loading.

Ironlake and Sandybridge will still hit an assertion in visit().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Check for compilation failure and bail before optimizing.
Kenneth Graunke [Fri, 10 Jun 2011 23:00:03 +0000 (16:00 -0700)]
i965/fs: Check for compilation failure and bail before optimizing.

Prior to this patch, it would attempt to optimize and allocate registers
for the program even if it failed to compile.  This seems wasteful.

More importantly, the "message length > 11" failure seems to choke the
instruction scheduler, making it somehow use an undefined value and
segmentation fault.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Use state streaming on programs, and state base address on gen5+.
Eric Anholt [Wed, 27 Apr 2011 20:33:10 +0000 (13:33 -0700)]
i965: Use state streaming on programs, and state base address on gen5+.

There will be a little bit of thrashing of the program cache BO as the
cache warms up, but once the application is in steady state, this
reduces relocations on gen5 and later.

On my T420 laptop, cairogl firefox-talos-gfx performance improves 2.6%
+/- 1.3% (n=6).  No statistically significant performance difference
on nexuiz (n=5).

13 years agoi965: Only flag the new-batch related state as dirty at new batch time.
Eric Anholt [Tue, 14 Jun 2011 22:48:24 +0000 (15:48 -0700)]
i965: Only flag the new-batch related state as dirty at new batch time.

This was debug code from the initial import of the driver.  No
statistically significant performance difference on cairo-gl or
nexuiz (n=6).

13 years agomesa: Fix render-to-texture regression.
Eric Anholt [Sat, 18 Jun 2011 22:59:00 +0000 (15:59 -0700)]
mesa: Fix render-to-texture regression.

Accidentally introduced in fc8c4a3a7b92a1134cd3a9312063abba9e14b0fe.
Fixes fbo-drawbuffers-maxtargets and friends.

13 years agomesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.
Eric Anholt [Wed, 25 May 2011 23:37:09 +0000 (16:37 -0700)]
mesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.

The _ColorDrawBuffers[] wouldn't get updated despite us having updated
what it depends on (Attachments[]->Renderbuffer).  Other callers of
_mesa_remove_attachment are already flagging _NEW_BUFFERS for other
reasons.  The specific bug report that led to this fix (and
the fbo-finish-deleted testcase) was fixed by
23b6f9606dc247488835745668b3686218612536, though.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965: Don't try to continue space before the start of a VBO.
Eric Anholt [Sat, 11 Jun 2011 03:19:01 +0000 (20:19 -0700)]
i965: Don't try to continue space before the start of a VBO.

This loop is trying to see if all the buffers to be uploaded happen to
be the same increment from the start of the 3DSTATE_VERTEX_BUFFERS
currently loaded in the hardware.  However, we might be at a smaller
offset than the previous set of VERTEX_BUFFERS, so we can't reuse
because that packet made the first entry be its starting offset (you
can't access outside the given bounds).

Fixes piglit ARB_vertex_buffer_object/elements-negative-offset.

13 years agoi965: Add missing state flag for vertex elements on current VS program.
Eric Anholt [Fri, 10 Jun 2011 22:07:59 +0000 (15:07 -0700)]
i965: Add missing state flag for vertex elements on current VS program.

Fixes a missing 3DSTATE_VERTEX_ELEMENTS on topogun.trace.

13 years agor300g: rename AOS -> VARRAYS
Marek Olšák [Sat, 18 Jun 2011 16:58:57 +0000 (18:58 +0200)]
r300g: rename AOS -> VARRAYS

13 years agor300g: fix handling PREP_* options
Marek Olšák [Fri, 17 Jun 2011 17:21:59 +0000 (19:21 +0200)]
r300g: fix handling PREP_* options

This should fix rendering >65532 vertices using draw_arrays on r300-r400.

NOTE: This is a candidate for the 7.10 branch.

13 years agor600g: fix LIT to handle src==dst properly
Vadim Girlin [Fri, 17 Jun 2011 19:02:01 +0000 (23:02 +0400)]
r600g: fix LIT to handle src==dst properly

Current LIT implementation uses dst components for storing temp
results, possibly overwriting still needed values (depends on the
swizzles).
This patch uses temp reg for one of such cases (found in etqw) and
fixes "LIT R.z, R.xyzz".

Tested on evergreen. Fixes some etqw-demo rendering glitches when
"Lighting" is set to "High" in the settings.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix RSQ to use abs value of operand on evergreen
Vadim Girlin [Fri, 17 Jun 2011 19:02:00 +0000 (23:02 +0400)]
r600g: fix RSQ to use abs value of operand on evergreen

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

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix source box in r600_resource_copy_region
Vadim Girlin [Fri, 17 Jun 2011 19:01:59 +0000 (23:01 +0400)]
r600g: fix source box in r600_resource_copy_region

Source box needs to be adjusted for blitting from compressed formats.

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

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: allow depth texture arrays
Brian Paul [Fri, 17 Jun 2011 19:43:06 +0000 (13:43 -0600)]
mesa: allow depth texture arrays

The GL_EXT_texture_array spec allows this (Section 3.8.1).
Fixes failing piglit fbo-depth-array test.

NOTE: This is a candidate for the 7.10 branch.

13 years agost/mesa: remove unneeded test for GL_TRUE
Brian Paul [Fri, 17 Jun 2011 19:28:38 +0000 (13:28 -0600)]
st/mesa: remove unneeded test for GL_TRUE

13 years agost/mesa: remove redundant _mesa_is_depth_format() call
Brian Paul [Fri, 17 Jun 2011 19:25:31 +0000 (13:25 -0600)]
st/mesa: remove redundant _mesa_is_depth_format() call

The _mesa_is_depth_or_stencil_format() call covers all depth
format cases too.

13 years agost/mesa: remove trailing whitespace in st_format.c
Brian Paul [Fri, 17 Jun 2011 19:23:16 +0000 (13:23 -0600)]
st/mesa: remove trailing whitespace in st_format.c

13 years agost/mesa: move comment for ChooseTextureFormat() to right place
Brian Paul [Fri, 17 Jun 2011 19:22:43 +0000 (13:22 -0600)]
st/mesa: move comment for ChooseTextureFormat() to right place

13 years agoapple: Use apple_cgl_get_dl_handle() rather than opening a new handle
Jeremy Huddleston [Wed, 15 Jun 2011 07:22:00 +0000 (00:22 -0700)]
apple: Use apple_cgl_get_dl_handle() rather than opening a new handle

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoscons: List all targets.
José Fonseca [Fri, 17 Jun 2011 19:11:50 +0000 (20:11 +0100)]
scons: List all targets.

13 years agoscons: Remember the options set on the command line.
José Fonseca [Fri, 17 Jun 2011 19:11:35 +0000 (20:11 +0100)]
scons: Remember the options set on the command line.

Save them in config.py

13 years agoscons: Don't list MSVS_VERSION option outside windows platforms.
José Fonseca [Fri, 17 Jun 2011 19:07:12 +0000 (20:07 +0100)]
scons: Don't list MSVS_VERSION option outside windows platforms.

13 years agoscons: Correct glapi USE_xxx_ASM flags.
José Fonseca [Fri, 17 Jun 2011 18:23:06 +0000 (19:23 +0100)]
scons: Correct glapi USE_xxx_ASM flags.

13 years agoscons: Accept verbose=yes instead of quiet=no.
José Fonseca [Fri, 17 Jun 2011 17:42:39 +0000 (18:42 +0100)]
scons: Accept verbose=yes instead of quiet=no.

'verbose' is affirmative, and much more common name for this sort of option.

13 years agoglx: implement drawable refcounting.
Stéphane Marchesin [Wed, 15 Jun 2011 22:09:12 +0000 (15:09 -0700)]
glx: implement drawable refcounting.

The current dri context unbind logic will leak drawables until the process
dies (they will then get released by the GEM code). There are two ways to fix
this: either always call driReleaseDrawables every time we unbind a context
(but that costs us round trips to the X server at getbuffers() time) or
implement proper drawable refcounting. This patch implements the latter.

Signed-off-by: Antoine Labour <piman@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
13 years agoscons: Move all env setup to scons/gallium.py
José Fonseca [Fri, 17 Jun 2011 15:28:27 +0000 (16:28 +0100)]
scons: Move all env setup to scons/gallium.py

13 years agoscons: make embedding orthogonal to the platform
José Fonseca [Fri, 17 Jun 2011 13:48:28 +0000 (14:48 +0100)]
scons: make embedding orthogonal to the platform

To enable embedding in platforms other than linux.

13 years agomesa: use helper functions to distinguish between user/winsys FBOs
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: use helper functions to distinguish between user/winsys FBOs

And replace IS_CUBE_FACE() macro w/ inline function.

13 years agomesa: refactor, create _mesa_update_draw_buffers() helper
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: refactor, create _mesa_update_draw_buffers() helper

Move this code out of _mesa_make_current() and put it into a
helper function.

13 years agomesa: updated comments in _make_current()
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: updated comments in _make_current()

13 years agor600: fix SPI inputs setup on r600/r700
Vadim Girlin [Tue, 14 Jun 2011 17:11:04 +0000 (21:11 +0400)]
r600: fix SPI inputs setup on r600/r700

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agointel: Fix typo in intel_offset_S8 comments
Chad Versace [Tue, 14 Jun 2011 19:56:49 +0000 (12:56 -0700)]
intel: Fix typo in intel_offset_S8 comments

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agoi965/gen5,6: Fix hang when emitting hiz buffer without stencil buffer
Chad Versace [Thu, 9 Jun 2011 04:51:10 +0000 (21:51 -0700)]
i965/gen5,6: Fix hang when emitting hiz buffer without stencil buffer

When emitting either a hiz or stencil buffer, the 'separate stencil
enable' and 'hiz enable' bits are set in 3DSTATE_DEPTH_BUFFER. Therefore
we must emit both 3DSTATE_HIER_DEPTH_BUFFER and 3DSTATE_STENCIL_BUFFER.

Even if there is no stencil buffer, 3DSTATE_STENCIL_BUFFER must be
emitted; failure to do so causes a hang on gen5 and a stall on gen6.

This also fixes a silly, obvious segfault that occured when a hiz buffer
xor separate stencil buffer existed.

Fixes the piglit tests below on Gen5 when hiz and separate stencil are
manually enabled:
    fbo-alphatest-nocolor
    fbo-depth-sample-compare
    fbo
    hiz-depth-read-fbo-d24-s0
    hiz-depth-stencil-test-fbo-d24-s0
    hiz-depth-test-fbo-d24-s0
    hiz-stencil-read-fbo-d0-s8
    hiz-stencil-test-fbo-d0-s8
    fbo-missing-attachment-clear
    fbo-clear-formats
    fbo-depth-*

Changes piglit test result from crash to fail:
    hiz-depth-stencil-test-fbo-d0-s8

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agor600g: disable render condition for some blitter operations
Marek Olšák [Wed, 15 Jun 2011 12:26:41 +0000 (14:26 +0200)]
r600g: disable render condition for some blitter operations

13 years agor600g: fix TXD src regs needing fetching.
Mike Kaplinskiy [Wed, 15 Jun 2011 06:56:10 +0000 (16:56 +1000)]
r600g: fix TXD src regs needing fetching.

[airlied: final chunk of Mike's patch from bug 37476
this uses a loop to emit the GRADIENTS and does a check to
see if we need to fetch to a temporary register. It also
increases the context src gpr to 4 which is needed here.]

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: use inlines for some common tex instr setup code.
Mike Kaplinskiy [Wed, 15 Jun 2011 06:26:17 +0000 (16:26 +1000)]
r600g: use inlines for some common tex instr setup code.

[airlied: taken from Mike's patch in bug 37476]

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoglsl/builtins: Actually implement int/ivec variants of abs().
Kenneth Graunke [Wed, 15 Jun 2011 04:36:43 +0000 (21:36 -0700)]
glsl/builtins: Actually implement int/ivec variants of abs().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for stable release branches (and don't forget
      to re-run "make builtins" after cherry-picking.)

13 years agor600g: fix TXD when shadowing is enabled.
Mike Kaplinskiy [Wed, 15 Jun 2011 05:54:21 +0000 (15:54 +1000)]
r600g: fix TXD when shadowing is enabled.

Mike had actually done a lot of the TXD support in a patch in bug
37476 which I see now, I'll add the bits of his work that I didn't think
to add to my work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add TXD support.
Dave Airlie [Wed, 15 Jun 2011 05:15:41 +0000 (15:15 +1000)]
r600g: add TXD support.

This at least passes the piglit arb_shader_texture_lod-texgrad test,
the AMD shader analyzer seems to multiply the V component by an unspecified
constant value no idea why.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi915g: add const qualifier to silence warning
Brian Paul [Wed, 15 Jun 2011 02:47:47 +0000 (20:47 -0600)]
i915g: add const qualifier to silence warning

13 years agor600g: also set TILE_MODE of the base level
Marek Olšák [Wed, 15 Jun 2011 02:16:05 +0000 (04:16 +0200)]
r600g: also set TILE_MODE of the base level

13 years agor600g: force OpenGL's BASE_LEVEL behavior on r600-r700
Marek Olšák [Wed, 15 Jun 2011 00:24:03 +0000 (02:24 +0200)]
r600g: force OpenGL's BASE_LEVEL behavior on r600-r700

This sets the base level as the zero level, which fixes
piglit/texturing/tex-miplevel-selection*.

The r600 hardware ignores the BASE_LEVEL field in some cases, so we can't
use it.

Evergreen might need this too.

13 years agoglsl/generate_builtins.py: Remove regexp to kill pointer addresses.
Kenneth Graunke [Tue, 14 Jun 2011 00:43:32 +0000 (17:43 -0700)]
glsl/generate_builtins.py: Remove regexp to kill pointer addresses.

Commit 56ef62d9885f805bbfb2243dc860ff425d5b4d3b
"glsl: Generate readable unique names at print time."
changed ir_print_visitor to not generate @0x1234567 suffixes except
where necessary.  So there's no need to manually remove them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather than...
Jeremy Huddleston [Tue, 14 Jun 2011 19:34:49 +0000 (12:34 -0700)]
glapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather than NULL

This change to _glapi_create_table_from_handle causes it to fill the dispatch
table with NoOps for unimplemented functionality.  This matches what is done
in indirect_init.c and also allows us to enable logging (when built with
-DDEBUG and the MESA_DEBUG or LIBGL_DEBUG environment variables are set) to
catch cases where clients are trying to use these unimplemented extentions.

Additionally, this fixes some gcc -pedantic warnings.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agost/mesa: fix indentation, whitespace
Brian Paul [Tue, 14 Jun 2011 15:24:50 +0000 (09:24 -0600)]
st/mesa: fix indentation, whitespace

13 years agost/mesa: replace st->ctx with ctx
Brian Paul [Tue, 14 Jun 2011 15:15:36 +0000 (09:15 -0600)]
st/mesa: replace st->ctx with ctx

13 years agost/mesa: fix comments, whitespace
Brian Paul [Tue, 14 Jun 2011 14:40:43 +0000 (08:40 -0600)]
st/mesa: fix comments, whitespace

13 years agodocs: 7.10.3 updates
Brian Paul [Tue, 14 Jun 2011 00:32:39 +0000 (18:32 -0600)]
docs: 7.10.3 updates

13 years agost/mesa: improved is_interleaved_arrays() checking
Brian Paul [Mon, 13 Jun 2011 23:34:20 +0000 (17:34 -0600)]
st/mesa: improved is_interleaved_arrays() checking

Check that the difference in array pointers/offsets from the 0th
array are less than the stride, for both VBOs and user-space arrays.
Previously, we were only doing this for the later.

This tightens up the interleaved array test and fixes a problem with
the llvmpipe driver where we were creating way too many vertex fetch
variants only because the pipe_vertex_element::src_offset values were
changing frequently.  This change results in a 5x speed-up for one of
the viewperf tests.

Also, clean up the function to make it easier to understand.

13 years agor600c: add tiling support for evergreen+
Alex Deucher [Tue, 14 Jun 2011 22:39:59 +0000 (18:39 -0400)]
r600c: add tiling support for evergreen+

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: fix RGB32F texturing
Marek Olšák [Tue, 14 Jun 2011 18:47:57 +0000 (20:47 +0200)]
r600g: fix RGB32F texturing

13 years agor600g: fix indentation and comments
Marek Olšák [Tue, 14 Jun 2011 18:25:00 +0000 (20:25 +0200)]
r600g: fix indentation and comments

13 years agomesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.
Eric Anholt [Fri, 10 Jun 2011 19:58:56 +0000 (12:58 -0700)]
mesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.

The code was playing fast and loose with rowstrides, which meant that
if a driver chose anything different for its alignment requirements,
the generated mipmaps came out garbage.  Unlike the uncompressed case,
we can't generate mipmaps directly into image->Data, so by using
TexImage2D we cut out most of the weird logic that existed to generate
in-place into ->Data.  The up/downside is that the driver recovery
code for the fact that _mesa_generate_mipmaps whacked ->Data has to be
turned off for compressed now.

Fixes 6 piglit tests about compressed mipmap gen.

13 years agomesa: Remove uncompressed code from generate_mipmaps_compressed().
Eric Anholt [Fri, 10 Jun 2011 19:10:33 +0000 (12:10 -0700)]
mesa: Remove uncompressed code from generate_mipmaps_compressed().

13 years agomesa: Remove compressed code from generate_mipmaps_uncompressed().
Eric Anholt [Fri, 10 Jun 2011 19:04:19 +0000 (12:04 -0700)]
mesa: Remove compressed code from generate_mipmaps_uncompressed().

13 years agomesa: Split _mesa_generate_mipmap along compressed/uncompressed lines.
Eric Anholt [Fri, 10 Jun 2011 19:00:23 +0000 (12:00 -0700)]
mesa: Split _mesa_generate_mipmap along compressed/uncompressed lines.

The path taken is wildly different based on this (do we generate from
a temporary image, or from level-1's data), and we appear to have
stride bugs in the compressed case that are tough to disentangle.

This just duplicates the code for the moment, the followon commit will
do the actual changes.  Only real code change here is handling
maxLevel in one common place.

13 years agointel: Fix miptree height alignment for compressed NPOT textures.
Eric Anholt [Fri, 10 Jun 2011 00:04:12 +0000 (17:04 -0700)]
intel: Fix miptree height alignment for compressed NPOT textures.

This is effectively just "round up when dividing by 4" compared to the
previous code.  Fixes the broken stripe at the top of
fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc.

13 years agointel: Drop dead preinitialization of align_w, align_h.
Eric Anholt [Fri, 10 Jun 2011 00:01:57 +0000 (17:01 -0700)]
intel: Drop dead preinitialization of align_w, align_h.

13 years agointel: Drop the cpp argument to intel_miptree_create().
Eric Anholt [Thu, 9 Jun 2011 17:23:17 +0000 (10:23 -0700)]
intel: Drop the cpp argument to intel_miptree_create().

13 years agointel: Calculate compress_byte in intel_miptree_create.
Eric Anholt [Thu, 9 Jun 2011 17:18:36 +0000 (10:18 -0700)]
intel: Calculate compress_byte in intel_miptree_create.

One less argument and thing to get wrong.

13 years agointel: Use the gl_format to get the base_format for miptree create.
Eric Anholt [Thu, 9 Jun 2011 17:07:56 +0000 (10:07 -0700)]
intel: Use the gl_format to get the base_format for miptree create.

One less argument to this insanely long function call.

13 years agointel: Drop the internal_format field of the mipmap tree.
Eric Anholt [Thu, 9 Jun 2011 17:00:44 +0000 (10:00 -0700)]
intel: Drop the internal_format field of the mipmap tree.

This has been replaced with the gl_format now.

13 years agointel: Make the intel_miptree_match_image format check more specific.
Eric Anholt [Thu, 9 Jun 2011 17:00:59 +0000 (10:00 -0700)]
intel: Make the intel_miptree_match_image format check more specific.

We don't care just about the internalFormat/cpp/compressed, but about
the specific format chosen.  We have no support for format
translations as part of texture validation, and furthermore it has
restrictions in the GL specification.  However, we should be making
consistent decisions for this check anyway.

13 years agoi915: Drop dead argument to translate_texture_format().
Eric Anholt [Thu, 9 Jun 2011 16:58:38 +0000 (09:58 -0700)]
i915: Drop dead argument to translate_texture_format().

13 years agointel: Add block alignment for RGTC textures.
Eric Anholt [Thu, 9 Jun 2011 16:28:19 +0000 (09:28 -0700)]
intel: Add block alignment for RGTC textures.

We were using the default 4x2 alignment instead of the 4x4 required
for RGTC textures.

13 years agointel: Add the MESA_FORMAT as a field of the miptree.
Eric Anholt [Thu, 9 Jun 2011 16:16:47 +0000 (09:16 -0700)]
intel: Add the MESA_FORMAT as a field of the miptree.

We only had internal_format before, which is way more irritating to
work with.

13 years agointel: Fix 2x2 and 1x1 compressed teximages from _mesa_generate_mipmap()
Eric Anholt [Wed, 8 Jun 2011 23:38:01 +0000 (16:38 -0700)]
intel: Fix 2x2 and 1x1 compressed teximages from _mesa_generate_mipmap()

Generally image uploads to a the region occur at TexImage time, but
that's not the case for fallback _mesa_generate_mipmap(), and in this
path we were forgetting to align the width when dividing height.  We
were just leaving out parts of the compressed block at 2x2 and 1x1
levels.

Fixes gen-compressed-teximage.

13 years agor600g: disable shader_texture_lod until there is driver support
Marek Olšák [Tue, 14 Jun 2011 18:03:04 +0000 (20:03 +0200)]
r600g: disable shader_texture_lod until there is driver support

13 years agollvmpipe: SSE2 fastpaths for b8g8r8x8 {un,}swizzle
Adam Jackson [Fri, 10 Jun 2011 16:56:51 +0000 (12:56 -0400)]
llvmpipe: SSE2 fastpaths for b8g8r8x8 {un,}swizzle

Copy-and-paste from the bgra cases.  The C paths attempt to avoid
copying the 'x' channel, but it's harmless, you might as well.  Good for
about 5% in glxgears (740 to 780 fps).

Signed-off-by: Adam Jackson <ajax@redhat.com>
13 years agonv50: fix copy/paste error in nv50_gmtyprog_validate
Christoph Bumiller [Tue, 14 Jun 2011 15:15:08 +0000 (17:15 +0200)]
nv50: fix copy/paste error in nv50_gmtyprog_validate

Used the vertprog instead of gmtyprog.

13 years agoapple: Set the glapi dispatch table on context bind
Jeremy Huddleston [Tue, 14 Jun 2011 07:45:12 +0000 (00:45 -0700)]
apple: Set the glapi dispatch table on context bind

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoconfigure.ac: cleanup the gallium-r300 option
Marek Olšák [Tue, 14 Jun 2011 02:03:17 +0000 (04:03 +0200)]
configure.ac: cleanup the gallium-r300 option

13 years agost/xorg: remove unused variable
Marek Olšák [Tue, 14 Jun 2011 01:48:06 +0000 (03:48 +0200)]
st/xorg: remove unused variable

13 years agor600g: do not link with softpipe
Marek Olšák [Mon, 13 Jun 2011 23:41:39 +0000 (01:41 +0200)]
r600g: do not link with softpipe

13 years agor300g: do not link with softpipe
Marek Olšák [Mon, 13 Jun 2011 23:41:11 +0000 (01:41 +0200)]
r300g: do not link with softpipe

13 years agoxorg-radeon: rename to xorg-r300
Marek Olšák [Mon, 13 Jun 2011 23:00:36 +0000 (01:00 +0200)]
xorg-radeon: rename to xorg-r300

13 years agotarget-helpers: remove copy-pasted function inline_noop_helper
Marek Olšák [Mon, 13 Jun 2011 23:23:20 +0000 (01:23 +0200)]
target-helpers: remove copy-pasted function inline_noop_helper

13 years agor600g: skip SPI setup for position and face inputs
Vadim Girlin [Mon, 13 Jun 2011 01:43:47 +0000 (05:43 +0400)]
r600g: skip SPI setup for position and face inputs

fixes fdo bug 38145

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: move depth texture flushing out of line.
Dave Airlie [Tue, 7 Jun 2011 05:41:30 +0000 (15:41 +1000)]
r600g: move depth texture flushing out of line.

this needs a piglit run.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agometa: Fix glCopyTexImage(GL_LUMINANCE) from non-GL_LUMINANCE source.
Eric Anholt [Wed, 8 Jun 2011 20:00:51 +0000 (13:00 -0700)]
meta: Fix glCopyTexImage(GL_LUMINANCE) from non-GL_LUMINANCE source.

glReadPixels() was performing RGB -> L conversion differently from the
glTexImage() style conversion appropriate for glCopyTexImage().

Fixes gles2conform copy_texture.

13 years agointel: Fix mipmap and format handling of blit glCopyPixels().
Eric Anholt [Wed, 8 Jun 2011 19:06:43 +0000 (12:06 -0700)]
intel: Fix mipmap and format handling of blit glCopyPixels().

Fixes fbo-mipmap-copypix.

13 years agointel: Do the drawable x/y offset in intel_renderbuffer_map() for spans.
Eric Anholt [Tue, 31 May 2011 22:38:17 +0000 (15:38 -0700)]
intel: Do the drawable x/y offset in intel_renderbuffer_map() for spans.

We were mapping the renderbuffer once, then walking over all the
buffers to map just the texture ones using the other texture mapping
function that handled the x/y offset to the image in the region.  But
then we would go and overwrite *those* mappings with the original
mappings for depth/stencil, which was wrong.

Instead, just walk over the attachments once and map the attachments.
Wasn't that easy?

13 years agointel: Use rb->Data and rb->RowStride to handle spans Y flipping.
Eric Anholt [Tue, 31 May 2011 22:33:36 +0000 (15:33 -0700)]
intel: Use rb->Data and rb->RowStride to handle spans Y flipping.

This is already pointing at 0 or Height - 1 and with an appropriate
pitch, so no need to recompute those values per customization of the
spans code.  Cuts 3 out of 21kb of the compiled size.

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Clean up intel_render_texture with a rename and a helper function.
Eric Anholt [Tue, 31 May 2011 22:07:56 +0000 (15:07 -0700)]
intel: Clean up intel_render_texture with a rename and a helper function.

The "newImage" isn't particularly new -- it might be the same texture
that was attached to the same attachment point before.  This function
also gets called when just rebinding back to an FBO with a texture
attachment.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Move the draw_x/draw_y to the renderbuffer where it belongs.
Eric Anholt [Tue, 31 May 2011 21:27:18 +0000 (14:27 -0700)]
intel: Move the draw_x/draw_y to the renderbuffer where it belongs.

It was originally located in the region because the tracking of
depth/color buffers was on the regions, and getting back to the irb
would have been tricky.  Now, we're keying off of the renderbuffer in
more places, which means we can move these fields where they belong.

This could fix potential rendering failure with a single texture
having multiple images attached to different renderbuffers across
shareCtx (as far as I can tell, this was the only failure we could
cause, since anything else should trigger intel_render_texture in
between, for example a BindFramebuffer).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agodri: include swrast.h, not s_texrender.h
Brian Paul [Mon, 13 Jun 2011 22:07:32 +0000 (16:07 -0600)]
dri: include swrast.h, not s_texrender.h

13 years agoglx: Remove check for gc->vtable->destroy
Jeremy Huddleston [Mon, 13 Jun 2011 19:13:44 +0000 (12:13 -0700)]
glx: Remove check for gc->vtable->destroy

gc->vtable->destroy is always set and is used unconditionally
in other places, so don't bother checking for it first.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoapple: applegl_destroy_context: Pass along the correct display
Jeremy Huddleston [Mon, 13 Jun 2011 19:00:55 +0000 (12:00 -0700)]
apple: applegl_destroy_context: Pass along the correct display

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoapple: Dead code removal
Jeremy Huddleston [Mon, 13 Jun 2011 19:10:38 +0000 (12:10 -0700)]
apple: Dead code removal

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglapi: Add check for NULL symbol_prefix in gentable and fix warnings
Jeremy Huddleston [Mon, 13 Jun 2011 18:35:18 +0000 (11:35 -0700)]
glapi: Add check for NULL symbol_prefix in gentable and fix warnings

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoi915g: add a few more render target formats
Daniel Vetter [Mon, 13 Jun 2011 21:03:00 +0000 (23:03 +0200)]
i915g: add a few more render target formats

Snatched from xvmc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agomesa: move texrender.c to swrast
Brian Paul [Mon, 13 Jun 2011 19:44:35 +0000 (13:44 -0600)]
mesa: move texrender.c to swrast

This stuff is really for software rendering, it's not core Mesa.
A small step toward pushing the FetchTexel() stuff down into swrast.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agovbo: minor simplification in print_draw_arrays() debug function
Brian Paul [Mon, 13 Jun 2011 19:42:53 +0000 (13:42 -0600)]
vbo: minor simplification in print_draw_arrays() debug function