mesa.git
12 years agog3dvl: extend the functionality of the compositor
Christian König [Thu, 1 Sep 2011 11:37:17 +0000 (13:37 +0200)]
g3dvl: extend the functionality of the compositor

Prepares for vdpau menu overlay.

12 years agogallium: add R8A8 and A8R8 UNORM formats
Christian König [Thu, 1 Sep 2011 16:36:21 +0000 (18:36 +0200)]
gallium: add R8A8 and A8R8 UNORM formats

They are mostly used for menu overlay in video decoding.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/xvmc: remove L4A4_UNORM workaround
Christian König [Tue, 30 Aug 2011 13:51:42 +0000 (15:51 +0200)]
st/xvmc: remove L4A4_UNORM workaround

This is no longer needed, since we now have native support for IA44 and AI44.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agor600g: add support for R4A4 and A4R4 textures.
Christian König [Tue, 30 Aug 2011 13:43:03 +0000 (15:43 +0200)]
r600g: add support for R4A4 and A4R4 textures.

Sampling worked out of the box, but this make them work as surface as well.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agogallium: try to cleanup a bit of the format mess created with pipe-video merge
Christian König [Tue, 30 Aug 2011 11:56:31 +0000 (13:56 +0200)]
gallium: try to cleanup a bit of the format mess created with pipe-video merge

Start with correctly defining IA44 and AI44 formats.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agowayland: Use wl_resource_* error functions
Kristian Høgsberg [Thu, 1 Sep 2011 13:54:10 +0000 (09:54 -0400)]
wayland: Use wl_resource_* error functions

12 years agoegl_dri2: Destroy callback in release_pending_buffer
Benjamin Franzke [Thu, 1 Sep 2011 07:17:04 +0000 (09:17 +0200)]
egl_dri2: Destroy callback in release_pending_buffer

12 years agowayland-drm: Fix compilation with wayland master
Benjamin Franzke [Thu, 1 Sep 2011 06:48:27 +0000 (08:48 +0200)]
wayland-drm: Fix compilation with wayland master

c661ecce introduced some not-yet-upstream stuff.

12 years agoswrast: get rid of needless do/while
Brian Paul [Thu, 1 Sep 2011 03:30:02 +0000 (21:30 -0600)]
swrast: get rid of needless do/while

12 years agomesa: fix broken store_texel() functions
Brian Paul [Thu, 1 Sep 2011 03:22:52 +0000 (21:22 -0600)]
mesa: fix broken store_texel() functions

This fixes the swrast failures for piglit's fbo-generatemipmap-formats
test (for uncompressed formats).  At some point down the road this code
will go away so I haven't checked all the other store_texel() functions.

12 years agointel: fix GLESv1 support
Chia-I Wu [Sun, 21 Aug 2011 13:47:28 +0000 (21:47 +0800)]
intel: fix GLESv1 support

Add intelInitExtensionsES1 to enable required and optional GLESv1
extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agointel: rename intel_extensions_es2.c to intel_extensions_es.c
Chia-I Wu [Sun, 21 Aug 2011 13:45:21 +0000 (21:45 +0800)]
intel: rename intel_extensions_es2.c to intel_extensions_es.c

We'd like to add intelInitExtensionsES1 to it later.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi915: build i915_dri.so for Android
Chia-I Wu [Wed, 31 Aug 2011 04:31:02 +0000 (12:31 +0800)]
i915: build i915_dri.so for Android

Simple demos such as test-opengl-gl_basic work.  SurfaceFlinger does not
work yet due to missing GL_OES_draw_texture support (and maybe more).

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agoi915: factor our source lists into Makefile.sources
Chia-I Wu [Wed, 31 Aug 2011 04:21:28 +0000 (12:21 +0800)]
i915: factor our source lists into Makefile.sources

In preparation for porting i915 to Android, factor its source lists into
a shared makefile. This prevents duplication of source lists, and hence
prevents the Android build from breaking as often.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agoi965: fix Android build
Chia-I Wu [Wed, 31 Aug 2011 04:31:59 +0000 (12:31 +0800)]
i965: fix Android build

