profile/ivi/mesa.git
13 years agointel: Change framebuffer validation criteria
Chad Versace [Thu, 23 Jun 2011 00:52:22 +0000 (17:52 -0700)]
intel: Change framebuffer validation criteria

Since all infrastructure is now in place to support packed
depth/stencil renderbuffers when using separate stencil, there is no
need for special cases when separate stencil is enabled.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: In intel_update_wrapper, support s8z24 textures when using separate stencil
Chad Versace [Thu, 23 Jun 2011 02:44:53 +0000 (19:44 -0700)]
intel: In intel_update_wrapper, support s8z24 textures when using separate stencil

Also, in order to coerce intel_update_tex_wrapper_regions() to
allocate the hiz region, alter intel_update_tex_wrapper_regions() to
examine the renderbuffer format instead of the texture image format.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Factor region updates out of intel_update_wrapper
Chad Versace [Wed, 22 Jun 2011 23:08:49 +0000 (16:08 -0700)]
intel: Factor region updates out of intel_update_wrapper

... and into new function intel_update_tex_wrapper_regions.

This prevents code duplication in the next commit.

Also add a note explaining that the hiz region is broken for mipmapped
depth textures.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: During glTexImage, allocate renderbuffers for faking s8z24 textures
Chad Versace [Tue, 21 Jun 2011 22:54:27 +0000 (15:54 -0700)]
intel: During glTexImage, allocate renderbuffers for faking s8z24 textures

... when using separate stencil.

Define function intel_tex_image_x8z24_create_renderbuffers and call it
in intelTexImage after the miptree has been created and filled with data.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Declare some functions in intel_fbo.c as non-static
Chad Versace [Wed, 22 Jun 2011 17:26:26 +0000 (10:26 -0700)]
intel: Declare some functions in intel_fbo.c as non-static

... because they will be needed by intel_tex_image_s8z24_create_renderbuffers.

Redeclared functions are:
    intel_alloc_renderbuffer_storage
    intel_renderbuffer_set_draw_offsets

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Change signature of intel_create_wrapped_renderbuffer
Chad Versace [Tue, 21 Jun 2011 21:06:13 +0000 (14:06 -0700)]
intel: Change signature of intel_create_wrapped_renderbuffer

Redeclare as non-static because
intel_tex_image_s8z24_create_renderbuffers will use it.

Remove the 'wrapper' parameter, because there is no wrapper for
intel_texture_image.depth_rb and stencil_rb.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Perform gather on s8z24 texture images during glGetTexImage
Chad Versace [Wed, 22 Jun 2011 04:42:48 +0000 (21:42 -0700)]
intel: Perform gather on s8z24 texture images during glGetTexImage

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Define functions intel_texture_s8z24_scatter/gather
Chad Versace [Wed, 22 Jun 2011 05:58:39 +0000 (22:58 -0700)]
intel: Define functions intel_texture_s8z24_scatter/gather

... which copy the stencil bits between intel_image->depth_rb and
intel_image->stencil_rb.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Add fields to intel_texture for faking s8z24 with separate stencil
Chad Versace [Tue, 21 Jun 2011 20:44:57 +0000 (13:44 -0700)]
intel: Add fields to intel_texture for faking s8z24 with separate stencil

Add the fields depth_rb and stencil_rb, and put hooks in place to
release the renderbuffers in intelFreeTextureImageData and
intelTexImage.

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agost/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.
Stéphane Marchesin [Fri, 24 Jun 2011 21:07:31 +0000 (14:07 -0700)]
st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.

Otherwise we can end up creating RGBA render targets (which are BGRA on the
hardware), and then we bind them as RGBA textures (which are RGBA on the
hardware). This generates software fallbacks every time we bind the frame as
a texture.

13 years agomesa: don't allocate memory in _mesa_unpack_depth_span if we don't need it
Marek Olšák [Tue, 21 Jun 2011 03:08:28 +0000 (05:08 +0200)]
mesa: don't allocate memory in _mesa_unpack_depth_span if we don't need it

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix a memory leak in _mesa_unpack_depth_span
Marek Olšák [Tue, 21 Jun 2011 03:07:53 +0000 (05:07 +0200)]
mesa: fix a memory leak in _mesa_unpack_depth_span

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix texstore of DEPTH24_STENCIL8 if srcFormat is STENCIL_INDEX
Marek Olšák [Tue, 21 Jun 2011 03:10:26 +0000 (05:10 +0200)]
mesa: fix texstore of DEPTH24_STENCIL8 if srcFormat is STENCIL_INDEX

