OSDN Git Service

android-x86/external-mesa.git
12 years agor600g: move SPI setup to PS setup
Vadim Girlin [Fri, 4 Nov 2011 17:24:03 +0000 (21:24 +0400)]
r600g: move SPI setup to PS setup

SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.

Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.

Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.

New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
12 years agor600g: precalculate semantic indices for SPI setup
Vadim Girlin [Fri, 4 Nov 2011 17:24:02 +0000 (21:24 +0400)]
r600g: precalculate semantic indices for SPI setup

There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.

TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
12 years agosvga: Tighten the register file assertions.
José Fonseca [Fri, 4 Nov 2011 20:07:26 +0000 (20:07 +0000)]
svga: Tighten the register file assertions.

Untested. But should fix fdo 42576.

12 years agoradeon/r200: strip texture borders.
Dave Airlie [Fri, 4 Nov 2011 17:13:53 +0000 (17:13 +0000)]
radeon/r200: strip texture borders.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon/r200: fix r100/r200 blit to use the offsets.
Dave Airlie [Fri, 4 Nov 2011 17:12:02 +0000 (17:12 +0000)]
radeon/r200: fix r100/r200 blit to use the offsets.

This is needed to do proper renderbuffer operation on mipmaps.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon: drop mtface/mtlevel, use ones in base class.
Dave Airlie [Fri, 4 Nov 2011 10:47:40 +0000 (10:47 +0000)]
radeon: drop mtface/mtlevel, use ones in base class.

This just uses the base class copies.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agou_vbuf_mgr: avoid one call to pipe_resource_reference in most cases
Marek Olšák [Fri, 4 Nov 2011 17:06:04 +0000 (18:06 +0100)]
u_vbuf_mgr: avoid one call to pipe_resource_reference in most cases

12 years agoswrast: Avoid void * arithmetic.
José Fonseca [Fri, 4 Nov 2011 08:54:55 +0000 (08:54 +0000)]
swrast: Avoid void * arithmetic.

An error with MSVC.

12 years agoi965/gen6: Improve glReadPixels() performance by blitting to a linear temp.
Eric Anholt [Wed, 19 Oct 2011 17:31:40 +0000 (10:31 -0700)]
i965/gen6: Improve glReadPixels() performance by blitting to a linear temp.

The readpixels microbenchmark in mesa-demos goes from 47Mpix/sec at
1000x1000 to 450Mpix/sec.  The 10x10 sizes stay about the same.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agointel: Add safety asserts for the blit engine's pitch alignment requirements.
Eric Anholt [Mon, 31 Oct 2011 23:59:05 +0000 (16:59 -0700)]
intel: Add safety asserts for the blit engine's pitch alignment requirements.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agointel: Don't force a batchbuffer flush in readpixels.
Eric Anholt [Wed, 19 Oct 2011 17:39:15 +0000 (10:39 -0700)]
intel: Don't force a batchbuffer flush in readpixels.

Renderbuffer mapping handles flushing the batchbuffer if required, so
all we need to do is make sure any pending rendering has reached the
batchbuffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoradeon: Remove early dereference of src/dst width in glCopyTexSubImage.
Eric Anholt [Mon, 17 Oct 2011 16:39:48 +0000 (09:39 -0700)]
radeon: Remove early dereference of src/dst width in glCopyTexSubImage.

There doesn't appear to be any particular reason for this -- it's not
like the width is changing between the deref and the use.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Drop the global mapping of buffers across glReadPixels().
Eric Anholt [Thu, 13 Oct 2011 17:34:56 +0000 (10:34 -0700)]
swrast: Drop the global mapping of buffers across glReadPixels().

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Drop the remaining GetRow-based glReadPixels() fast-path.
Eric Anholt [Thu, 13 Oct 2011 17:25:15 +0000 (10:25 -0700)]
swrast: Drop the remaining GetRow-based glReadPixels() fast-path.