Use $(TARGET_CC) instead of $(CC).  Correctly name and set LOCAL_CFLAGS.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agomesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.
Bryan Cain [Wed, 31 Aug 2011 22:28:53 +0000 (17:28 -0500)]
mesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.

This is a better, more fine-grained way of lowering if statements.  Fixes the
game And Yet It Moves on nv50.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agowayland: Track changes to drop wl_visual
Kristian Høgsberg [Wed, 31 Aug 2011 20:45:04 +0000 (16:45 -0400)]
wayland: Track changes to drop wl_visual

12 years agoegl_dri2: Only clear EGL_PIXMAP_BIT if DRI config is double buffered
Kristian Høgsberg [Wed, 31 Aug 2011 22:20:06 +0000 (18:20 -0400)]
egl_dri2: Only clear EGL_PIXMAP_BIT if DRI config is double buffered

We don't want to set the pixmap bit in the EGL config if the DRI
config we're adding is a double buffered config.  However, don't clear
any other bits the platform might pass in in the surface_type
argument.

12 years agowayland: Track server side wayland changes
Kristian Høgsberg [Mon, 22 Aug 2011 17:53:22 +0000 (13:53 -0400)]
wayland: Track server side wayland changes

12 years agowayland: Use new wl_callback mechanism
Kristian Høgsberg [Wed, 17 Aug 2011 02:38:22 +0000 (22:38 -0400)]
wayland: Use new wl_callback mechanism

12 years agomesa: fix comment typo: s/GL_SIGNED_NORMALED/GL_SIGNED_NORMALIZED/
Brian Paul [Wed, 31 Aug 2011 20:34:24 +0000 (14:34 -0600)]
mesa: fix comment typo: s/GL_SIGNED_NORMALED/GL_SIGNED_NORMALIZED/

12 years agoglsl: Use a separate div_to_mul_rcp lowering flag for integers.
Bryan Cain [Sat, 27 Aug 2011 23:32:58 +0000 (18:32 -0500)]
glsl: Use a separate div_to_mul_rcp lowering flag for integers.

Using multiply and reciprocal for integer division involves potentially
lossy floating point conversions.  This is okay for older GPUs that
represent integers as floating point, but undesirable for GPUs with
native integer division instructions.

TGSI, for example, has UDIV/IDIV instructions for integer division,
so it makes sense to handle this directly.  Likewise for i965.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Bryan Cain <bryancain3@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: bump max program local params, max uniforms limit
Brian Paul [Tue, 30 Aug 2011 20:24:55 +0000 (14:24 -0600)]
mesa: bump max program local params, max uniforms limit

Some driver support more than 1024.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoswrast: initialize program native limits
Brian Paul [Tue, 30 Aug 2011 20:24:15 +0000 (14:24 -0600)]
swrast: initialize program native limits

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi965/vs: Avoid the emit(), remove(), insert_before() for array instructions.
Eric Anholt [Sat, 27 Aug 2011 18:13:33 +0000 (11:13 -0700)]
i965/vs: Avoid the emit(), remove(), insert_before() for array instructions.

v2: Add generator instructions for the scratch opcodes.
    Add emit_before() for handling ->ir and ->annotation inheritance.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Move logic for weird CMP type handling to CMP generators.
Eric Anholt [Sat, 27 Aug 2011 17:59:43 +0000 (10:59 -0700)]
i965/vs: Move logic for weird CMP type handling to CMP generators.

v2: Don't bother with the no-dst-reg version of CMP()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Convert emit() calls to the new instruction generators.
Eric Anholt [Sat, 27 Aug 2011 17:52:16 +0000 (10:52 -0700)]
i965/vs: Convert emit() calls to the new instruction generators.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Convert gen6 userclip handling to new generators.
Eric Anholt [Sat, 27 Aug 2011 18:07:05 +0000 (11:07 -0700)]
i965/vs: Convert gen6 userclip handling to new generators.