NOTE: This is a candidate for the 7.10 branch.

13 years agomesa: remove unused function _mesa_new_depthstencil_renderbuffer
Marek Olšák [Wed, 1 Jun 2011 13:10:27 +0000 (15:10 +0200)]
mesa: remove unused function _mesa_new_depthstencil_renderbuffer

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: fix pipe_get_transfer() call in fallback_copy_texsubimage()
Brian Paul [Fri, 24 Jun 2011 19:59:33 +0000 (13:59 -0600)]
st/mesa: fix pipe_get_transfer() call in fallback_copy_texsubimage()

Commit 1a339b6c71ebab6e1a64f05b2e133022d3bbcd15 caused us to take
a different path through the glCopyTexSubImage() code.  The
pipe_get_transfer() call neglected to pass the texture's level, face
and slice info.  So we were always transferring from the 0th mipmap
level even when the source renderbuffer was a non-zero mipmap level
in a texture.

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

NOTE: This is a candidate for the 7.10 branch.

13 years agoegl_dri2: Build drm platform only if enabled
Benjamin Franzke [Fri, 24 Jun 2011 19:45:05 +0000 (21:45 +0200)]
egl_dri2: Build drm platform only if enabled

13 years agor600g: implement fragment and vertex color clamp
Vadim Girlin [Fri, 24 Jun 2011 16:29:13 +0000 (20:29 +0400)]
r600g: implement fragment and vertex color clamp

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

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
13 years agor600g: optimize spi update
Vadim Girlin [Fri, 24 Jun 2011 16:29:12 +0000 (20:29 +0400)]
r600g: optimize spi update

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
13 years agor600g: LIT: fix x&y slots order
Vadim Girlin [Fri, 24 Jun 2011 16:29:11 +0000 (20:29 +0400)]
r600g: LIT: fix x&y slots order

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
13 years agoi965: Make the brw_format_for_mesa_format table static const.
Eric Anholt [Wed, 22 Jun 2011 00:38:20 +0000 (17:38 -0700)]
i965: Make the brw_format_for_mesa_format table static const.

Once again, assuming the compiler is clever works out so poorly.  The
generated code initialized the structure on the stack, then did a
lookup into it.  This was a performance regression from
70c6cd39bd9396b0d3f9e84df41fd8bef1f26cc4.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Don't bother telling swrast_setup about state updates until fallback.
Eric Anholt [Wed, 22 Jun 2011 00:02:14 +0000 (17:02 -0700)]
i965: Don't bother telling swrast_setup about state updates until fallback.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Don't bother telling tnl about state updates unless we fall back.
Eric Anholt [Tue, 21 Jun 2011 23:52:51 +0000 (16:52 -0700)]
i965: Don't bother telling tnl about state updates unless we fall back.

This was sucking up 1% of the CPU on 3DMMES.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Reuse existing program data when a new compiled program matches.
Eric Anholt [Sat, 26 Feb 2011 10:01:37 +0000 (02:01 -0800)]
i965: Reuse existing program data when a new compiled program matches.

It's common in applications just before the advent of
EXT_separate_shader_objects to have multiple linked shaders with the
same VS or FS.  While we aren't detecting those at the Mesa level, we
can detect when our compiled output happens to match an existing
compiled program.

This patch was created after noting the incredible amount of compiled
program data generated by Heroes of Newerth.  It reduces the program
data in use at the start menu (replayed by apitrace) from 828kb to
632kb, and reduces CACHE_NEW_WM_PROG state flagging by 3/4.  It
doesn't impact our rate of hardware state changes yet, because things
depending on CACHE_NEW_WM_PROG also depend on BRW_NEW_FRAGMENT_PROGRAM
which is still being flagged.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agost/mesa: fix all_varyings_in_vbos() regression
Brian Paul [Fri, 24 Jun 2011 16:41:42 +0000 (10:41 -0600)]
st/mesa: fix all_varyings_in_vbos() regression