In all of piglit, only two tests hit it (reading to RGBA float, where
GetRow would drop floats into place from R, RG, or RGB).  Mostly this
is because _ColorReadClamp has been causing transferOps to always be
set, skipping any fast-paths anyway.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Remove dead _swrast_read_depth_span_uint().
Eric Anholt [Thu, 13 Oct 2011 16:56:34 +0000 (09:56 -0700)]
swrast: Remove dead _swrast_read_depth_span_uint().

All the code using it is converted to MapRenderbuffer and the core
unpack functions.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Convert color glReadPixels slow path to using MapRenderbuffer.
Eric Anholt [Thu, 13 Oct 2011 00:05:20 +0000 (17:05 -0700)]
swrast: Convert color glReadPixels slow path to using MapRenderbuffer.

This may be a bit slower than before because we're switching from
per-format compiled loops in GetRow to
_mesa_unpack_rgba_block_unpack's loop around a callback to unpack a
pixel.  The solution there would be to make _mesa_unpack_rgba_block
fold the span loop into the format handlers.

(On the other hand, function call overhead will hardly matter if
MapRenderbuffer means the driver gets the data into cacheable memory
instead of uncached).

The adjust_colors code should no longer be required, since the unpack
function does the 565 to float conversion in a single pass instead of
converting it (poorly) through 8888 as apparently happened in the
past.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Skip _swrast_validate_derived in _swrast_ReadPixels().
Eric Anholt [Wed, 12 Oct 2011 23:55:23 +0000 (16:55 -0700)]
swrast: Skip _swrast_validate_derived in _swrast_ReadPixels().

None of the callgraph below this uses derived state (almost nothing
even dereferences the swrast context).

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Add a readpixels fast-path based on memcpy and MapRenderbuffer.
Eric Anholt [Wed, 12 Oct 2011 23:28:29 +0000 (16:28 -0700)]
swrast: Add a readpixels fast-path based on memcpy and MapRenderbuffer.

v2: Move _mesa_get_format_bytes out of the loop.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add a function for comparing gl_format to format/type.
Eric Anholt [Wed, 12 Oct 2011 23:18:14 +0000 (16:18 -0700)]
mesa: Add a function for comparing gl_format to format/type.

This should be useful in making more generic fast paths in the pixel
paths.

v2: Add note about PACK_SWAP_BYTES, and fix up for endianness by
    synchronizing with memcpy_texture paths in texstore.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Switch the remaining depth readpixels to MapRenderbuffer.
Eric Anholt [Wed, 12 Oct 2011 20:39:14 +0000 (13:39 -0700)]
swrast: Switch the remaining depth readpixels to MapRenderbuffer.

This avoids the wrapper, which should improve performance on packed
depth/stencil drivers.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Switch the remaining depth/stencil readpixels path to MapRenderbuffer.
Eric Anholt [Wed, 12 Oct 2011 20:25:24 +0000 (13:25 -0700)]
swrast: Switch the remaining depth/stencil readpixels path to MapRenderbuffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: MapRenderbuffer in separate depth/stencil readpixels fastpath
Eric Anholt [Wed, 12 Oct 2011 19:40:18 +0000 (12:40 -0700)]
swrast: MapRenderbuffer in separate depth/stencil readpixels fastpath

This introduces two new span helper functions we'll want to use in
several places as we move to MapRenderbuffer, which pull out integer
depth and stencil values from a renderbuffer mapping based on the
renderbuffer format.

v2: Use format_unpack helper for stencil read.
v3: Clean up comment after conversion to format_unpack.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Calculate image address/stride once for depth/stencil readpixels.
Eric Anholt [Wed, 12 Oct 2011 19:03:47 +0000 (12:03 -0700)]
swrast: Calculate image address/stride once for depth/stencil readpixels.

The fast and slow paths were doing these separately before.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Make the packed depth/stencil read fastpath use MapRenderbuffer.
Eric Anholt [Wed, 12 Oct 2011 03:41:01 +0000 (20:41 -0700)]
swrast: Make the packed depth/stencil read fastpath use MapRenderbuffer.