This DP4 had one of its operands missing, so we were generating
garbage clip distances.  Using the per-opcode instruction generators
made it obvious.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Create instruction generators outside of the emit() functions.
Eric Anholt [Fri, 26 Aug 2011 23:43:06 +0000 (16:43 -0700)]
i965/vs: Create instruction generators outside of the emit() functions.

v2: Fixed gen6 IF().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoegl_dri2: Drop dri2_surface_type enum
Benjamin Franzke [Wed, 31 Aug 2011 09:40:50 +0000 (11:40 +0200)]
egl_dri2: Drop dri2_surface_type enum

Was only used in platform_wayland, and the remaining egl stack
uses _EGLSurface::Type with one of EGL_{WINDOW,PIXMAP,PBUFFER}_BIT.

12 years agoegl_dri2: add pbuffer support to platform_android
Chia-I Wu [Fri, 26 Aug 2011 16:00:18 +0000 (00:00 +0800)]
egl_dri2: add pbuffer support to platform_android

This is a simple change thanks to allocateBuffer.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agoegl_dri2: check the surface type in platform_android
Chia-I Wu [Fri, 26 Aug 2011 14:09:56 +0000 (22:09 +0800)]
egl_dri2: check the surface type in platform_android

Check the surface type is EGL_WINDOW_BIT before doing anything, in
preparation for pbuffer support.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agoegl_dri2: refactor droid_get_buffers_with_format
Chia-I Wu [Fri, 26 Aug 2011 15:49:04 +0000 (23:49 +0800)]
egl_dri2: refactor droid_get_buffers_with_format

Move the loop to parse attachments to its own function.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agoegl_dri2: set ctx->WindowRenderBuffer
Chia-I Wu [Fri, 26 Aug 2011 17:42:16 +0000 (01:42 +0800)]
egl_dri2: set ctx->WindowRenderBuffer

Set ctx->WindowRenderBuffer to EGL_BACK_BUFFER.  As EGL_WINDOW_BIT of a
config is set only when there is dri_double_buffer, that makes sure
window surfaces are always double-buffered and contexts will render to
the back buffer.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agonv50,nvc0: fix multisample format hack
Christoph Bumiller [Tue, 30 Aug 2011 21:44:27 +0000 (23:44 +0200)]
nv50,nvc0: fix multisample format hack

Advertising different format support based on sample count was a
bad idea, it made resolve to window work, but resolve to anything
else would fail.

See 9f4998639c3c47f0b7ee3e2a29b7f3609d3f7796.

12 years agointel: Restructure TexSubImage as just the 2D implementation and blit func.
Eric Anholt [Tue, 30 Aug 2011 17:31:41 +0000 (10:31 -0700)]
intel: Restructure TexSubImage as just the 2D implementation and blit func.

Fixes a segfault in piglit copyteximage where I accidentally removed
the dst_bo setup in the previous cleanup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40474
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Sean McNamara <gm.potato.ul@gmail.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agointel: Remove the passthrough TexSubImage[13]D functions.
Eric Anholt [Tue, 30 Aug 2011 17:33:23 +0000 (10:33 -0700)]
intel: Remove the passthrough TexSubImage[13]D functions.

All we need for these is _mesa_store_texsubimage[13]d(), since we
don't do the blit path.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi965/vs: Fix GL_FIXED setup when a writemask is present.
Eric Anholt [Tue, 23 Aug 2011 20:30:42 +0000 (13:30 -0700)]
i965/vs: Fix GL_FIXED setup when a writemask is present.

By emitting code before generate_code(), we ended up in align1 mode
where writemasks don't exist, so we rescaled gl_Vertex.w and things
went badly.  By moving GL_FIXED support to the visitor, we end up with
normal codegen, and as a bonus the GL_FIXED setup ends up getting
printed appropriately in debug output.

Fixes gtf/GL2Tests/fixed_data_type

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Pack live uniform vectors together in the push constant upload.
Eric Anholt [Tue, 23 Aug 2011 19:13:14 +0000 (12:13 -0700)]
i965/vs: Pack live uniform vectors together in the push constant upload.