Fixes regression from d631c19db47181129811080bfa772b210d762d4d.
See http://bugs.freedesktop.org/show_bug.cgi?id=38626

13 years agoFix 24bpp software rendering
Marc Pignat [Fri, 24 Jun 2011 13:19:32 +0000 (15:19 +0200)]
Fix 24bpp software rendering

This patch add the support for 24bpp in the dri/swrast implementation.

Signed-off-by: Marc Pignat <marc@pignat.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agogallium/tests/trivial: update comment
Brian Paul [Fri, 24 Jun 2011 15:01:33 +0000 (09:01 -0600)]
gallium/tests/trivial: update comment

13 years agogallium/tests/trivial: use CXX to do final link
Brian Paul [Fri, 24 Jun 2011 15:00:57 +0000 (09:00 -0600)]
gallium/tests/trivial: use CXX to do final link

13 years agogallium/tests/trivial: make it build
Alon Levy [Wed, 22 Jun 2011 12:31:11 +0000 (14:31 +0200)]
gallium/tests/trivial: make it build

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/egl: make native_buffer interface typed
Chia-I Wu [Fri, 24 Jun 2011 04:30:35 +0000 (13:30 +0900)]
st/egl: make native_buffer interface typed

Use a typed struct to describe the native buffer and let the backends
map the native buffer to winsys_handle for
resource_from_handle/resource_to_handle.

13 years agotargets/egl: removed
Chia-I Wu [Fri, 24 Jun 2011 02:15:55 +0000 (11:15 +0900)]
targets/egl: removed

Not used.

13 years agotargets/egl-static: replace targets/egl
Chia-I Wu [Mon, 20 Jun 2011 03:01:39 +0000 (12:01 +0900)]
targets/egl-static: replace targets/egl

Build egl_gallium from targets/egl-static intead of targets/egl.  The
latter exposes (unversioned) gallium interfaces and is frowned upon.

13 years agotargets/egl-static: allow st/mesa to be dynamically loaded
Chia-I Wu [Thu, 23 Jun 2011 11:08:53 +0000 (20:08 +0900)]
targets/egl-static: allow st/mesa to be dynamically loaded

When shared glapi is not enabled, there are two glapi providers and we
cannot decide which one to link to at build time.  It results in
unresolved symbols in st/mesa.  This commit makes st/mesa a loadable
module when shared glapi is not enabled, and hopes that the apps will
link to one of the glapi providers (GL or GLES).

13 years agotargets/egl-static: add support for driver lookup
Chia-I Wu [Mon, 20 Jun 2011 03:36:02 +0000 (12:36 +0900)]
targets/egl-static: add support for driver lookup

Use pci id to driver map to look up the driver name.  This is based on
a433755ec5c48088a0d8a340851a1a8be9e58897.

13 years agotargets/gbm: build pipe drivers
Chia-I Wu [Fri, 24 Jun 2011 01:39:06 +0000 (10:39 +0900)]
targets/gbm: build pipe drivers

Build pipe drivers here instead of using those built by the
soon-to-be-removed targets/egl.

[with an update by Benjamin Franzke to use --{start|end}-group]

13 years agoconfigure: Disable drm egl platform by default
Benjamin Franzke [Fri, 24 Jun 2011 07:33:20 +0000 (09:33 +0200)]
configure: Disable drm egl platform by default

So that gbm(_dri) which pulls in shared-glapi is not needed.

13 years agodri/r200: properly spell current_atom.
Stéphane Marchesin [Fri, 24 Jun 2011 04:00:26 +0000 (21:00 -0700)]
dri/r200: properly spell current_atom.

13 years agodri/r200: rename __atom to current_atom.
Stéphane Marchesin [Fri, 24 Jun 2011 03:53:47 +0000 (20:53 -0700)]
dri/r200: rename __atom to current_atom.

__atom is defined by gcc when the atom compile optimizations are used.

13 years agogallivm: Fix x86 build with llvm-3.0svn.
Vinson Lee [Fri, 24 Jun 2011 03:48:05 +0000 (20:48 -0700)]
gallivm: Fix x86 build with llvm-3.0svn.