This also makes it handle 24/8 vs 8/24, fixing piglit
depthstencil-default_fb-readpixels-24_8 on i965.  While here, avoid
incorrectly fast-pathing if packing->SwapBytes is set.

v2: Move the unpack code to format_unpack.c, fix BUFFER_DEPTH typo
v3: Fix signed/unsigned comparison.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoswrast: Directly map the stencil buffer in read_stencil_pixels.
Eric Anholt [Wed, 12 Oct 2011 00:07:37 +0000 (17:07 -0700)]
swrast: Directly map the stencil buffer in read_stencil_pixels.

This avoids going through the wrapper that has to rewrite the data for
packed depth/stencil.  This isn't done in _swrast_read_stencil_span
because we don't want to map/unmap for each span.

v2: Move the unpack code to format_unpack.c.
v3: Fix signed/unsigned comparison.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoradeon: Fix variable initialization typo.
Vinson Lee [Thu, 3 Nov 2011 07:48:53 +0000 (00:48 -0700)]
radeon: Fix variable initialization typo.

Fixes Coverity uninitialized scalar variable defect.

12 years agoi965: Fix constant propagation into 32-bit integer MUL.
Paul Berry [Wed, 2 Nov 2011 03:35:23 +0000 (20:35 -0700)]
i965: Fix constant propagation into 32-bit integer MUL.

i965's MUL instruction can't take an immediate value as its first
argument.  So normally, if constant propagation wants to propagate a
constant into the first argument of a MUL instruction, it swaps the
order of the two arguments.

This doesn't work for 32-bit integer (and unsigned integer)
multiplies, because the MUL operation is asymmetric in that case (it
multiplies 16 bits of one operand by 32 bits of the other).

Fixes piglit tests {vs,fs}-multiply-const-{ivec4,uvec4}.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agosvga: use the draw-module's sprite stage depending on FS inputs
Brian Paul [Thu, 3 Nov 2011 23:40:56 +0000 (17:40 -0600)]
svga: use the draw-module's sprite stage depending on FS inputs

If we're drawing sprites and the fragment shader needs both auto-
generated texcoords and user-defined varying vars we need to use
this fallback path.
The reason is when we enable auto texcoord generation, it gets
enabled for all texcoord sets.  And that clobbers the user-defined
varying vars.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agosvga: pass fragment shader to draw module
Brian Paul [Thu, 3 Nov 2011 23:40:56 +0000 (17:40 -0600)]
svga: pass fragment shader to draw module

If we use the draw-module for wide point/line/etc drawing we'll need
a fragment shader too (like we pass in the vertex shader).

This fixes sprite point rendering when forcing the swtnl path.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agosvga: implement generic variable index remapping
Brian Paul [Thu, 3 Nov 2011 23:40:56 +0000 (17:40 -0600)]
svga: implement generic variable index remapping

The state tracker may generate shaders that use generic vs outputs /
fs inputs like:

DCL IN[0], GENERIC[0]
DCL IN[1], GENERIC[10]
DCL IN[2], GENERIC[11]

This patch remaps 0, 10, 11 to small integers like 1, 2, 3 so that we
stay inside the SVGA3D limit (8).

The remapping is done to both the vertex shader outputs and the
fragment shader inputs.  The same mapping must be used for a vs/fs
pair.

Note that 'union svga_compile_key' is now 'struct svga_compile_key'
because we needed to add the register remapping table.  The change in
size isn't really significant though (it's not a search key).

Also, add assertions when building up SVGA3D src/dst registers to we
don't try to store too large of value for the bitfield size.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agodraw: assert that we have non-null fragment shader
Brian Paul [Thu, 3 Nov 2011 22:55:18 +0000 (16:55 -0600)]
draw: assert that we have non-null fragment shader

Instead of just segfaulting.  Recently ran into this.

12 years agotexgetimage: add missing return on error
nobled [Wed, 19 Oct 2011 11:54:06 +0000 (07:54 -0400)]
texgetimage: add missing return on error

Missed this back in the arb_robustness branch
<6b329b9274b18c50f4177eef7ee087d50ebc1525>.