At some point we need to also move uniform accesses out to pull
constants when there are just too many in use, but we lack tests for
that at the moment.

Fixes glsl-vs-large-uniform-array.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Track uniforms as separate vectors once we've done array access.
Eric Anholt [Tue, 23 Aug 2011 17:22:50 +0000 (10:22 -0700)]
i965/vs: Track uniforms as separate vectors once we've done array access.

This will make it easier to figure out which elements are totally
unused and not upload them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Don't lower uniform array indexing.
Eric Anholt [Mon, 22 Aug 2011 18:48:04 +0000 (11:48 -0700)]
i965/vs: Don't lower uniform array indexing.

This avoids the massive conditional move array access, and brings code
generation quality for the new VS backend into the realm of efficiency
of the old backend (roughly 20% more instructions generated than
before across shader-db, instead of assertion failing for generating
over 10,000 instructions on many shaders!).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Add support for pull constant loads for uniform arrays.
Eric Anholt [Mon, 22 Aug 2011 17:35:24 +0000 (10:35 -0700)]
i965/vs: Add support for pull constant loads for uniform arrays.

v2: reworked the instruction emit and made use of gen6_resolve_implied_move,
    from Ken's review

12 years agoi965/vs: Restructure emit() functions around a vec4_instruction constructor.
Eric Anholt [Fri, 26 Aug 2011 23:37:37 +0000 (16:37 -0700)]
i965/vs: Restructure emit() functions around a vec4_instruction constructor.

We sometimes want to put an instruction somewhere besides the end of
the instruction stream, and we also want per-opcode instruction
generation to enable compile-time checking of operands.

12 years agoi965: Make the old VS backend record pull constant references in pull_params[].
Eric Anholt [Mon, 22 Aug 2011 18:32:11 +0000 (11:32 -0700)]
i965: Make the old VS backend record pull constant references in pull_params[].

We'll be using that to track things for the new VS backend, and this will
avoid cluttering brw_vs_surface_state.c for it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Fix glGetUniform() type conversions.
Eric Anholt [Tue, 23 Aug 2011 20:46:12 +0000 (13:46 -0700)]
mesa: Fix glGetUniform() type conversions.

We were primarily failing to convert in the NativeIntegers case, which
this fixes.  However, we were also just truncating float uniforms when
converting to integer, which does not appear to be the correct
behavior.  Note, however, that the NVIDIA drivers also truncate
instead of rounding.

GL_DOUBLE return type is dropped because it was never used and
completely broken.  It can be added when there's test code.

Fixes piglit ARB_shader_objects/getuniform

v2: This is a rewrite of my previous glGetUniform patch, which Ken
    pointed out missed storage_type-based conversions to integer,
    which was totally broken still thanks to a typo in the testcase.
v3: Quote the spec justifying the rounding behavior.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Make the gl_constant_value's bool occupy the same space as float/int.
Eric Anholt [Fri, 19 Aug 2011 18:58:43 +0000 (11:58 -0700)]
mesa: Make the gl_constant_value's bool occupy the same space as float/int.

At least for Intel, all our uniform components are of uint32_t size, either
float or signed or unsigned int.  For uploading uniform data in the driver,
it's much easier to upload a full dword per uniform element instead of trying
to pick out the bool byte and then fill in the top 3 bytes of pad with 0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Use native integer uniforms when the new VS backend is in use.
Eric Anholt [Fri, 19 Aug 2011 18:51:43 +0000 (11:51 -0700)]
i965: Use native integer uniforms when the new VS backend is in use.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Move the flag for whether to use the new backend to the context.
Eric Anholt [Fri, 19 Aug 2011 18:42:50 +0000 (11:42 -0700)]
i965/vs: Move the flag for whether to use the new backend to the context.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Build i965_dri.so for Android
Chad Versace [Fri, 26 Aug 2011 22:35:47 +0000 (15:35 -0700)]
i965: Build i965_dri.so for Android

Compile tested only.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agoi965: Fix Android build by removing relative includes
Chad Versace [Fri, 26 Aug 2011 20:58:41 +0000 (13:58 -0700)]
i965: Fix Android build by removing relative includes