LLVM revision 133739 renamed StackAlignment to StackAlignmentOverride.

13 years agost/egl: drop guess_gl_api from egl_g3d_loader
Chia-I Wu [Fri, 24 Jun 2011 03:13:02 +0000 (12:13 +0900)]
st/egl: drop guess_gl_api from egl_g3d_loader

It is not used and confusing.

13 years agost/egl: use a helper to get st_api from the loader
Chia-I Wu [Fri, 24 Jun 2011 03:12:39 +0000 (12:12 +0900)]
st/egl: use a helper to get st_api from the loader

13 years agomesa: fix incorrect error string
Brian Paul [Thu, 23 Jun 2011 23:08:58 +0000 (17:08 -0600)]
mesa: fix incorrect error string

13 years agonv50,nvc0: prevent pushbuf flush during ctx reloc emission
Christoph Bumiller [Thu, 23 Jun 2011 11:13:22 +0000 (13:13 +0200)]
nv50,nvc0: prevent pushbuf flush during ctx reloc emission

Should unify this too, but will delay that until the planned
libdrm_nouveau/winsys changes which are likely to cause major
changes to this bo validation code too.

13 years agost/mesa: fix format selection regression
Brian Paul [Thu, 23 Jun 2011 22:04:30 +0000 (16:04 -0600)]
st/mesa: fix format selection regression

Note all gallium formats are supported by Mesa so disable them.
Fixes regression from 1a339b6c71ebab6e1a64f05b2e133022d3bbcd15.

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

13 years agovbo: Don't discount stride == 0 for testing all varyings in VBOs.
Eric Anholt [Fri, 17 Jun 2011 20:17:34 +0000 (13:17 -0700)]
vbo: Don't discount stride == 0 for testing all varyings in VBOs.

In fixed function, stride == 0 (e.g. glColor4f() outside of the draw
call) would get turned into uniform inputs, which is why it was
ignored originally in this test.  For shaders, drivers end up seeing a
need to upload stride == 0 data, and get confused by needing to upload
when vbo_all_varyings_in_vbos() returned true.  In the 965 driver
case, it wouldn't bother to compute the min/max index, and uploaded
nothing if the min/max wasn't known.

We've talked about removing the ff stride=0-into-uniforms code, so
this check shouldn't be missed once that's gone.

Fixes ARB_vertex_buffer_object/mixed-immediate-and-vbo
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37934
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agovbo: Don't bother checking for stride == 0 for "any varying in a VBO".
Eric Anholt [Fri, 17 Jun 2011 20:16:45 +0000 (13:16 -0700)]
vbo: Don't bother checking for stride == 0 for "any varying in a VBO".

We would still want to consider that data as being in a VBO even if we
managed to produce this case, which as far as I know we can't.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965/gen6: Add a couple more packets to the nonpipelined workaround list.
Eric Anholt [Mon, 20 Jun 2011 15:52:03 +0000 (08:52 -0700)]
i965/gen6: Add a couple more packets to the nonpipelined workaround list.

All the packets chosen before came from grepping the pdf for
nonpipelined, and these two came from grepping for non.pipelined.  We
could stand a review by looking at all packets emitted and identifying
what kind they are.

13 years agoglsl: Flagged extension EXT_texture3D as "supported" in the builtin compiler.
Paul Berry [Wed, 15 Jun 2011 23:26:10 +0000 (16:26 -0700)]
glsl: Flagged extension EXT_texture3D as "supported" in the builtin compiler.

Previously, the builtins in OES_texture_3D.{frag,vert} were only
compiling properly as a consequence of bug 38015, which allows
unsupported extensions to be enabled.  This fix eliminates the builtin
compiler's reliance on bug 38015, so that bug 38015 can be fixed.

13 years agost/egl: Fix scons build
Benjamin Franzke [Thu, 23 Jun 2011 20:23:57 +0000 (22:23 +0200)]
st/egl: Fix scons build

13 years agost/egl: Hookup gbm for drm backend
Benjamin Franzke [Mon, 30 May 2011 09:40:52 +0000 (11:40 +0200)]
st/egl: Hookup gbm for drm backend