NOTE: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: fix texture target mix-up in NV_fragment_program parser
Brian Paul [Thu, 3 Nov 2011 16:39:26 +0000 (10:39 -0600)]
mesa: fix texture target mix-up in NV_fragment_program parser

The returned value should be a texture target index, not a bit.
I spotted this from seeing a new compiler warning caused by the increase
in the number of texture targets.  This has been broken for a long time.

Note: This is a candidate for the 7.11 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agolinker: Check that initializers for global variables match
Ian Romanick [Mon, 31 Oct 2011 21:31:07 +0000 (14:31 -0700)]
linker: Check that initializers for global variables match

This requires tracking a couple extra fields in ir_variable:

 * A flag to indicate that a variable had an initializer.

 * For non-const variables, a field to track the constant value of the
   variable's initializer.

For variables non-constant initalizers, ir_variable::has_initializer
will be true, but ir_variable::constant_initializer will be NULL.  The
linker can use the values of these fields to check adherence to the
GLSL 4.20 rules for shared global variables:

    "If a shared global has multiple initializers, the initializers
    must all be constant expressions, and they must all have the same
    value. Otherwise, a link error will result. (A shared global
    having only one initializer does not require that initializer to
    be a constant expression.)"

Previous to 4.20 the GLSL spec simply said that initializers must have
the same value.  In this case of non-constant initializers, this was
impossible to determine.  As a result, no vendor actually implemented
that behavior.  The 4.20 behavior matches the behavior of NVIDIA's
shipping implementations.

NOTE: This is candidate for the 7.11 branch.  This patch also needs
the preceding patch "glsl: Refactor generate_ARB_draw_buffers_variables
to use add_builtin_constant"

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34687
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
12 years agoglsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constant
Ian Romanick [Mon, 31 Oct 2011 21:43:27 +0000 (14:43 -0700)]
glsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constant

v2: Remove int cast based on feedback from Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
12 years agoglsl: Put all bitfields in ir_variable together for better packing
Ian Romanick [Mon, 31 Oct 2011 21:04:10 +0000 (14:04 -0700)]
glsl: Put all bitfields in ir_variable together for better packing

The diff looks weird because ir_variable::depth_layout was between the
last two bitfields in the structure.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
12 years agolinker: Fix the indentation of a block in cross_validate_globals
Ian Romanick [Mon, 31 Oct 2011 20:07:06 +0000 (13:07 -0700)]
linker: Fix the indentation of a block in cross_validate_globals

I suspect the indentation got messed up during a code merge.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
12 years agoradeon: Check an error return instead of assigning it to a dead variable.
Eric Anholt [Wed, 2 Nov 2011 21:38:05 +0000 (14:38 -0700)]
radeon: Check an error return instead of assigning it to a dead variable.

Fixes gcc set-but-unused-variable warning.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
12 years agor300g: force buffer placements to GTT on big endian machines
Marek Olšák [Thu, 3 Nov 2011 14:20:55 +0000 (15:20 +0100)]
r300g: force buffer placements to GTT on big endian machines

12 years agostate_trackers/vdpau: Add support for VC-1 decoding
Maarten Lankhorst [Mon, 31 Oct 2011 17:37:37 +0000 (18:37 +0100)]
state_trackers/vdpau: Add support for VC-1 decoding

Add a struct with all the fields.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agostate_trackers/vdpau: Add mpeg4 part2 to PipeToProfile and ProfileToPipe
Maarten Lankhorst [Mon, 31 Oct 2011 17:32:05 +0000 (18:32 +0100)]
state_trackers/vdpau: Add mpeg4 part2 to PipeToProfile and ProfileToPipe

So it can actually be used when someone implements it. :)

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agostate_trackers/vdpau: Add support for MPEG4 Part 2
Maarten Lankhorst [Mon, 31 Oct 2011 10:45:37 +0000 (11:45 +0100)]
state_trackers/vdpau: Add support for MPEG4 Part 2