Replace each occurence of
    #include "../glsl/*.h"
with
    #include "glsl/*.h"

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agodri: Build libmesa_dri_common for Android
Chad Versace [Fri, 26 Aug 2011 23:00:33 +0000 (16:00 -0700)]
dri: Build libmesa_dri_common for Android

libmesa_dri_common is a static library that contains the sources in
src/mesa/drivers/dri/common. Each DRI driver should link to it.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agomake: Document imported variables
Chad Versace [Fri, 26 Aug 2011 22:48:29 +0000 (15:48 -0700)]
make: Document imported variables

In src/mesa/Android.mk, it is non-trivial to determine which variables are
imported by `include sources.mak`. So document them.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agomesa: Build libmesa_dricore.a for Android
Chad Versace [Fri, 26 Aug 2011 20:29:20 +0000 (13:29 -0700)]
mesa: Build libmesa_dricore.a for Android

libmesa_dricore.a is analogous to the libmesa.a built by the Autoconf
build.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agotnl: fix regression in bind_indices()
Brian Paul [Tue, 30 Aug 2011 15:49:00 +0000 (09:49 -0600)]
tnl: fix regression in bind_indices()

Commit 2ea1ff38164d95f8291ef2e5dfe2cb13936a60f2 caused the regression.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40413

12 years agotnl: add const qualifier to silence warning
Brian Paul [Tue, 30 Aug 2011 15:47:25 +0000 (09:47 -0600)]
tnl: add const qualifier to silence warning

12 years agotnl: use buffer helper functions to improve readbility
Brian Paul [Tue, 30 Aug 2011 15:44:47 +0000 (09:44 -0600)]
tnl: use buffer helper functions to improve readbility

12 years agomake: Factor out source lists from drivers/dri/common into Makefile.sources
Chad Versace [Fri, 26 Aug 2011 00:55:42 +0000 (17:55 -0700)]
make: Factor out source lists from drivers/dri/common into Makefile.sources

In order that the Autoconf and Android build can share the same source
lists, move the lists from
    src/mesa/drivers/dri/Makefile.defines
into
    src/mesa/drivers/dri/common/Makefile.sources

I would like for Android to just reuse Makefile.defines, but the file is
unsuitable for reuse.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off: Chad Versace <chad@chad-versace.us>

12 years agomake: Remove duplicate occurence of driverfuncs.c
Chad Versace [Fri, 26 Aug 2011 03:32:13 +0000 (20:32 -0700)]
make: Remove duplicate occurence of driverfuncs.c

driverfuncs.o is already contained in libmesa.a, so remove it from the
following source lists:
    src/mesa/drivers/dri/Makefiles.defines:COMMON_SOURCES.
    src/mesa/drivers/dri/swrast/Makefile:SWRAST_COMMON_SOURCES

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agomake: Remove duplicate defintion of COMMON_SOURCES in Radeon makefiles
Chad Versace [Sun, 28 Aug 2011 14:58:28 +0000 (07:58 -0700)]
make: Remove duplicate defintion of COMMON_SOURCES in Radeon makefiles

Remove defintion of COMMON_SOURCES from {r300,r660}/Makefile. The
defintion is a duplicate of that found in
src/mesa/drivers/dri/Makefile.defines.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
12 years agor600g: Make unaligned 3D textures work on +evergreen
Christian König [Mon, 29 Aug 2011 10:14:30 +0000 (12:14 +0200)]
r600g: Make unaligned 3D textures work on +evergreen

The layersize calculation is slightly different on +evergreen.
This makes mpeg2 video decoding and piglits texture-packed-formats
test work correctly on this hardware.

12 years agonouveau: use PRIu64 for printing uint64_t
Christoph Bumiller [Tue, 30 Aug 2011 12:41:13 +0000 (14:41 +0200)]
nouveau: use PRIu64 for printing uint64_t