13 years agoegl_dri2: Hookup gbm as drm platform
Benjamin Franzke [Mon, 30 May 2011 08:50:52 +0000 (10:50 +0200)]
egl_dri2: Hookup gbm as drm platform

13 years agogbm: Add gallium (drm) backend
Benjamin Franzke [Thu, 26 May 2011 13:11:50 +0000 (15:11 +0200)]
gbm: Add gallium (drm) backend

13 years agogbm: Add dri backend
Benjamin Franzke [Thu, 26 May 2011 13:10:50 +0000 (15:10 +0200)]
gbm: Add dri backend

13 years agoAdd gbm (generic/graphics buffer manager)
Benjamin Franzke [Thu, 26 May 2011 13:09:39 +0000 (15:09 +0200)]
Add gbm (generic/graphics buffer manager)

13 years agost/dri: Implement DRIimageExtension::dupImage
Benjamin Franzke [Wed, 9 Mar 2011 19:55:02 +0000 (20:55 +0100)]
st/dri: Implement DRIimageExtension::dupImage

13 years agointel: Implement DRIimageExtension::dupImage
Benjamin Franzke [Wed, 9 Mar 2011 19:56:02 +0000 (20:56 +0100)]
intel: Implement DRIimageExtension::dupImage

13 years agodri: Add dupImage to DRIimageExtension
Benjamin Franzke [Wed, 9 Mar 2011 19:47:42 +0000 (20:47 +0100)]
dri: Add dupImage to DRIimageExtension

13 years agor600g: Add R8G8B8A8_UNORM to evergreen colorswap table
Benjamin Franzke [Thu, 23 Jun 2011 12:31:15 +0000 (14:31 +0200)]
r600g: Add R8G8B8A8_UNORM to evergreen colorswap table

Fixes broken glTexImage2D with format=GL_RGBA since
1a339b6c71ebab6e1a64f05b2e133022d3bbcd15

The origin for this behaviour is that r600_is_format_supported
checks only against r600_state_inline.h tables not evergreens.

13 years agor600g: bump shader input limits
Marek Olšák [Thu, 23 Jun 2011 13:55:41 +0000 (15:55 +0200)]
r600g: bump shader input limits

13 years agost/wgl: return height, not width for WGL_PBUFFER_HEIGHT_ARB
Brian Paul [Thu, 23 Jun 2011 12:54:51 +0000 (06:54 -0600)]
st/wgl: return height, not width for WGL_PBUFFER_HEIGHT_ARB

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

13 years agost/egl/wayland: Take resize parameters only if size changes
Benjamin Franzke [Thu, 23 Jun 2011 10:12:52 +0000 (12:12 +0200)]
st/egl/wayland: Take resize parameters only if size changes

This matches what we do in egl_dri2, and clients should
behave like this anyway.

13 years agost/mesa: use a helper for st_framebuffer creation
Chia-I Wu [Wed, 22 Jun 2011 02:02:27 +0000 (11:02 +0900)]
st/mesa: use a helper for st_framebuffer creation

In st_api_make_current, we would like to reuse the exising
st_framebuffer if possible.  Use a helper function to make the code
clearer.

13 years agost/mesa: prefer native texture formats when possible.
Stéphane Marchesin [Thu, 23 Jun 2011 00:02:21 +0000 (17:02 -0700)]
st/mesa: prefer native texture formats when possible.

If possible, we want to match the hardware format to what the app uses. By
doing so, we avoid the need for pixel conversions and therefore greatly speed
up texture uploads.

13 years agoi915g: Add draw point sprites.
Stéphane Marchesin [Wed, 22 Jun 2011 23:51:02 +0000 (16:51 -0700)]
i915g: Add draw point sprites.

It's not that much work; hopefully blend func separate also works and we get GL 2.0 for real.

13 years agoi915g: Fix comment.
Stéphane Marchesin [Wed, 22 Jun 2011 23:47:36 +0000 (16:47 -0700)]
i915g: Fix comment.

Reported-by: Marcin Baczynski <marbacz@gmail.com>
13 years agoi915g: Support more texture and render target formats.
Stéphane Marchesin [Wed, 22 Jun 2011 23:23:02 +0000 (16:23 -0700)]
i915g: Support more texture and render target formats.