Just the support patch, no decoder implements it currently.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agostate_trackers/vdpau: Test if profile is supported first before trying to create...
Maarten Lankhorst [Mon, 31 Oct 2011 09:26:02 +0000 (10:26 +0100)]
state_trackers/vdpau: Test if profile is supported first before trying to create decoder

So a nicer error message is returned.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agostate_trackers/vdpau: Add num_slices to mpeg12 picture structure
Maarten Lankhorst [Mon, 31 Oct 2011 09:24:34 +0000 (10:24 +0100)]
state_trackers/vdpau: Add num_slices to mpeg12 picture structure

Bitstream parsers might need that field.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agostate_trackers/vdpau: Implement VdpGenerateCSCMatrix
Maarten Lankhorst [Mon, 31 Oct 2011 09:23:03 +0000 (10:23 +0100)]
state_trackers/vdpau: Implement VdpGenerateCSCMatrix

With the smpte240 profile, which was missing.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agog3dvl: remove some stale variable increment
Christian König [Wed, 2 Nov 2011 12:54:05 +0000 (13:54 +0100)]
g3dvl: remove some stale variable increment

Incrementing "td" before initializing it is
pointless and just leads to an uninitialized
variable warning with MSVC.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agor600g: more integer support
Dave Airlie [Wed, 12 Oct 2011 09:01:57 +0000 (10:01 +0100)]
r600g: more integer support

just some more trivial integer changes for r600/r700.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon: fix some regressions in texturing code.
Dave Airlie [Wed, 2 Nov 2011 14:06:44 +0000 (14:06 +0000)]
radeon: fix some regressions in texturing code.

On a piglit run vs 7.11 this fixes 23 tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoscons: Use -static-libstdc++ on 32bits builds w/ Mingw-w64 too.
José Fonseca [Thu, 3 Nov 2011 09:58:52 +0000 (09:58 +0000)]
scons: Use -static-libstdc++ on 32bits builds w/ Mingw-w64 too.

12 years agolibgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics.
José Fonseca [Thu, 3 Nov 2011 09:38:43 +0000 (09:38 +0000)]
libgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics.

12 years agodocs: list GL_OES_EGL_image_external in 7.12 release notes
Chia-I Wu [Tue, 1 Nov 2011 04:06:28 +0000 (12:06 +0800)]
docs: list GL_OES_EGL_image_external in 7.12 release notes

12 years agost/mesa: add support for GL_OES_EGL_image_external
Chia-I Wu [Sat, 22 Oct 2011 16:53:21 +0000 (00:53 +0800)]
st/mesa: add support for GL_OES_EGL_image_external

To pipe drivers, external textures are just 2D textures.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa: add support for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:52:38 +0000 (18:52 +0800)]
mesa: add support for GL_OES_EGL_image_external

This is an OpenGL ES specific extension.  External textures are textures that
may be sampled from, but not be updated (no glTexSubImage* and etc.).  The
image data are taken from an EGLImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa: clean up validate_texture_wrap_mode
Chia-I Wu [Sat, 22 Oct 2011 11:56:54 +0000 (19:56 +0800)]
mesa: clean up validate_texture_wrap_mode

GL_TEXTURE_RECTANGLE_NV (and soon GL_TEXTURE_EXTERNAL_OES) is special.  Handle
it in its own if-block.  There should be no functional change.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa: fix a logic error in glFramebufferTexture2D
Chia-I Wu [Sat, 22 Oct 2011 14:17:31 +0000 (22:17 +0800)]
mesa: fix a logic error in glFramebufferTexture2D

Unrecognized texture target should give an error.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoglsl: add support for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:51:06 +0000 (18:51 +0800)]
glsl: add support for GL_OES_EGL_image_external