12 years agonouveau/mm: move slabs to correct list on memory release
Christoph Bumiller [Tue, 30 Aug 2011 12:29:23 +0000 (14:29 +0200)]
nouveau/mm: move slabs to correct list on memory release

Should get rid of "destroying GPU memory cache with some buffers
still in use" message.

12 years agowinsys/radeon: Create async thread only once
Maarten Lankhorst [Sat, 27 Aug 2011 20:57:19 +0000 (22:57 +0200)]
winsys/radeon: Create async thread only once

I noticed that a thread was created for every time async flush was called, so I moved it and used some semaphores to synch.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agonvfx: use common NOUVEAU_RESOURCE_FLAG_LINEAR define
Christoph Bumiller [Tue, 30 Aug 2011 11:44:31 +0000 (13:44 +0200)]
nvfx: use common NOUVEAU_RESOURCE_FLAG_LINEAR define

12 years agonv50: add support for linear textures and render targets
Christoph Bumiller [Tue, 30 Aug 2011 11:08:27 +0000 (13:08 +0200)]
nv50: add support for linear textures and render targets

12 years agonv50: align pitch of linear surfaces correctly
Christoph Bumiller [Tue, 30 Aug 2011 11:06:03 +0000 (13:06 +0200)]
nv50: align pitch of linear surfaces correctly

12 years agonv50: handle TGSI_OPCODE_ROUND
Christoph Bumiller [Sat, 27 Aug 2011 19:00:39 +0000 (21:00 +0200)]
nv50: handle TGSI_OPCODE_ROUND

Will round to nearest-even.

12 years agonv50,nvc0: add states mask to state validation function
Christoph Bumiller [Sat, 27 Aug 2011 18:49:36 +0000 (20:49 +0200)]
nv50,nvc0: add states mask to state validation function

This prevents null dereferences in validation of interdependent
state after a switch to a pipe context where we mark all state
as dirty but where not all state is valid / set yet.

12 years agonv50,nvc0: reject R8G8B8A8/X8_UNORM for multisample surfaces
Christoph Bumiller [Sat, 27 Aug 2011 15:31:04 +0000 (17:31 +0200)]
nv50,nvc0: reject R8G8B8A8/X8_UNORM for multisample surfaces

The window system buffer will be BGRA and applications will try to
directly resolve to it, which would trigger an INVALID_OPERATION in
BlitFramebuffer if the multisample renderbuffer is RGBA.

12 years agomesa: update multisample state on _NEW_BUFFERS
Christoph Bumiller [Sat, 27 Aug 2011 15:28:01 +0000 (17:28 +0200)]
mesa: update multisample state on _NEW_BUFFERS

A change in sampleBuffers affects the final enable value.

12 years agoglu: Avoid defining conflicting DEBUG NDEBUG macros.
José Fonseca [Mon, 29 Aug 2011 13:18:26 +0000 (14:18 +0100)]
glu: Avoid defining conflicting DEBUG NDEBUG macros.

12 years agoglu: Fix build on mingw-w64.
José Fonseca [Mon, 29 Aug 2011 13:18:06 +0000 (14:18 +0100)]
glu: Fix build on mingw-w64.

12 years agoRemove dead Makefiles.
José Fonseca [Mon, 29 Aug 2011 12:59:18 +0000 (13:59 +0100)]
Remove dead Makefiles.

12 years agodocs: Update scons info regarding mingw.
José Fonseca [Mon, 29 Aug 2011 12:56:20 +0000 (13:56 +0100)]
docs: Update scons info regarding mingw.

12 years agoRemote *.mgw stuff.
José Fonseca [Mon, 29 Aug 2011 12:35:49 +0000 (13:35 +0100)]
Remote *.mgw stuff.

Totally broken, and deprecated by scons.

12 years agolibgl-gdi: Fix mingw-w64 build.
José Fonseca [Mon, 29 Aug 2011 12:28:41 +0000 (13:28 +0100)]
libgl-gdi: Fix mingw-w64 build.

Mingw-w64 actually seems to be closer to MSVC in terms of .DEF parsing.

