Commit graph

47936 commits

Author SHA1 Message Date
Brian Paul
e32ada1b26 swrast: add missing texfetch table entry for MESA_FORMAT_ARGB2101010_UINT
As with the other integer-valued formats, use NULL until we support
integer textures.

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

Tested-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-11-28 15:40:11 -07:00
Brian Paul
5c84e961e3 mesa: remove unused gl_texture_object::DriverData field 2011-11-28 10:07:19 -07:00
Brian Paul
c5012c1d56 mesa: handle MapTextureImage() failures in mipmap generation code
And handle potential malloc failures too.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:13:13 -07:00
Brian Paul
e984085299 mesa: handle MapTextureImage() failures in glGetTexImage code
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:13:13 -07:00
Brian Paul
1ad88fb42d mesa: handle MapTextureImage() failures in glTexImage code
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:13:13 -07:00
Brian Paul
e68994494b mesa: fix frag shader generation for alpha test with no color buffers
If alpha test is enabled and there's no color buffers we still need the
fragment shader to emit a color.

v2: add _NEW_COLOR flag in _mesa_update_state_locked()

Fixes piglit fbo-alphatest-nocolor-ff failures with Gallium drivers.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net> (i965)
2011-11-28 08:13:04 -07:00
Brian Paul
56b870e441 mesa: check for null ptr in _mesa_is_bufferobj()
This simplifies a few callers.  And it adds a bit of robustness.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-11-28 08:07:32 -07:00
Brian Paul
37bf720da4 mesa: move _mesa_base_format_has_channel() into image.c
This is where other format-related functions live.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:07:32 -07:00
Brian Paul
d45c9b239f mesa: combine GL_TEXTURE_INTENSITY/LUMINANCE_SIZE queries
Use the _mesa_base_format_has_channel() helper as we do for the
other texture format component queries.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:07:26 -07:00
Brian Paul
f0b6e9a729 mesa: use _mesa_base_format_has_channel() in fbobject.c queries
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 08:07:09 -07:00
Brian Paul
858d1f0b1c mesa: fix indexing error in unpack_Z32_FLOAT_X24S8()
The source array elements are 8-bytes (float + uint) so we need
to multiply the src index by 2 to get the right array stride.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-28 08:04:48 -07:00
Dave Airlie
ee47e19738 mesa/docs: add ARB_texture_rgb10_a2ui to relnotes/gl3.txt
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-28 09:40:53 +00:00
Dave Airlie
9f9c8592e6 st/mesa: add ARB_texture_rgb10_a2ui support
Add support to the state tracker format and extension enablement code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-28 09:40:53 +00:00
Dave Airlie
f449be660e mesa/format: add mesa MESA_FORMAT_ARGB2101010_UINT support.
This format is used in the ARB_texture_rgb10_a2ui spec.

It adds core mesa support, texformat + texstore support, format_unpack
and fbobject.c (all patches from list merged + fixed up).

also fixes some whitespace issues.

Parts were:
Reviewed-by: Eric Anholt <eric@anholt.net>

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-28 09:40:53 +00:00
Dave Airlie
47e2e36717 image/pack: fix missing GL_BGR(A)_INTEGER support.
These codepaths were missing the cases for BGR_INTEGER/BGRA_INTEGER.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-28 09:03:17 +00:00
Ian Romanick
537c687116 docs: Add 7.11.2 release notes and news 2011-11-27 14:17:40 -08:00
Dave Airlie
923f143335 image: fix legal types for packed integer formats.
After reading ARB_texture_rgb10_a2ui it appears the packed formats
for integer types are only specified via this extension, and not via
the original ones. So condition the checks on this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-27 20:44:01 +00:00
Dave Airlie
9608ef5dec r600g: add framebuffer support for 2/10/10/10 integer 2011-11-27 20:36:27 +00:00
Dave Airlie
d38768fe38 r600g: add int support for 2/10/10/10 format.
integer wasn't set properly for the non-uniform types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 19:32:05 +00:00
Dave Airlie
c33d2e6b08 docs/gl3: these two interfaces are complete now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 17:36:48 +00:00
Dave Airlie
b50e017ae1 pack: fix indentation (trivial)
just saw this while looking for other problems.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 17:36:22 +00:00
Dave Airlie
8c1037042f glapi: add ARB_texture_rgb10_a2ui support.
This just adds one enum.