This extension introduces a new sampler type: samplerExternalOES.
texture2D (and texture2DProj) can be used to do a texture look up in an
external texture.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: add GL_OES_EGL_image_external to the extension list
Chia-I Wu [Sun, 23 Oct 2011 10:51:13 +0000 (18:51 +0800)]
mesa: add GL_OES_EGL_image_external to the extension list

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa: add missing defines for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:36:04 +0000 (18:36 +0800)]
mesa: add missing defines for GL_OES_EGL_image_external

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa, i965: prepare for more than 8 texture targets
Chia-I Wu [Sun, 23 Oct 2011 10:29:17 +0000 (18:29 +0800)]
mesa, i965: prepare for more than 8 texture targets

3-bit fields are used store texture target in several places.  That will fail
when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is
added.  Make them 4-bit fields.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoglapi: regenerate files
Chia-I Wu [Sat, 22 Oct 2011 12:47:37 +0000 (20:47 +0800)]
glapi: regenerate files

12 years agoglapi: add entry points for OES_EGL_image_external
Chia-I Wu [Sat, 22 Oct 2011 12:46:32 +0000 (20:46 +0800)]
glapi: add entry points for OES_EGL_image_external

Only enums actually.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoGLES: upgrade glext.h to revision 13240
Chia-I Wu [Sat, 22 Oct 2011 14:02:07 +0000 (22:02 +0800)]
GLES: upgrade glext.h to revision 13240

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoswrast: simplify the condition test for _swrast_choose_texture_sample_func
Yuanhan Liu [Wed, 2 Nov 2011 06:46:06 +0000 (14:46 +0800)]
swrast: simplify the condition test for _swrast_choose_texture_sample_func

remove another long if condition test. I don't feel a strong need of
this patch. But for it make the code a little simpler(I do think so),
I send it out.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: fix the low limit of width and height for glRenderbufferStorage
Yuanhan Liu [Tue, 25 Oct 2011 07:36:59 +0000 (15:36 +0800)]
mesa: fix the low limit of width and height for glRenderbufferStorage

glRenderbufferStorage man page says:

  GL_INVALID_VALUE is generated if either of width or height is negative,
  or greater than the value of GL_MAX_RENDERBUFFER_SIZE.

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>
12 years agomesa: fix inital value for new renderbuffer
Yuanhan Liu [Tue, 25 Oct 2011 07:28:50 +0000 (15:28 +0800)]
mesa: fix inital value for new renderbuffer

EXT_framebuffer_object bspec says:

    Get Value                          Type    Get Command  Initial Value
    -------------------------------    ------  -----------       -----------
    RENDERBUFFER_INTERNAL_FORMAT_EXT   Z+     GetRenderbufferParameterivEXT  RGBA

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>
12 years agomesa: complete the GL_TEXTURE_SWIZZLE* setup
Yuanhan Liu [Fri, 21 Oct 2011 03:27:25 +0000 (11:27 +0800)]
mesa: complete the GL_TEXTURE_SWIZZLE* setup

The ARB_texture_swizzle spec says:
    The error INVALID_OPERATION is generated if TexParameteri,
    TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname>
    is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G,  TEXTURE_SWIZZLE_B,
    or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA,
    ZERO, or ONE.

    The error INVALID_OPERATION is generated if TexParameteriv, or
    TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four
    consecutive values pointed to by <param> are not all RED, GREEN, BLUE,
    ALPHA, ZERO, or ONE.

So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v)

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>
12 years agomesa: remove the redundant check
Yuanhan Liu [Fri, 21 Oct 2011 03:24:18 +0000 (11:24 +0800)]
mesa: remove the redundant check

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodriconf: updated german translation
Carl-Philip Haensch [Tue, 30 Aug 2011 09:46:01 +0000 (11:46 +0200)]
driconf: updated german translation

12 years agodriconf: updated de.po
Carl-Philip Haensch [Tue, 30 Aug 2011 09:46:00 +0000 (11:46 +0200)]
driconf: updated de.po