12 years agost/wgl: Fix build on mingw-w64
José Fonseca [Mon, 29 Aug 2011 12:28:02 +0000 (13:28 +0100)]
st/wgl: Fix build on mingw-w64

Which already declares wglSwapMultipleBuffers and WGLSWAP.

12 years agogdi: Remove mesa_wgl.h
José Fonseca [Mon, 29 Aug 2011 12:26:36 +0000 (13:26 +0100)]
gdi: Remove mesa_wgl.h

All commonly used windows toolchains define wgl entrypoints in the windows
headers, and mesa_wgl.h not only is unnecessary but actually often stands
in the waydue to slight inconsistencies.

So remove it.

12 years agoscons: Prefer x86_64-w64-mingw32- prefix.
José Fonseca [Mon, 29 Aug 2011 12:21:24 +0000 (13:21 +0100)]
scons: Prefer x86_64-w64-mingw32- prefix.

This allows to use mingw-w64 binaries on debian systems which already
include a (typically incomplete) 64 cross compiler.

12 years agoxorg/xvmc: Only set decode buffer when available
Maarten Lankhorst [Sat, 27 Aug 2011 23:58:23 +0000 (01:58 +0200)]
xorg/xvmc: Only set decode buffer when available

The nouveau xvmc decoder doesn't need it.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agoglsl_to_tgsi: fix a reference leak on an error path
Marek Olšák [Thu, 25 Aug 2011 02:11:05 +0000 (04:11 +0200)]
glsl_to_tgsi: fix a reference leak on an error path

12 years agoi965: Avoid generating MOVs for most ir_assignment handling.
Kenneth Graunke [Fri, 26 Aug 2011 19:24:43 +0000 (12:24 -0700)]
i965: Avoid generating MOVs for most ir_assignment handling.

This is a port of vec4_visitor::try_rewrite_rhs_to_dst to fs_visitor.

Not only is this technique less invasive and more robust, it also
generates better code.  Over and above the previous technique, this
reduced instruction count in shader-db by 0.28% on average and 1.4% in
the best case.

In no case did this technique result in more code than the prior method.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
12 years agoi965/fs: Revert "Avoid generating MOVs for assignments for expressions."
Kenneth Graunke [Fri, 26 Aug 2011 19:05:07 +0000 (12:05 -0700)]
i965/fs: Revert "Avoid generating MOVs for assignments for expressions."

This reverts commit 53c89c67f33639afef951e178f93f4e29acc5d53, along with
the subsequent this->result = reg_undef additions it required.

Both Eric and I agree that the way he did this is really fragile; if you
forget to add this->result = reg_undef before calling accept(), it may
end up using the same register for two separate things, breaking things
in strange and mysterious ways.

The next commit will port over the new VS backend's method for solving
this problem, which is simpler, less intrusive, and still manages to
avoid MOVs in the common case.

12 years agomesa: Remove all mention of MESA_FORMAT_CI8
Ian Romanick [Fri, 26 Aug 2011 19:20:00 +0000 (12:20 -0700)]
mesa: Remove all mention of MESA_FORMAT_CI8

Nothing in Mesa supports color-index textures, and most of the other
infrastructure that could allow such support has already been removed.
This puts the final nail in the coffin.

Also clean out some GL_COLOR_INDEX comments in formats.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodri: Remove MESA_FORMAT_CI8 bits from drivers that don't do paletted textures
Ian Romanick [Mon, 20 Sep 2010 14:03:34 +0000 (07:03 -0700)]
dri: Remove MESA_FORMAT_CI8 bits from drivers that don't do paletted textures

This came from the "kill it with fire" discussion at XDS 2010.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoscons: add swrast/s_texture.c to the build
Brian Paul [Mon, 29 Aug 2011 17:37:13 +0000 (11:37 -0600)]
scons: add swrast/s_texture.c to the build

12 years agointel: Rely on Mesa core for the non-blit glTexSubImage* implementation.
Eric Anholt [Mon, 1 Aug 2011 21:37:19 +0000 (14:37 -0700)]
intel: Rely on Mesa core for the non-blit glTexSubImage* implementation.