13 years agor600c: add missing bank tiling case for evergreen
Alex Deucher [Wed, 22 Jun 2011 16:38:29 +0000 (12:38 -0400)]
r600c: add missing bank tiling case for evergreen

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: fix num_banks interpretation on eg+
Alex Deucher [Wed, 22 Jun 2011 16:33:01 +0000 (12:33 -0400)]
r600g: fix num_banks interpretation on eg+

Field is encoded:
0 = 4 banks
1 = 8 banks
2 = 16 banks

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: Fix use of uninitialized local variable extra_size.
Michel Dänzer [Wed, 22 Jun 2011 14:23:36 +0000 (16:23 +0200)]
r600g: Fix use of uninitialized local variable extra_size.

Should fix http://bugs.freedesktop.org/show_bug.cgi?id=38566 .

13 years agomesa: add missing DRI Makefiles to tarball
Thierry Vignaud [Wed, 22 Jun 2011 14:22:02 +0000 (08:22 -0600)]
mesa: add missing DRI Makefiles to tarball

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: comments and 80-column wrapping
Brian Paul [Wed, 22 Jun 2011 14:12:10 +0000 (08:12 -0600)]
mesa: comments and 80-column wrapping

13 years agomesa: update comments in update_program_enables()
Brian Paul [Wed, 22 Jun 2011 14:12:10 +0000 (08:12 -0600)]
mesa: update comments in update_program_enables()

13 years agomesa: update/fix comments in update_program()
Brian Paul [Wed, 22 Jun 2011 14:12:10 +0000 (08:12 -0600)]
mesa: update/fix comments in update_program()

13 years agomesa: update comment for gl_texture_unit
Brian Paul [Wed, 22 Jun 2011 14:12:10 +0000 (08:12 -0600)]
mesa: update comment for gl_texture_unit

13 years agoxorg/nouveau: blacklist all pre NV30 cards
Marcin Slusarz [Sun, 5 Jun 2011 20:25:26 +0000 (22:25 +0200)]
xorg/nouveau: blacklist all pre NV30 cards

Bail out early in probe, so other driver can take control of the card.
Doing it in screen_create would be too late.

13 years agor600c: use BASE_VTX_LOC & AUTO_INDEX for drawing nonindexed with offset
Andre Maasikas [Wed, 22 Jun 2011 09:40:12 +0000 (12:40 +0300)]
r600c: use BASE_VTX_LOC & AUTO_INDEX for drawing nonindexed with offset

Saves cmd buffer space as we were generating indexes into cs  in this case.
This was laying around in https://bugs.freedesktop.org/show_bug.cgi?id=32768
for a long time.

13 years agor600g: fix fbo depth/stencil texture allocation for evergreen+
Alex Deucher [Tue, 21 Jun 2011 21:31:14 +0000 (17:31 -0400)]
r600g: fix fbo depth/stencil texture allocation for evergreen+

evergreen+ stores depth and stencil separately so when we
allocate a depth/stencil fbo, make sure we allocate enough
memory for both depth and stencil buffers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agointel: Allocate s8_z24 non-texture renderbuffers when using separate stencil
Chad Versace [Fri, 17 Jun 2011 19:12:35 +0000 (12:12 -0700)]
intel: Allocate s8_z24 non-texture renderbuffers when using separate stencil

Now all infrastructure is in place to support s8_z24 non-texture
renderbuffers for gen7.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Unobfuscate intel_alloc_renderbuffer_storage
Chad Versace [Wed, 15 Jun 2011 00:38:30 +0000 (17:38 -0700)]
intel: Unobfuscate intel_alloc_renderbuffer_storage

Hiz buffer allocation can only occur if the 'else' branch has been taken,
so move the hiz buffer allocation into the 'else' branch.

Having the hiz buffer allocation dangling outside of the if-tree was just
damn confusing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Add fields to intel_renderbuffer for unwrapping packed depth/stencil buffers
Chad Versace [Thu, 16 Jun 2011 21:12:54 +0000 (14:12 -0700)]
intel: Add fields to intel_renderbuffer for unwrapping packed depth/stencil buffers