12 years agowglSetPixelFormat should ignore the ppfd parameter.
Morgan Armand [Wed, 2 Nov 2011 19:12:39 +0000 (20:12 +0100)]
wglSetPixelFormat should ignore the ppfd parameter.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agor300g: Fix queries on big endian hosts.
Michel Dänzer [Wed, 2 Nov 2011 15:39:17 +0000 (16:39 +0100)]
r300g: Fix queries on big endian hosts.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
12 years agogallium/util: Add macros for converting from little endian to CPU byte order.
Michel Dänzer [Wed, 2 Nov 2011 17:21:48 +0000 (18:21 +0100)]
gallium/util: Add macros for converting from little endian to CPU byte order.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoi965: Add support for integral vertex attributes.
Paul Berry [Tue, 1 Nov 2011 00:31:16 +0000 (17:31 -0700)]
i965: Add support for integral vertex attributes.

When a vertex shader input attribute is declared with an integral type
(e.g. ivec4), we need to ensure that the generated vertex shader code
addresses the vertex attribute register using the proper register
type.  (Previously, we assumed all vertex shader input attributes were
floating-point).

In addition, when uploading vertex data that was specified with
VertexAttribIPointer, we need to instruct the vertex fetch unit to
convert the data to signed or unsigned int, rather than float.  And
when filling in the implied w=1 on a vector with less than 4
components, we need to fill it in with the integer representation of 1
rather than the floating-point representation of 1.

Fixes piglit tests vs-attrib-{ivec4,uvec4}-precision.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Set the "Integer" field of gl_client_array properly.
Paul Berry [Tue, 1 Nov 2011 00:29:17 +0000 (17:29 -0700)]
mesa: Set the "Integer" field of gl_client_array properly.

This patch ensures that gl_client_array::Integer is properly set to
GL_TRUE for vertex attributes specified using glVertexAttribIPointer,
and to GL_FALSE for vertex attributes specified using
glVertexAttribPointer, so that the vertex attributes can be
interpreted properly by driver back-ends.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoglsl: Fix type mismatch when incrementing or decrementing uint.
Paul Berry [Tue, 1 Nov 2011 01:22:48 +0000 (18:22 -0700)]
glsl: Fix type mismatch when incrementing or decrementing uint.

When converting an expression like "++x" to GLSL IR we were failing to
account for the possibility that x might be an unsigned integral type.
As a result the user would receive a bogus error message "Could not
implicitly convert operands to arithmetic operator".

Fixes piglit tests {vs,fs}-{increment,decrement}-uint.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agogallium/dri: Remove references to vblank.
José Fonseca [Wed, 2 Nov 2011 16:16:50 +0000 (16:16 +0000)]
gallium/dri: Remove references to vblank.

12 years agoFix gallium dri compile and a merge conflict
Kristian Høgsberg [Wed, 2 Nov 2011 16:01:23 +0000 (12:01 -0400)]
Fix gallium dri compile and a merge conflict

12 years agosvga: Tag cursors with the scanout hint
Jakob Bornecrantz [Tue, 1 Nov 2011 04:10:17 +0000 (05:10 +0100)]
svga: Tag cursors with the scanout hint

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agodri: Remove unused memops.h
Kristian Høgsberg [Fri, 28 Oct 2011 21:47:53 +0000 (17:47 -0400)]
dri: Remove unused memops.h

12 years agodri: Remove a few unused dri helper functions
Kristian Høgsberg [Fri, 28 Oct 2011 21:44:01 +0000 (17:44 -0400)]
dri: Remove a few unused dri helper functions

12 years agodri: Remove unused dri texmem.c
Kristian Høgsberg [Fri, 28 Oct 2011 21:39:40 +0000 (17:39 -0400)]
dri: Remove unused dri texmem.c

12 years agodri: Move _dri_texformat_* to radeon_texture.c
Kristian Høgsberg [Fri, 28 Oct 2011 21:35:16 +0000 (17:35 -0400)]
dri: Move _dri_texformat_* to radeon_texture.c

They are only used by the r200 driver now.

12 years agor200: Don't use driIsTextureResident helper
Kristian Høgsberg [Fri, 28 Oct 2011 21:04:35 +0000 (17:04 -0400)]
r200: Don't use driIsTextureResident helper

With DRI2, textures are always resident and using the DRI texmem helper
here is broken anyway, since nothing else uses it.