regenerate enums.c.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 16:25:12 +00:00
Dave Airlie
ee7bc10391 gallium: add B10G10R10A2_UINT format
This format is used for ARB_texture_rgb10_a2ui extension.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 16:25:12 +00:00
Chia-I Wu
d4fcf67a3a mesa: add MESA_FORMAT_RGBX8888 and MESA_FORMAT_RGBX8888_REV
MESA_FORMAT_RGBX8888_REV is one of the opaque pixel formats used on Android.
Thanks to texture-from-pixmap, drivers may actually see texture images with
this format on Android.

MESA_FORMAT_RGBX8888 is added only for completeness.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: Move the new formats after MESA_FORMAT_ARGB8888_REV in gl_format.  I
      accidentally moved them to the wrong place when preparing the patch.]
2011-11-27 12:43:24 +08:00
Beren Minor
6baa5f10c0 egl_glx: Try first a default lookup for glXGetProcAddress before loading dynamic lib.
GLX functions are sometimes directly available in the current binary. In such
cases, we do not need any alternate library loaded using dlopen. Otherwise,
dlopen may find the wrong libGL library and get functions that conflicts with
the current loaded ones.

For example, on Debian Sid with nvidia binary drivers, using mesa's libEGL with
GLX driver leads to wrong glXGetFBConfigs symbol loaded (or loaded twice?),
which leads to "GLX: failed to create any config" error message as the
glXGetFBConfigs symbol seems to return garbage. If the binary is linked with
nvidia's libGL, the GLX symbols are already available.
Without this patch, convert_fbconfig (src/egl/drivers/glx/egl_glx.c:233) fails
for every config found, after glXGetFBConfigAttrib(... GLX_RENDER_TYPE, ...)
call, as the value returned has GLX_COLOR_INDEX_BIT and not GLX_RGBA_BIT.

[olv: initialize handle, prepend egl_glx to the commit log]
2011-11-27 11:22:24 +08:00
Chia-I Wu
496f68bb9d android: bring in i915_dri and i965_dri automatically
Add i915_dri and i965_dri to libGLES_mesa's LOCAL_REQUIRED_MODULES when
enabled.
2011-11-26 11:42:08 +08:00
Chia-I Wu
d2cd621086 android: pass -std=c99 by default
Several modules expect a C99 compiler already.  It is also the default for
Makefile build.
2011-11-26 11:42:08 +08:00
Chia-I Wu
4d3d6f76ff android: move libGLES_mesa build rules to src/egl/main/.
Keep the top-level Android.mk away from building modules.
2011-11-26 11:42:08 +08:00
Chia-I Wu
169ef48c85 android: clean up libglapi bulid rules a bit
Make the output prettier.  Make the rules reusable if we ever want to add
other modules, such as libGLESv2_mesa.
2011-11-26 11:42:01 +08:00
Thomas Hellstrom
dbf00812b0 st/xa: Kill a couple of compilation warnings
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:38:44 +01:00
Thomas Hellstrom
32b1641a59 st/xa, xa/vmwgfx: Generate exported symbol list from the st/xa symbols.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:38:36 +01:00
Thomas Hellstrom
4d04367eca st/xa, xa/vmwgfx: Use XA_EXPORT attribute to indicate global visibility
Also fix up Makefiles to use the default mesa compilation flags.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrants <jakob@vmware.com>
2011-11-25 16:38:16 +01:00
Thomas Hellstrom
404d2f9c86 st/xa, xa/vmwgfx: Set the right version on library suffix
Also remove some unused variables in the st/xa makefile.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:36:29 +01:00
Chia-I Wu
75cc24c876 android: add support for ICS
With ICS (Android 4.0), several headers and structs are renamed.  Define
ANDROID_VERSION so that we can choose a different path depending on the
platform version.