Add the following fields:
    intel_renderbuffer.wrapped_depth;
    intel_renderbuffer.wrapped_stencil

If the intel_context is using separate stencil and the renderbuffer has
a packed depth/stencil format, then wrapped_depth and wrapped_stencil are
the real renderbuffers.

Alter the following functions to accomodate the wrapped buffers:
    intel_delete_renderbuffer
    intel_draw_buffer
    intel_get_renderbuffer
    intel_renderbuffer_map
    intel_renderbuffer_unmap

Subsequent commits allocate renderbuffer storage for wrapped_depth and
wrapped_stencil.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Unconditionally enable support for S8_Z24 texture format
Chad Versace [Thu, 9 Jun 2011 02:08:14 +0000 (19:08 -0700)]
intel: Unconditionally enable support for S8_Z24 texture format

Commit b5c847c7ca06823af3b72324056a2e478caca70b erroneously disabled
support for S8_Z24 texture format when the context required separate
stencil (intel_context.must_use_separate_stencil).

But the GL spec requires implementations to support GL_DEPTH24_STENCIL8.
So we better find a way to fake it...

From page 180 (196 of pdf) of the OpenGL 3.0 spec:
    In addition, implementations are required to support the following
    sized internal [texture] formats.

    [...]

    - Combined depth+stencil formats: DEPTH32F_STENCIL8 and and
      DEPTH24_STENCIL8.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agoegl_dri2/wayland: Hook up new buffer.release event
Benjamin Franzke [Fri, 6 May 2011 17:13:29 +0000 (19:13 +0200)]
egl_dri2/wayland: Hook up new buffer.release event

13 years agowinsys/wayland: Fix warning
Benjamin Franzke [Tue, 21 Jun 2011 07:26:49 +0000 (09:26 +0200)]
winsys/wayland: Fix warning

13 years agost/mesa: Invalidate drawables on context switch
Benjamin Franzke [Tue, 21 Jun 2011 11:25:56 +0000 (13:25 +0200)]
st/mesa: Invalidate drawables on context switch

13 years agor600g: use maths instead of a loop to work out mask.
Dave Airlie [Tue, 21 Jun 2011 05:18:44 +0000 (15:18 +1000)]
r600g: use maths instead of a loop to work out mask.

This is equivalent results with less looping.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: optimise draw vbo function a bit more.
Dave Airlie [Tue, 21 Jun 2011 04:20:49 +0000 (14:20 +1000)]
r600g: optimise draw vbo function a bit more.

this drop a bunch of unnecessary checks (i.e. should be trapped
at gallium level), and also removes the switch statement in favour
of some calculated values for the vgt values.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: reorder LIT instructions to support src == dst
Pierre-Eric Pelloux-Prayer [Mon, 20 Jun 2011 09:42:23 +0000 (11:42 +0200)]
r600g: reorder LIT instructions to support src == dst

the attached patch should be an improvement over Vadim Girlin's patch
fixing LIT instruction for r600g (commit
2fe39b46e73aea37152777fe11d489e0b1bc3f92).

Instructions used in tgsi_lit have been reordered to always write to a
dst channel after the same channel in src has been read (so if src ==
dst, input values are not overwritten before being used).

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agonvfx: nasty hack to make glFinish() actually finish..
Ben Skeggs [Tue, 21 Jun 2011 02:55:01 +0000 (12:55 +1000)]
nvfx: nasty hack to make glFinish() actually finish..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoglx: Fix compile.
Stéphane Marchesin [Tue, 21 Jun 2011 00:18:32 +0000 (17:18 -0700)]
glx: Fix compile.

13 years agost/mesa: Remove unneeded texture format terminators.
Stéphane Marchesin [Mon, 20 Jun 2011 23:31:03 +0000 (16:31 -0700)]
st/mesa: Remove unneeded texture format terminators.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: put const qualifer on format_map table
Brian Paul [Tue, 21 Jun 2011 00:07:28 +0000 (18:07 -0600)]
st/mesa: put const qualifer on format_map table

13 years agoglx: Bind to our context before __glXSetCurrentContext
Jeremy Huddleston [Fri, 17 Jun 2011 19:24:55 +0000 (12:24 -0700)]
glx: Bind to our context before __glXSetCurrentContext