12 years agodri: Drop unused dri renderbuffer helper functions
Kristian Høgsberg [Fri, 28 Oct 2011 20:51:11 +0000 (16:51 -0400)]
dri: Drop unused dri renderbuffer helper functions

12 years agodri: Move driUpdateFramebufferSize to dri_util.c
Kristian Høgsberg [Fri, 28 Oct 2011 20:49:44 +0000 (16:49 -0400)]
dri: Move driUpdateFramebufferSize to dri_util.c

drirenderbuffer.[ch] is going bye-bye.

12 years agodri: Remove unnecessary #defines and #includes
Kristian Høgsberg [Fri, 28 Oct 2011 20:27:12 +0000 (16:27 -0400)]
dri: Remove unnecessary #defines and #includes

12 years agodri: Remove unnecessary timestamp pointer indirection
Kristian Høgsberg [Fri, 28 Oct 2011 20:22:03 +0000 (16:22 -0400)]
dri: Remove unnecessary timestamp pointer indirection

12 years agodri: Remove unused fields from __DriverAPIRec
Kristian Høgsberg [Fri, 28 Oct 2011 20:03:11 +0000 (16:03 -0400)]
dri: Remove unused fields from __DriverAPIRec

12 years agodri: Remove dri2.enabled flag
Kristian Høgsberg [Fri, 28 Oct 2011 19:56:15 +0000 (15:56 -0400)]
dri: Remove dri2.enabled flag

DRI2 is always enabled now.

12 years agodri: Remove DRI1 fields from DRI structs
Kristian Høgsberg [Fri, 28 Oct 2011 19:53:20 +0000 (15:53 -0400)]
dri: Remove DRI1 fields from DRI structs

12 years agodri: Remove remaining DRI1 vblank code
Kristian Høgsberg [Fri, 28 Oct 2011 19:47:41 +0000 (15:47 -0400)]
dri: Remove remaining DRI1 vblank code

12 years agodri: Remove cliprect information from __DRIdrawable
Kristian Høgsberg [Fri, 28 Oct 2011 19:40:01 +0000 (15:40 -0400)]
dri: Remove cliprect information from __DRIdrawable

12 years agodri: Drop unused driCalculateSwapUsage
Kristian Høgsberg [Fri, 28 Oct 2011 19:25:09 +0000 (15:25 -0400)]
dri: Drop unused driCalculateSwapUsage

12 years agodri: Remove unused driIntersectArea
Kristian Høgsberg [Fri, 28 Oct 2011 19:23:39 +0000 (15:23 -0400)]
dri: Remove unused driIntersectArea

12 years agodri: Drop __driUtilUpdateDrawableInfo and helper macros
Kristian Høgsberg [Fri, 28 Oct 2011 19:22:43 +0000 (15:22 -0400)]
dri: Drop __driUtilUpdateDrawableInfo and helper macros

12 years agodri: Remove unused driSwapBuffers
Kristian Høgsberg [Fri, 28 Oct 2011 19:18:22 +0000 (15:18 -0400)]
dri: Remove unused driSwapBuffers

12 years agodri: Drop unused driCreateNewContext
Kristian Høgsberg [Fri, 28 Oct 2011 19:17:20 +0000 (15:17 -0400)]
dri: Drop unused driCreateNewContext

12 years agodri: Fold driCreateNewDrawable into dri2CreateNewDrawable
Kristian Høgsberg [Fri, 28 Oct 2011 19:14:41 +0000 (15:14 -0400)]
dri: Fold driCreateNewDrawable into dri2CreateNewDrawable

12 years agodri: Remove unsused driCreateNewScreen
Kristian Høgsberg [Fri, 28 Oct 2011 19:11:15 +0000 (15:11 -0400)]
dri: Remove unsused driCreateNewScreen

12 years agodri: Remove unused __DRIswapInfoRec
Kristian Høgsberg [Fri, 28 Oct 2011 19:08:24 +0000 (15:08 -0400)]
dri: Remove unused __DRIswapInfoRec