It uses MapTextureImage() now, so we don't need our own mapping.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Convert texture debug dump function to using MapTextureImage().
Brian Paul [Mon, 1 Aug 2011 03:14:54 +0000 (20:14 -0700)]
mesa: Convert texture debug dump function to using MapTextureImage().

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agointel: Remove our custom _mesa_store_compressed_texsubimage2d().
Eric Anholt [Fri, 29 Jul 2011 23:40:29 +0000 (16:40 -0700)]
intel: Remove our custom _mesa_store_compressed_texsubimage2d().

Now that Mesa core knows how to map teximages, we no longer needed the
compressed paths here.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Convert texstore.c to accessing textures using MapTextureImage.
Brian Paul [Fri, 29 Jul 2011 23:25:23 +0000 (16:25 -0700)]
mesa: Convert texstore.c to accessing textures using MapTextureImage.

This continues to allocate texImage->Data as before, so
drivers calling these functions need to use that when present.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agonouveau: Add MapTextureImage() implementation.
Eric Anholt [Mon, 15 Aug 2011 17:20:25 +0000 (10:20 -0700)]
nouveau: Add MapTextureImage() implementation.

This is untested, but should be close to working since it's basically
a copy of nouveau_teximage_map().

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoradeon: Add MapTextureImage() implementation.
Eric Anholt [Mon, 1 Aug 2011 15:43:07 +0000 (08:43 -0700)]
radeon: Add MapTextureImage() implementation.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoradeon: Refactor the common texture hook setup to common code.
Eric Anholt [Mon, 1 Aug 2011 15:46:47 +0000 (08:46 -0700)]
radeon: Refactor the common texture hook setup to common code.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Add implementation of MapTextureImage/UnmapTextureImage.
Brian Paul [Fri, 29 Jul 2011 22:30:21 +0000 (15:30 -0700)]
swrast: Add implementation of MapTextureImage/UnmapTextureImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agointel: Add implementation of MapTextureImage/UnmapTextureImage.
Eric Anholt [Fri, 29 Jul 2011 21:35:01 +0000 (14:35 -0700)]
intel: Add implementation of MapTextureImage/UnmapTextureImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: Add implementation of MapTextureImage.
Brian Paul [Sat, 30 Jul 2011 00:25:38 +0000 (17:25 -0700)]
st/mesa: Add implementation of MapTextureImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add driver hooks for texture image mapping/unmapping.
Brian Paul [Fri, 15 Jul 2011 02:57:34 +0000 (20:57 -0600)]
mesa: Add driver hooks for texture image mapping/unmapping.

ctx->Driver.MapTextureImage() / UnmapTextureImage() will be called by
the glTex[Sub]Image(), glGetTexImage() functions, etc. when we're
accessing texture data, and also for software rendering when accessing
texture data.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Don't check for image->Data when freeing an image's contents.
Eric Anholt [Wed, 27 Jul 2011 21:40:08 +0000 (14:40 -0700)]
mesa: Don't check for image->Data when freeing an image's contents.

All driver implementations of FreeTextureImageBuffer already check
that Data != NULL and free it.  However, this means that we will also
free driver storage if the driver storage wasn't in the form of a Data
pointer.

This was produced by the following semantic patch:

@@
expression C;
expression T;
@@
- if (T->Data) {
- C->Driver.FreeTextureImageBuffer(C, T);
+ C->Driver.FreeTextureImageBuffer(C, T);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoRename some driver FreeTextureImageData functions to FreeTextureImageBuffer.
Eric Anholt [Wed, 27 Jul 2011 19:56:07 +0000 (12:56 -0700)]
Rename some driver FreeTextureImageData functions to FreeTextureImageBuffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Rename FreeTexImageData to FreeTextureImageBuffer.
Eric Anholt [Wed, 27 Jul 2011 19:29:48 +0000 (12:29 -0700)]
mesa: Rename FreeTexImageData to FreeTextureImageBuffer.

This was produced by sed, except for one hunk in driverfuncs.c where
trailing whitespace was dropped.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>