We want to bind to our context before calling __glXSetCurrentContext or
messing with the gc rect in order to properly handle error conditions.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglx: Destroy the old context only after the new one has been bound
Jeremy Huddleston [Fri, 17 Jun 2011 19:28:05 +0000 (12:28 -0700)]
glx: Destroy the old context only after the new one has been bound

This fixes a regression introduced by 49d7e48b33264d94e30af6129c281b6acafa9427

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglx: Allow a context-specific fallback for glXGetProcAddress
Jeremy Huddleston [Wed, 15 Jun 2011 07:27:55 +0000 (00:27 -0700)]
glx: Allow a context-specific fallback for glXGetProcAddress

In applegl, GLX advertises the same extensions provided by OpenGL.framework
even if such extensions are not provided by glapi.  This allows a client
to get access to such API.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of Frame...
Jeremy Huddleston [Thu, 16 Jun 2011 00:30:56 +0000 (17:30 -0700)]
glapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of FramebufferTextureLayerEXT

FramebufferTextureLayer is an alias of FramebufferTextureLayerEXT, so
FramebufferTextureLayerARB needs to be listed as an alias of
FramebufferTextureLayerEXT rather than FramebufferTextureLayer.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agolinker: Reject shaders that use too many varyings
Ian Romanick [Thu, 9 Jun 2011 20:31:32 +0000 (13:31 -0700)]
linker: Reject shaders that use too many varyings

Previously it was up to the driver or later code generator to reject
these shaders.  It turns out that nobody did this.

This will need changes to support geometry shaders.

NOTE: This is a candidate for the stable branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37743
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglw: Mark all extern symbols GLAPI to regain default visibility (#31294)
Dan Nicholson [Thu, 16 Jun 2011 23:32:42 +0000 (16:32 -0700)]
glw: Mark all extern symbols GLAPI to regain default visibility (#31294)

Since switching to hidden visibility on gcc, GLw apps were failing to
link. Use the GLAPI definition to use default visibility where necessary.

$ nm lib/libGLw.so | grep DrawingArea
0000000000004020 T GLwCreateMDrawingArea
0000000000003430 T GLwDrawingAreaMakeCurrent
0000000000003410 T GLwDrawingAreaSwapBuffers
0000000000204c60 D glwDrawingAreaClassRec
0000000000204d48 D glwDrawingAreaWidgetClass
00000000002053c0 D glwMDrawingAreaClassRec
00000000002054e0 D glwMDrawingAreaWidgetClass

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: justin <jlec@gentoo.org>
13 years agoi965/gen6: Apply documented workaround for nonpipelined state packets.
Eric Anholt [Sat, 18 Jun 2011 01:44:26 +0000 (18:44 -0700)]
i965/gen6: Apply documented workaround for nonpipelined state packets.

Fixes a 100% reproducible GPU hang in topogun-1.06-orc-84k.trace.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965/gen6: Limit the workaround flush to once per primitive.
Eric Anholt [Sat, 18 Jun 2011 01:24:56 +0000 (18:24 -0700)]
i965/gen6: Limit the workaround flush to once per primitive.

We're about to call this function in a bunch of state emits, so let's
not spam the hardware with flushes too hard.

13 years agoi965/gen6: Use an BO instead of writing to address 0 for PIPE_CONTROL W/A.
Eric Anholt [Sat, 18 Jun 2011 01:20:36 +0000 (18:20 -0700)]
i965/gen6: Use an BO instead of writing to address 0 for PIPE_CONTROL W/A.

This was spectacularly unsafe.  On my system, address 0 happens to be
the hardware status page for the render ring, and the first quadword
of that happens to contain nothing we ever look at, but I sure didn't
look forward to having to debug some day when, for example, the kernel
happened to bind the ringbuffer before binding the hwsp.

13 years agoi965/gen6: Factor the PIPE_CONTROL workaround to a separate function.
Eric Anholt [Sat, 18 Jun 2011 01:13:02 +0000 (18:13 -0700)]
i965/gen6: Factor the PIPE_CONTROL workaround to a separate function.

We're need this workaorund a lot more than we're currently doing, so
let's reuse it.