Dave Airlie [Tue, 6 Dec 2011 14:03:55 +0000 (14:03 +0000)]
r200: handle Z24 depth buffers correctly
The same detiling pattern applies to X8_Z24 as well.
Signed-off-by: Dave Airlie <Airlied@redhat.com>
Vadim Girlin [Fri, 2 Dec 2011 09:44:29 +0000 (13:44 +0400)]
r600g: check shaders presence in r600_draw_vbo
This patch should prevent the crashes when some shaders are absent,
see https://bugs.freedesktop.org/show_bug.cgi?id=43341
Note this is a candidate for the stable branch.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Dave Airlie [Tue, 6 Dec 2011 09:45:49 +0000 (09:45 +0000)]
r200: fix cb microtile setup
We shouldn't see this in buffers from the DDX but just in case.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 6 Dec 2011 09:44:37 +0000 (09:44 +0000)]
r200: enable tiling flags on blitter setup.
The r200 blitter also didn't set the correct tiling flags.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Anuj Phogat [Wed, 30 Nov 2011 19:39:57 +0000 (11:39 -0800)]
swrast: Add depth cube map support.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Anuj Phogat [Thu, 24 Nov 2011 00:14:43 +0000 (16:14 -0800)]
mesa: Allow glTexImage2D with a depth component cube map.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 5 Dec 2011 19:44:03 +0000 (11:44 -0800)]
i965: Fix incorrect comment about single program flow on Ironlake.
The code forces single program flow to be enabled on Ironlake, or
equivalently, disables multiple program flow. The comment was reversed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Jerome Glisse [Mon, 5 Dec 2011 23:42:38 +0000 (18:42 -0500)]
r600g: fix error path and use util_slab_free
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Jerome Glisse [Mon, 5 Dec 2011 23:40:53 +0000 (18:40 -0500)]
gallium/radeon: fix indentation
Indentation cleanup, to keep consistency.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Dave Airlie [Mon, 5 Dec 2011 19:15:52 +0000 (19:15 +0000)]
radeon/r200: drop old span depth/stencil code.
This is no longer used with the new renderbuffer code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 5 Dec 2011 19:15:04 +0000 (19:15 +0000)]
radeon/r200: add draw/stencil buffer detiling
This moves the detiling to the fbo mapping, r200 depth is always tiled,
and we can't detile it with the blitter.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 5 Dec 2011 16:51:03 +0000 (16:51 +0000)]
radeon: fix warnings
Dave Airlie [Mon, 5 Dec 2011 16:25:27 +0000 (16:25 +0000)]
radeon: use mesa renderbuffer accessors for depth for now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 5 Dec 2011 15:41:24 +0000 (15:41 +0000)]
radeon: add some tiling support for r100.
This sets up the tiling flags on the blitter.
Fixes some piglit tests with tiling enabled.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Nov 2011 16:13:06 +0000 (16:13 +0000)]
radeon: texture/renderbuffer overhaul.
This could have been split up better, but the driver is just broken now,
so bisecting the brokenness is going to be painful no matter what.
This adds renderbuffer mapping/unmapping along with texture image allocation.
It drops all the old texture upload paths, some of which could possible be
reimplemented with the blitter later.
It also redoes the span code paths to use its own set of image mapping handlers,
along with removing the tiling decode paths for the color buffers, since
we now hope to use the blitter for this.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Nov 2011 16:06:43 +0000 (16:06 +0000)]
radeon: set texture bits to always emit.
I think there is a missing state update or flush somewhere, and every
so often PP_CNTL goes to the kernel with a texture enabled but no texture.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Nov 2011 15:55:30 +0000 (15:55 +0000)]
radeon: update flush according to glXMakeCurrent man page
This also copies code from intel driver to do this.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Nov 2011 15:28:31 +0000 (15:28 +0000)]
radeon: drop border check
now that we strip borders off earlier.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Nov 2011 15:25:43 +0000 (15:25 +0000)]
radeon: add a bit more debugging to the blit debug code.
For debugging blits it helps if we printed out the offsets as well.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Eric Anholt [Mon, 28 Nov 2011 00:26:19 +0000 (16:26 -0800)]
mesa: Reject glDrawPixels(integer format).
When folding GL_EXT_texture_integer into the core, a new (and very
sensible) restriction was added.
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Sat, 3 Dec 2011 16:31:43 +0000 (09:31 -0700)]
util: add casts in fprintf() calls to silence warnings
And wrap to 80 columns.
Mathias Fröhlich [Fri, 2 Dec 2011 07:08:07 +0000 (08:08 +0100)]
mesa: Use VERT_{ATTRIB,BIT}* for ARB input validation.
For validating ARB program inputs replace hard
coded bitfield and attribute number with the appropriate
VERT_{ATTRIB,BIT}* variant.
This should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=43407
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Chia-I Wu [Sat, 3 Dec 2011 03:04:34 +0000 (11:04 +0800)]
egl_glx: fix eglDestroyContext
Wrong pointers are passed to glXDestroyContext.
Spotted by Brian Paul.
Stuart Abercrombie [Fri, 2 Dec 2011 19:29:38 +0000 (11:29 -0800)]
i965: Fix emit of a MOV with bad destination channel on gen6 math in FPs.
Previously a zero writemask would result in dst_chan == -1, meaning an
unnecessary MOV with the destination register dictated by undefined
memory contents would be emitted before returning. This caused
intermittent GPU hangs, e.g. with glean/texCombine.
Reviewed-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Thu, 1 Dec 2011 22:52:44 +0000 (14:52 -0800)]
mesa: Fix assertions for block size handling in glCompressedTexSubImage2D.
Anything of less than (bw, bh) size is possible when you consider
rectangular textures, and this code is (now) safe for those. Even for
power-of-two textures, width could be 4 for FXT1 while not being
aligned to block size.
Fixes piglit compressedteximage GL_COMPRESSED_RGB_FXT1_3DFX
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Thu, 1 Dec 2011 22:35:18 +0000 (14:35 -0800)]
mesa: Fix glCompressedTexSubImage (and non-Sub) for height == 2 or 1.
Generally this code works with width and height aligned to compressed
blocks, but at the 2x2 and 1x1 levels of a square texture (or height <
bh in general), we were skipping uploading our single row of blocks.
Fixes piglit compressedteximage GL_COMPRESSED_RGBA_S3TC_DXT5_EXT.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Wed, 30 Nov 2011 20:04:14 +0000 (12:04 -0800)]
mesa: Fix glCompressedTexImage when dstRowStride != srcRowStride.
Since the MapTextureImage changes on Intel, nwn had corruption in the
scrollbar at the load game menu, and corrupted ground textures in the
starting zone. Heroes of Newerth's intro screen was also thoroughly
garbled. A new piglit test "compressedteximage" was created to
regression test this.
The issue was this code now seeing dstRowStride aligned to hardware
requirements instead of a temporary buffer that gets uploaded to
hardware later. The existing code was just trying to memcpy
srcRowStride * height / bh, while the glCompressedTexSubImage2D()
storage code nearby did the correct walking by blockheight rows at a
time. Just reuse the subimage upload instead of duplicating that
logic.
v2: Update comment at the top of the function (suggestion by Joel
Forsberg)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41451
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Marcin Slusarz [Fri, 11 Nov 2011 19:45:08 +0000 (20:45 +0100)]
nv50/nvc0: fix crash when channel allocation fails
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
mesa: add casts to fix unpack_SIGNED_GR1616()
We were passing unsigned values to the macro before.
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
mesa: remove unreachable code in _mesa_unpack_color_span_ubyte()
We checked if srcType == GL_UNSIGNED_BYTE earlier so there was no
way to reach this code. This was left-over code from the GLchan
removal work.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
vbo: remove unreachable _mesa_error() call
If mode is not GL_POINT/LINE/FILL we'll have already reported the
error earlier in the function and returned so we can never get here.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
mesa: move _mesa_error() call in compressedteximage()
We shouldn't call _mesa_error() if the target is a proxy texture.
Errors are handled later in the function.
Fixes a Coverity warning.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
mesa: fix potential mem leak in generate_mipmap_compressed()
Fixes a coverity warning.
Reviewed-by: Vinson Lee <vlee@vmware.com>
Brian Paul [Thu, 1 Dec 2011 23:37:49 +0000 (16:37 -0700)]
glsl: return visit_stop in ir_validate::visit_enter() to silence warning
Brian Paul [Thu, 1 Dec 2011 17:47:31 +0000 (10:47 -0700)]
mesa: fix some minor texstore comments
For the texsubimage commands, we're not mapping the whole image/region.
Brian Paul [Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)]
mesa: rename MESA_FORMAT_RG88_REV to MESA_FORMAT_RG88
R is in the high byte, G in the low byte.
Brian Paul [Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)]
mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88
To better reflect the component ordering and be consistent with other
format names.
Brian Paul [Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)]
mesa: fix unpacking of RG88_REV texels
R should be in the high byte and G in the low byte for this format.
Kenneth Graunke [Tue, 15 Nov 2011 03:49:54 +0000 (19:49 -0800)]
i965: Make gen6_resolve_implied_move a no-op for MRF sources.
Attempting to move an MRF to a MRF is not only pointless, it will fail
because MRFs are read-only, resulting in garbage in your register.
If we already set up a MRF source, there's nothing to resolve anyway.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Thu, 1 Dec 2011 17:31:06 +0000 (18:31 +0100)]
mesa: Renumber the tnl attributes to match VERT_ATTRIB*.
Also renumber the tnl modules vertex attributes to match
the renumbered VERT_ATTRIB_* values.
This should fix
https://bugs.freedesktop.org/show_bug.cgi?id=43353
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Tested-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Mathias Fröhlich [Thu, 1 Dec 2011 17:29:18 +0000 (18:29 +0100)]
mesa: Extend BITSET64_*_RANGE to work on arbitrary ranges.
The BITSET64_{TEST,SET,CLEAR}_RANGE macros only work on ranges
wither in the lower 32 or in the upper 32 bits of the bitset.
This change extends these macros to work on arbitrary ranges
possibly crossing the bitset word boundary.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Stéphane Marchesin [Thu, 10 Nov 2011 00:46:24 +0000 (16:46 -0800)]
i915g: Implement GL_STREAM_* for textures by using untiled textures.
Stéphane Marchesin [Fri, 2 Dec 2011 02:09:18 +0000 (18:09 -0800)]
i915g: Add unsupported PIPE_SHADER_CAP_OUTPUT_READ to silence warnings.
Chia-I Wu [Wed, 30 Nov 2011 04:29:54 +0000 (12:29 +0800)]
docs: list GL_OES_compressed_ETC1_RGB8_texture in 7.12 release notes
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Tue, 29 Nov 2011 04:49:36 +0000 (12:49 +0800)]
st/mesa: add support for GL_OES_compressed_ETC1_RGB8_texture
Have st/mesa recognize MESA_FORMAT_ETC1_RGB8 then we are good to advertise the
extension.
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Mon, 28 Nov 2011 16:10:37 +0000 (00:10 +0800)]
gallium: add PIPE_FORMAT_ETC1_RGB8
The format is defined by GL_OES_compressed_ETC1_RGB8_texture.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Chia-I Wu [Mon, 28 Nov 2011 08:57:02 +0000 (16:57 +0800)]
mesa: add support for GL_OES_compressed_ETC1_RGB8_texture
Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa. There is no
driver support yet.
Unlike desktop GL compressed texture formats, GLES compressed texture formats
usually can only be used with glCompressedTexImage2D. All other gl*Tex*Image*
functions are updated to check for that.
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Mon, 28 Nov 2011 15:55:31 +0000 (23:55 +0800)]
mesa: add ETC1 decoding routines
The format is defined by GL_OES_compressed_ETC1_RGB8_texture. These routines
will be used in the following commit.
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Mon, 28 Nov 2011 08:41:10 +0000 (16:41 +0800)]
glapi: regenerate files for GL_OES_compressed_ETC1_RGB8_texture
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Mon, 28 Nov 2011 08:40:52 +0000 (16:40 +0800)]
glapi: add GL_OES_compressed_ETC1_RGB8_texture for GLES
Reviewed-by: Brian Paul <brianp@vmware.com>
Mathias Fröhlich [Thu, 1 Dec 2011 19:48:10 +0000 (20:48 +0100)]
swrast: Fix signed/unsigned problems with negative strides.
In swrast_map_renderbuffer negative strides lead to
render buffer map pointers that are off by 2^32.
Make sure that intermediate negative values are not
converted to an unsigned.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Vinson Lee [Wed, 30 Nov 2011 23:32:16 +0000 (15:32 -0800)]
u_vbuf: Silence uninitialized variable warnings.
Fixes these GCC warnings.
u_vbuf.c: In function ‘u_vbuf_draw_begin’:
u_vbuf.c:839:20: warning: ‘max_index’ may be used uninitialized in this function [-Wuninitialized]
u_vbuf.c:838:20: warning: ‘min_index’ may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Alex Deucher [Thu, 1 Dec 2011 00:34:15 +0000 (19:34 -0500)]
r600g: add some new pci ids
Note: this is a candidate for the stable branches.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Brian Paul [Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)]
mesa: fix unpack_ARGB1555_REV()
We weren't doing the necessary byte swap.
v2: use same arithmetic as unpack_ARGB1555() to be consistent.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Brian Paul [Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)]
mesa: fix indentation in attrib.c
Eric Anholt [Wed, 23 Nov 2011 18:20:12 +0000 (10:20 -0800)]
i965/fs: Fix regression in fbo-alphatest-nocolor.
In the refactor for handling user-defined out params, we failed to set
up the new color output tracking when there was no color drawbuffer in
place but alpha testing was on. Just always set up at least one when
handling gl_FragColor, since we won't make use of its value unless we
need to.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42806
Eric Anholt [Wed, 23 Nov 2011 18:13:39 +0000 (10:13 -0800)]
i965/fs: Make register file enum 0 be the undefined register file.
In
6d874d0ee18b3694c49e0206fa519bd8b746ec24, I checked whether a
register that had been stored was BAD_FILE (as opposed to a legitimate
GRF), but actually the unset register was ARF NULL because it had been
memset to 0. Finding BAD_FILE for unset values in debugging was my
intention with that file, so make it the case more often by
rearranging the enum. There was only one place we relied on the magic
enum register_file to hardware register file correspondance anyway.
Eric Anholt [Wed, 23 Nov 2011 18:01:39 +0000 (10:01 -0800)]
i965: Don't perform the precompile on fragment shaders by default.
It is useful to have this option for shader-db, and it was also good
at the time where we were rejecting shaders due to various internal
limits we hadn't supported yet. However, at this point the precompile
step takes extra time (since not all NOS is known at link time) and
spews misleading debug in the common case of debugging a real app.
This is left in place for VS, where we still have a couple of codegen
failure paths that result in link failure through precompile. Those
need to be fixed.
shader-db can still get at the debug info it wants using
"shader_precompile=true" driconf option. Long term, we can probably
build a good-enough app for shader-db to trigger real codegen.
Kai Wasserbäch [Tue, 29 Nov 2011 21:36:02 +0000 (22:36 +0100)]
gallium/failover: Remove the deprecated module.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 30 Nov 2011 14:09:46 +0000 (07:09 -0700)]
st/mesa: fix indentation
Brian Paul [Tue, 29 Nov 2011 14:44:20 +0000 (07:44 -0700)]
mesa: use _mesa_is_bufferobj() in update_array()
Brian Paul [Tue, 29 Nov 2011 14:36:50 +0000 (07:36 -0700)]
mesa: use Elements() macro in program printing code
Brian Paul [Tue, 29 Nov 2011 14:33:47 +0000 (07:33 -0700)]
mesa: fix signed/unsigned comparison warning
Brian Paul [Tue, 29 Nov 2011 14:26:37 +0000 (07:26 -0700)]
mesa: fix MESA_FORMAT_RG88 format match test
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Tue, 29 Nov 2011 14:26:01 +0000 (07:26 -0700)]
mesa: fix printf format warning in _mesa_fprint_program_parameters()
Brian Paul [Tue, 29 Nov 2011 01:13:44 +0000 (18:13 -0700)]
tnl: s/INLINE/inline/
Brian Paul [Tue, 29 Nov 2011 01:13:44 +0000 (18:13 -0700)]
mesa: regenerated dispatch.h (s/INLINE/inline/)
Brian Paul [Tue, 29 Nov 2011 01:13:44 +0000 (18:13 -0700)]
glapi: s/INLINE/inline/ for dispatch.h file
Brian Paul [Tue, 29 Nov 2011 01:13:44 +0000 (18:13 -0700)]
swrast: use STATIC_ASSERT to make sure texfetch table isn't missing entries
When new MESA_FORMAT_x enums are added we need to add a new entry in
the table of texture fetch functions. In the past this has been
missed if swrast isn't actually tested. Using a static assertion
should help with that.
Brian Paul [Tue, 29 Nov 2011 01:13:43 +0000 (18:13 -0700)]
mesa: add STATIC_ASSERT() macro for compile-time assertions
This can be used to check that tables have the right number of entries,
etc. at compile-time. This will hopefully catch things that are missed
if particular drivers aren't tested, for example.
v2: Simplify the macro to omit the extra line number info (the compiler
already indicates the line number). And wrap the macro for readability.
Brian Paul [Mon, 28 Nov 2011 18:08:01 +0000 (11:08 -0700)]
mesa: access pixels as GLushort in unpack_SL8()
Per the format comments and the texstore code, use a GLushort to access the
pixel. The code was OK as-is on little endian machines.
Eric Anholt [Tue, 22 Nov 2011 02:03:30 +0000 (18:03 -0800)]
mesa: Make _mesa_is_stencil_format() consistent with _mesa_is_depth_format().
There was only one consumer of this API, meta.c, which was intending
to ask "is this format just stencil index (and nothing else)?".
Instead, if one tried to glDrawPixels of GL_DEPTH_STENCIL-type
formats, it would just try to draw the stencil parts. Nothing good
came of this.
This function looks rather silly at this point, but I'm leaving it in
place to be the obvious parallel API to _mesa_is_depth_format(). Note
that if you want the old behavior, you should use it as
(_mesa_is_stencil_format() || _mesa_is_depthstencil_format()) like is
commonly done for depth-related tests.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 18 Nov 2011 01:26:41 +0000 (17:26 -0800)]
mesa: Fix the datatype of GL_DEPTH32F_STENCIL8's depth channel.
Asking for the datatype of MESA_FORMAT_Z32_FLOAT_X24S8 is a bit funny
-- there's a float depth channel, and a stencil channel that doesn't
have a particular GLenum associated with its type, so what's the
correct response?
Because there is no query for stencil, just make this format's
datatype be that of the depth channel. It fixes the depth query (and
thus a failure in piglit gl-3.0-required-sized-formats), and none of
the other consumers of the _mesa_get_format_datatype() API care.
v2: Add a comment for why the DataType is this way for this format.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 18 Nov 2011 01:01:58 +0000 (17:01 -0800)]
i965: Always handle GL_DEPTH_TEXTURE_MODE through the shader.
We were already doing it through the shader (layered underneath
GL_EXT_texture_swizzle) in the shadow compare case. This avoids
having per-format logic for switching out the surface format dependent
on the depth mode.
v2: Also do the swizzling for DEPTH_STENCIL. oops.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 22 Nov 2011 01:46:22 +0000 (17:46 -0800)]
i965: Fix EXT_texture_swizzle with a writemask in the FFFS/FP backend.
I tripped over this bug in the next commit, relying on our
EXT_texture_swizzle to do some shadow sampler-related swizzling. If a
writemask was masking out a channel of the destination that was a live
channel of the texture swizzle, it would read undefined values.
Fixes piglit ARB_fragment_program_shadow/masked.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 17 Nov 2011 22:45:54 +0000 (14:45 -0800)]
i965: Base HW depth format setup based on MESA_FORMAT, not bpp.
This will make handling new formats (like actually exposing Z32F)
easier and more reliable.
v2: Remove the check for hiz buffer -- the MESA_FORMAT should really
be giving us the value we want even for hiz.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kai Wasserbäch [Tue, 29 Nov 2011 17:17:47 +0000 (18:17 +0100)]
gallium/cell: Remove the driver.
Complicates Gallium3D development and doesn't seem to have active users.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Eric Anholt [Wed, 23 Nov 2011 00:26:55 +0000 (16:26 -0800)]
i965: Don't depth test the fake depthbuffer when one isn't present.
For the non-separate-stencil-only case, we've been using a NULL
surface for depth, so we didn't have to care. However, to support
separate stencil with no depthbuffer, we have to make the depth
surface non-NULL or the stencil test always fails thanks to separate
stencil inheriting the surface type of depth.
Fixes hiz-depth-stencil-test-d0-s8.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Ian Romanick [Tue, 22 Nov 2011 04:47:57 +0000 (20:47 -0800)]
mesa: Allow generic attributes for glGetActiveAttrib and GL_ACTIVE_ATTRIBUTES
Page 77 (page 91 of the PDF) says about glGetActiveAttrib:
"The returned attribute name can be the name of a generic
attribute or a conventional attribute (which begin with the prefix
"gl_", see the OpenGL Shading Language specification for a
complete list)."
Page 261 (page 275 of the PDF) says about glGetProgramiv:
"If pname is ACTIVE_ATTRIBUTES, the number of active attributes in
program is returned."
It doesn't say anything about built-in vs. user-defined attributes.
From the language around glGetActiveAttrib and the lack of an
exclusion of built-in attributes, which exists other places (e.g.,
around glBindAttribLocation), we can infer that GL_ACTIVE_ATTRIBUTES
should include the active attribute count. It should also be included
in the values returned by glGetActiveAttrib.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43138
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Yi Sun <yi.sun@intel.com>
Chad Versace [Mon, 28 Nov 2011 19:45:03 +0000 (11:45 -0800)]
swrast: Fix some static analysis warnings
To each switch statement in s_texfilter.c, add a break statement to the
default case.
Eliminates the Eclipse static analysis warning: No break at the end of
this case.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
José Fonseca [Wed, 9 Nov 2011 07:05:52 +0000 (07:05 +0000)]
Remove windows kernel support code.
Not actively used.
Reviewed-by: Brian Paul <brianp@vmware.com>
José Fonseca [Wed, 9 Nov 2011 07:02:27 +0000 (07:02 +0000)]
gallium/auxiliary: Remove os_stream.
XP kernel mode was the only subsystem lacking stdio FILES.
Reviewed-by: Brian Paul <brianp@vmware.com>
Kai Wasserbäch [Tue, 29 Nov 2011 16:07:06 +0000 (17:07 +0100)]
docs: Removed i965 entry in the source tree listing.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Kai Wasserbäch [Tue, 29 Nov 2011 16:07:05 +0000 (17:07 +0100)]
docs: Added item to release notes for 7.12.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
José Fonseca [Wed, 9 Nov 2011 07:03:46 +0000 (07:03 +0000)]
st/vega: Fix warnings about dllimport attributes on windows.
Kai Wasserbäch [Tue, 29 Nov 2011 14:04:58 +0000 (15:04 +0100)]
i965g: Delete this driver.
Never completed, and no plans to do so.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Chia-I Wu [Tue, 29 Nov 2011 07:19:28 +0000 (15:19 +0800)]
mesa: distinct gl_client_array arrays are gone
Fix build errors since
762c9766c93697af8d7fbaa729aed118789dbe8e.
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Mathias Fröhlich [Mon, 31 Oct 2011 21:23:51 +0000 (22:23 +0100)]
mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.
Replace the distinct struct gl_client_array members in gl_array_object by
an array of gl_client_arrays indexed by VERT_ATTRIB_*.
Renumber the vertex attributes slightly to keep the old semantics of the
distinct array members. Make use of the upper 32 bits in VERT_BIT_*.
Update all occurances of the distinct struct members with the array
equivalents.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Mon, 31 Oct 2011 17:32:59 +0000 (18:32 +0100)]
mesa: Make gl_program::InputsRead 64 bits.
Make gl_program::InputsRead a 64 bits bitfield.
Adapt the intel and radeon driver to handle a 64 bits
InputsRead value.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Mon, 31 Oct 2011 17:26:00 +0000 (18:26 +0100)]
mesa: Make gl_array_object::_Enabled 64 bits.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Mon, 31 Oct 2011 15:23:40 +0000 (16:23 +0100)]
vbo: Use The VERT_{ATTRIB,BIT} defines.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Mon, 31 Oct 2011 14:11:43 +0000 (15:11 +0100)]
mesa: Replace _NEW_ARRAY_* bits with VERT_BIT_*
Consolidate the two distinct set of flags to use VERT_BIT_*.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Mathias Fröhlich [Mon, 31 Oct 2011 08:31:58 +0000 (09:31 +0100)]
mesa: Introduce more symbolic VERT_{ATTRIB,BIT}* defines.
Introduce a set of defines for VERT_ATTRIB_* and VERT_BIT_*
that will be used in the followup patches.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Yuanhan Liu [Wed, 23 Nov 2011 07:59:06 +0000 (15:59 +0800)]
mesa: move ElementArrayBufferObj to gl_array_object
According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at
page 515, the element buffer object is listed in vertex array object.
So, move the ElementArrayBufferObj inside gl_array_object to make
element buffer object per-vao.
This would fix most of(3 left) intel oglc vao test fail
NOTE: this is a candidate for the 7.11 branch.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Tue, 29 Nov 2011 01:09:14 +0000 (18:09 -0700)]
mesa: update comments for _mesa_format_matches_format_and_type(), 80-column wrapping
Brian Paul [Tue, 29 Nov 2011 01:09:14 +0000 (18:09 -0700)]
mesa: add component comments for sRGB formats
Brian Paul [Tue, 29 Nov 2011 01:09:14 +0000 (18:09 -0700)]
mesa: update texstore comments for R/G textures
Brian Paul [Tue, 29 Nov 2011 01:09:14 +0000 (18:09 -0700)]
mesa: fix comments for RG formats
The position of the red and green bits was misstated in the comments.
Arguably, the names of these formats should be changed to "GR" to reflect
the component ordering and to be consistent with other formats.
Brian Paul [Tue, 29 Nov 2011 01:00:35 +0000 (18:00 -0700)]
st/mesa: don't try to allocate zero-sized renderbuffers
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43047
and https://bugs.freedesktop.org/show_bug.cgi?id=43048
Note: This is a candidate for the 7.11 branch.
Tested-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Daniel Vetter [Mon, 28 Nov 2011 21:24:26 +0000 (22:24 +0100)]
gallium/i965g: hide that utterly broken driver better
And warn loudly in case people want to use it. Too many tester report
gpu hangs on irc and we rootcause this ...
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>