I've tested only softpipe and llvmpipe.  r600g is also reported to work.
2011-11-25 12:34:33 +08:00
Chia-I Wu
42c2c371d6 vbo: fix !FEATURE_beginend build
Fix a build error in GLES-only build.
2011-11-25 11:18:50 +08:00
Chia-I Wu
d3d3c12a95 st/egl: fix a crash in Android backend
There is no buffer and android_surface_present should be a no-op when
eglSwapBuffers is called twice in a row.
2011-11-25 11:18:02 +08:00
Brian Paul
24d25b55bf softpipe: s/int/unsigned/ to be consistent in alpha test code 2011-11-23 15:04:01 -07:00
Brian Paul
173427841a softpipe: remove pointless break stmt 2011-11-23 15:02:05 -07:00
Chad Versace
f99d5af03b i965/gen6: Fix GPU hang when using stencil buffer without depth
Enable the bit 3DSTATE_DEPTH_BUFFER.Tiled_Surface.  From the Sandybridge
PRM, Volume 2, Part 1, Section 7.5.5.1.1 3DSTATE_DEPTH_BUFFER, Bit 1.27
Tiled Surface:
   [DevGT+]: This field must be set to TRUE.

Fixes GPU hangs on the following Piglit tests:
   hiz-stencil-test-fbo-d0-s8
   hiz-stencil-read-fbo-d0-s8

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2011-11-23 11:03:31 -08:00
Eric Anholt
8d15268a61 i915: Fix complete texturing regression since 27505a105a
I had notes to myself to test gen3 and gen4, and then I tested gen4
and called it good.  Turns out I forgot to actually call the new
function on gen3.
2011-11-23 09:45:17 -08:00
Eric Anholt
87f12bb2d9 i915: Fix build since hiz merge.
v2: Guard against rb->mt being NULL, since we may enter the draw
regions path before intel_prepare_render() has been called to set
them.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1)
2011-11-23 09:44:58 -08:00
Brian Paul
ca4e664f21 mesa: fix incorrect error message in format_unpack.c 2011-11-23 08:40:46 -07:00
Vasily Khoruzhick
8265bb7fb8 i915g: don't set alpha to 1 for RGBX and BGRX
This patch fixes regression introduced in
1f3c5eae5c

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-23 11:32:13 +01:00
Brian Paul
fc144728c7 mesa: update comment for clear_teximage_fields() 2011-11-22 17:16:50 -07:00
Brian Paul
12dd5dedf5 gallium: remove trailing comma and unneeded comments in p_defines.h 2011-11-22 17:08:36 -07:00
Marek Olšák
a7c107f3bc mesa: re-implement unpacking of DEPTH_COMPONENT32F
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
2011-11-23 00:00:40 +01:00
Eric Anholt
27505a105a i915: Move the texture format setup for this driver out of shared code.
The i965 driver is now enabling all of these formats on its own from
the surface format table.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-22 13:58:39 -08:00
Eric Anholt
899e6ea8d3 i965: Drop intel_context.c's texture format set up for this driver.
This is a no-op change on gen6, but should result in some
actually-unsupported formats on gen4 no longer being chosen (like
RGBA_FLOAT32 now being RGBA_FLOAT16).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-22 13:58:39 -08:00
Eric Anholt
f8b13ba137 i965: Add support for ARGB2101010 rendering.
GL 3.0 specifies GL_RGB10_A2 as a required sized format for rendering
and texturing.

This introduces two piglit regressions: one due to fbo-mipmap-copypix
hitting swrast GetRow (we want to convert swrast to MapRenderbuffer),
and one due to fbo-blending-formats being too picky while leaving
dithering on.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-22 13:58:39 -08:00
Eric Anholt
b0a0f4bf14 i965: Add support for RGBA_16 unorm rendering.
GL 3.0 specifies GL_RGBA16 as a required sized format for rendering
and texturing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-22 13:58:39 -08:00