mesa.git
12 years agoMake sure libGL.so links with libglsl
Matt Turner [Tue, 31 Jan 2012 16:54:24 +0000 (11:54 -0500)]
Make sure libGL.so links with libglsl

Can't link against *.la files if we're not using libtool to link.

Fixes undefined symbol: _ZN23ir_hierarchical_visitor5visitEP11ir_variable

12 years agovl: fix some missing prototypes error
Christian König [Tue, 31 Jan 2012 13:49:07 +0000 (14:49 +0100)]
vl: fix some missing prototypes error

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45444
Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agoosmesa: set RefCount = 1 in new_osmesa_renderbuffer()
Brian Paul [Tue, 31 Jan 2012 14:44:53 +0000 (07:44 -0700)]
osmesa: set RefCount = 1 in new_osmesa_renderbuffer()

This was lost during the renderbuffer overhaul work.  Fixes a failed
refcount assertion.

12 years agoosmesa: Fix osmesa_context.DataType type.
Vinson Lee [Sat, 28 Jan 2012 06:36:04 +0000 (07:36 +0100)]
osmesa: Fix osmesa_context.DataType type.

Fixes these GCC warnings.
osmesa.c: In function ‘osmesa_renderbuffer_storage’:
osmesa.c:417: warning: comparison is always false due to limited range of data type
osmesa.c:423: warning: comparison is always false due to limited range of data type
osmesa.c:431: warning: comparison is always false due to limited range of data type
osmesa.c:437: warning: comparison is always false due to limited range of data type
osmesa.c:447: warning: comparison is always false due to limited range of data type
osmesa.c:453: warning: comparison is always false due to limited range of data type
osmesa.c:463: warning: comparison is always false due to limited range of data type
osmesa.c:466: warning: comparison is always false due to limited range of data type
osmesa.c:476: warning: comparison is always false due to limited range of data type
osmesa.c:479: warning: comparison is always false due to limited range of data type

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agovega: memset data array to zero to silence uninitialized var warnings
Brian Paul [Tue, 31 Jan 2012 14:01:29 +0000 (07:01 -0700)]
vega: memset data array to zero to silence uninitialized var warnings

12 years agoInitialize only native LLVM Disassembler.
ojab [Tue, 31 Jan 2012 07:43:37 +0000 (11:43 +0400)]
Initialize only native LLVM Disassembler.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agoRemove autoreconf generated files
Matt Turner [Sat, 28 Jan 2012 04:04:03 +0000 (23:04 -0500)]
Remove autoreconf generated files

Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agosrc/glsl/glcpp: wire up glcpp-test to make check
Matt Turner [Sun, 29 Jan 2012 03:42:04 +0000 (22:42 -0500)]
src/glsl/glcpp: wire up glcpp-test to make check

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoglcpp-test: don't return failure if valgrind tests aren't run
Matt Turner [Sun, 29 Jan 2012 03:08:39 +0000 (22:08 -0500)]
glcpp-test: don't return failure if valgrind tests aren't run

Success was (tests-passed AND valgrind-tests-passed) but this meant that
if the valgrind tests weren't run it would be considered a failure.

The logic is now (tests-passed AND (!valgrind OR valgrind-tests-passed))
which lets us return success if the valgrind tests aren't run.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoautomake: src/glsl and src/glsl/glcpp
Matt Turner [Fri, 27 Jan 2012 05:02:47 +0000 (00:02 -0500)]
automake: src/glsl and src/glsl/glcpp

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoautoconf: use AC_PROG_YACC/LEX
Matt Turner [Fri, 13 Jan 2012 19:31:39 +0000 (14:31 -0500)]
autoconf: use AC_PROG_YACC/LEX

Needed for automake. Using AC_PROG_PATH(bison/flex) causes automake to
fail to build .y and .l files.

It is up to the builder to use bison/flex instead of yacc/lex.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoglsl: rename Makefile.sources' _SOURCES variables
Matt Turner [Sun, 29 Jan 2012 01:13:51 +0000 (20:13 -0500)]
glsl: rename Makefile.sources' _SOURCES variables

automake uses variables named *_SOURCES.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agoautomake: src/mesa/drivers/osmesa
Matt Turner [Fri, 27 Jan 2012 03:37:06 +0000 (22:37 -0500)]
automake: src/mesa/drivers/osmesa

12 years agoglsl: Rename class variable_entry to ir_variable_refcount_entry.
Kenneth Graunke [Sun, 29 Jan 2012 00:58:37 +0000 (16:58 -0800)]
glsl: Rename class variable_entry to ir_variable_refcount_entry.

Exporting a publicly visible class with a generic name like
"variable_entry" via ir_variable_refcount.h is kind of mean.

Many IR transformers would like to define their own "variable_entry"
class.  If they accidentally include this header, the compiler/linker
may get confused and try to instantiate the wrong variable_entry class,
leading to bizarre runtime crashes.

The hope is that renaming this one will allow .cpp files to safely
declare and use their own file-scope "variable_entry" classes.

This avoids crashes caused by converting src/glsl to automake.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-and-tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agor600g: get rid of r600_context_reg
Marek Olšák [Sun, 29 Jan 2012 16:18:09 +0000 (17:18 +0100)]
r600g: get rid of r600_context_reg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use r600_context_reg on r6xx-r7xx
Marek Olšák [Sun, 29 Jan 2012 16:17:08 +0000 (17:17 +0100)]
r600g: don't use r600_context_reg on r6xx-r7xx

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use r600_context_reg on evergreen
Marek Olšák [Sun, 29 Jan 2012 15:56:02 +0000 (16:56 +0100)]
r600g: don't use r600_context_reg on evergreen

Just getting rid of things which use the register mask.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: get rid of the mask in r600_pipe_reg
Marek Olšák [Sun, 29 Jan 2012 06:39:08 +0000 (07:39 +0100)]
r600g: get rid of the mask in r600_pipe_reg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: get rid of the mask parameter in pipe_state_add_reg
Marek Olšák [Sun, 29 Jan 2012 06:34:25 +0000 (07:34 +0100)]
r600g: get rid of the mask parameter in pipe_state_add_reg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for TA_CNTL_AUX
Marek Olšák [Sun, 29 Jan 2012 06:21:03 +0000 (07:21 +0100)]
r600g: don't use register mask for TA_CNTL_AUX

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for PA_CL_CLIP_CNTL
Marek Olšák [Sun, 29 Jan 2012 06:16:10 +0000 (07:16 +0100)]
r600g: don't use register mask for PA_CL_CLIP_CNTL

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for PA_CL_VS_OUT_CNTL
Marek Olšák [Sun, 29 Jan 2012 05:31:47 +0000 (06:31 +0100)]
r600g: don't use register mask for PA_CL_VS_OUT_CNTL

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: set full register mask for PA_CL_CLIP_CNTL
Marek Olšák [Sun, 29 Jan 2012 05:04:14 +0000 (06:04 +0100)]
r600g: set full register mask for PA_CL_CLIP_CNTL

We don't set the other bits anywhere else.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for PA_SU_SC_MODE_CNTL
Marek Olšák [Sun, 29 Jan 2012 04:48:28 +0000 (05:48 +0100)]
r600g: don't use register mask for PA_SU_SC_MODE_CNTL

It's always emitted in draw_vbo.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't add PA_SC_LINE_STIPPLE to rasterizer_state
Marek Olšák [Sun, 29 Jan 2012 04:22:00 +0000 (05:22 +0100)]
r600g: don't add PA_SC_LINE_STIPPLE to rasterizer_state

It's always emitted in draw_vbo.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for CB_COLOR_CONTROL on r6xx-r7xx
Marek Olšák [Sun, 29 Jan 2012 03:17:30 +0000 (04:17 +0100)]
r600g: don't use register mask for CB_COLOR_CONTROL on r6xx-r7xx

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't set CB_TARGET_MASK in set_framebuffer_state
Marek Olšák [Sun, 29 Jan 2012 02:28:41 +0000 (03:28 +0100)]
r600g: don't set CB_TARGET_MASK in set_framebuffer_state

It's emitted in draw_vbo, always.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: set full register mask for CB_COLOR_CONTROL on evergreen
Marek Olšák [Sun, 29 Jan 2012 02:17:18 +0000 (03:17 +0100)]
r600g: set full register mask for CB_COLOR_CONTROL on evergreen

We don't set the other bits anywhere else.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: use a more clever way to disable per-vertex point size
Marek Olšák [Sat, 28 Jan 2012 14:05:06 +0000 (15:05 +0100)]
r600g: use a more clever way to disable per-vertex point size

This uses point size clamping to force point size to a particular value,
making the vertex shader output irrelevant.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for DB_RENDER_CONTROL
Marek Olšák [Sat, 28 Jan 2012 05:07:09 +0000 (06:07 +0100)]
r600g: don't use register mask for DB_RENDER_CONTROL

We don't set the other bits anywhere else except the other DSA states,
which are mutually-exclusive with this one.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: cleanup setting DB_SHADER_CONTROL
Marek Olšák [Sat, 28 Jan 2012 05:03:53 +0000 (06:03 +0100)]
r600g: cleanup setting DB_SHADER_CONTROL

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: rework and consolidate stencilref state setting
Marek Olšák [Sat, 28 Jan 2012 04:50:00 +0000 (05:50 +0100)]
r600g: rework and consolidate stencilref state setting

Stop using the register mask.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: don't use register mask for SQ_GPR_RESOURCE_MGMT_1
Marek Olšák [Sat, 28 Jan 2012 03:25:31 +0000 (04:25 +0100)]
r600g: don't use register mask for SQ_GPR_RESOURCE_MGMT_1

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agost/mesa: kill off point size clamping in vertex shaders
Marek Olšák [Fri, 27 Jan 2012 15:55:29 +0000 (16:55 +0100)]
st/mesa: kill off point size clamping in vertex shaders

This fixes the gl_PointSize transform feedback test.
Point size clamping should happen at the rasterizer stage,
i.e. after the vertex and geometry shaders and transform feedback.

Drivers are expected to do this by themselves.

12 years agor600g: set minimum point size to 1.0 for non-sprite non-aa points
Marek Olšák [Fri, 27 Jan 2012 20:20:27 +0000 (21:20 +0100)]
r600g: set minimum point size to 1.0 for non-sprite non-aa points

12 years agor300g: set minimum point size to 1.0 for non-sprite non-aa points
Marek Olšák [Fri, 27 Jan 2012 19:45:33 +0000 (20:45 +0100)]
r300g: set minimum point size to 1.0 for non-sprite non-aa points

12 years agosvga: set POINTSIZEMIN to 1.0 for non-sprite non-aa points
Marek Olšák [Fri, 27 Jan 2012 19:29:15 +0000 (20:29 +0100)]
svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa points

v2: add the helper function, improve the condition

12 years agost/mesa: simplify initialization of light_twoside
Marek Olšák [Fri, 27 Jan 2012 23:59:13 +0000 (00:59 +0100)]
st/mesa: simplify initialization of light_twoside

Core Mesa does this for us, see update_two_size in state.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: consolidate general ubyte texstore code
Brian Paul [Mon, 30 Jan 2012 03:32:04 +0000 (20:32 -0700)]
mesa: consolidate general ubyte texstore code

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: use _mesa_pack_ubyte_rgba_rect() in texstore code
Brian Paul [Mon, 30 Jan 2012 02:51:28 +0000 (19:51 -0700)]
mesa: use _mesa_pack_ubyte_rgba_rect() in texstore code

Simplifies the general case code in the ubyte-valued texture format
functions.  More consolidation to come in subsequent commits.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: added _mesa_pack_ubyte_rgba_rect()
Brian Paul [Mon, 30 Jan 2012 02:47:37 +0000 (19:47 -0700)]
mesa: added _mesa_pack_ubyte_rgba_rect()

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agodri: Add a default drirc to be installed to provide application workarounds.
Eric Anholt [Wed, 25 Jan 2012 22:22:03 +0000 (14:22 -0800)]
dri: Add a default drirc to be installed to provide application workarounds.

Specifially, this being present works around a bug in Unigine
Sanctuary on i965 which previously resulted in bad rendering.

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Add a driconf option to force GLSL extension behavior to "warn".
Eric Anholt [Wed, 25 Jan 2012 22:13:13 +0000 (14:13 -0800)]
i965: Add a driconf option to force GLSL extension behavior to "warn".

This can be used to work around broken application behavior, like in
Unigine where it attempts to use texture arrays without declaring
either "#extension GL_EXT_texture_array : enable" or "#version 130".

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add a flag for forcing all GLSL extensions to "warn".
Eric Anholt [Wed, 18 Jan 2012 20:14:09 +0000 (12:14 -0800)]
mesa: Add a flag for forcing all GLSL extensions to "warn".

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agointel: Use libdrm's decode functionality instead of the gpu-tools copy.
Eric Anholt [Tue, 20 Dec 2011 22:42:48 +0000 (14:42 -0800)]
intel: Use libdrm's decode functionality instead of the gpu-tools copy.

While typing out the new decode, I added a fallback mode for dumping
when we fail to re-map the BO after execution.  This should get us a
minimal dump when trying to dump a batch that results in a GPU hang.

12 years agoi965: Fix segfault with INTEL_DEBUG=batch on gen7 with samplers present.
Eric Anholt [Fri, 27 Jan 2012 21:19:02 +0000 (13:19 -0800)]
i965: Fix segfault with INTEL_DEBUG=batch on gen7 with samplers present.

This was a leftover from the conversion of this file for state streaming.

12 years agoi965/vs: Avoid allocating registers in to the gen7 MRF hack region.
Eric Anholt [Fri, 27 Jan 2012 20:59:24 +0000 (12:59 -0800)]
i965/vs: Avoid allocating registers in to the gen7 MRF hack region.

This is the corresponding fix to the previous one for the FS, but I
don't have a particular test for it.

NOTE: This is a candidate for the 8.0 branch.

12 years agoi965/fs: Fix rendering corruption in unigine tropics.
Eric Anholt [Fri, 27 Jan 2012 20:54:11 +0000 (12:54 -0800)]
i965/fs: Fix rendering corruption in unigine tropics.

We were allocating registers into the MRF hack region, resulting in
sparkly renering in a few of the scenes.  We could do better
allocation by making an MRF class, having MRFs conflict with the
corresponding GRFs, and tracking the live intervals of the "MRF"s and
setting up the conflicts.  But this is way easier for the moment.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautoconf: Enable missing-prototypes errors when available.
Eric Anholt [Fri, 27 Jan 2012 02:48:20 +0000 (18:48 -0800)]
autoconf: Enable missing-prototypes errors when available.

After the removal of the dri driver link test, this should help avoid
the original problem that it was designed to catch: The warning about
a missing prototype due to typoing a function name scrolling by in the
Mesa build spew, and you not noticing until you try to run an
application and it falls back to swrast.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoRename R300_NO_TCL envvar to RADEON_NO_TCL
Matt Turner [Mon, 30 Jan 2012 18:58:10 +0000 (13:58 -0500)]
Rename R300_NO_TCL envvar to RADEON_NO_TCL

The envvar works for R100 and R200 too, and the classic R300 driver
doesn't even exist anymore.

"RADEON_NO_TCL" is already mentioned in the code and is the same envvar
used for the R300g driver.

12 years agogallivm: Don't use C99 member initializers.
José Fonseca [Mon, 30 Jan 2012 19:05:58 +0000 (19:05 +0000)]
gallivm: Don't use C99 member initializers.

12 years agogallivm: Move declaration before code.
José Fonseca [Mon, 30 Jan 2012 18:59:29 +0000 (18:59 +0000)]
gallivm: Move declaration before code.

12 years agoUse only native engine & bitwriter LLVM libraries for linking.
ojab [Mon, 30 Jan 2012 08:34:46 +0000 (12:34 +0400)]
Use only native engine & bitwriter LLVM libraries for linking.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agogallivm: Add a new interface for doing TGSI->LLVM conversions
Tom Stellard [Fri, 12 Aug 2011 16:42:41 +0000 (12:42 -0400)]
gallivm: Add a new interface for doing TGSI->LLVM conversions

lp_bld_tgsi_soa.c has been adapted to use this new interface, but
lp_bld_tgsi_aos.c has only been partially adapted, since nothing in
gallium currently uses it.

v2:
- Rename lp_bld_tgsi_action.[ch] => lp_bld_tgsi_action.[ch]
- Initialize tgsi_info in lp_bld_tgsi_aos.c
- Fix copyright dates

12 years agogallium: Move duplicated helper macros to tgsi_exec.h
Tom Stellard [Sat, 14 Jan 2012 14:09:54 +0000 (09:09 -0500)]
gallium: Move duplicated helper macros to tgsi_exec.h

12 years agogallium: Prefix #defines in tgsi_exec.h with TGSI_
Tom Stellard [Sat, 14 Jan 2012 13:46:05 +0000 (08:46 -0500)]
gallium: Prefix #defines in tgsi_exec.h with TGSI_

12 years agogallium: Unify defines of CHAN_[XYZW] in tgsi_exec.h
Tom Stellard [Sat, 14 Jan 2012 13:31:04 +0000 (08:31 -0500)]
gallium: Unify defines of CHAN_[XYZW] in tgsi_exec.h

12 years agogallivm: Add function lp_bld_gather_values()
Tom Stellard [Wed, 11 Jan 2012 18:05:16 +0000 (13:05 -0500)]
gallivm: Add function lp_bld_gather_values()

12 years agotgsi: Add output_mode to struct tgsi_opcode_info v2
Tom Stellard [Fri, 6 Jan 2012 22:38:37 +0000 (17:38 -0500)]
tgsi: Add output_mode to struct tgsi_opcode_info v2

v2:
- Rename output_type to output_mode
- Add shorthand definitions for TGSI_OUTPUT_*

12 years agost/dri: Support 24bit formats in dri2_allocate_buffer
Benjamin Franzke [Sun, 29 Jan 2012 16:28:50 +0000 (17:28 +0100)]
st/dri: Support 24bit formats in dri2_allocate_buffer

Prior commit 576161289df68eedade591fbca4013329c9e5ded,
the parameter format was bpp, thus both 24bit and 32bit formats were
requested with format set to 32. Handle 24bit seperately now.

Fixes RGBX formats in wayland platform for egl_dri2 (EGL_ALPHA_SIZE=0).

Note: This is a candidate for the 8.0 branch.

12 years agomesa/format_unpack: add LUMINANCE 8/16 UINT/INT
Dave Airlie [Sun, 29 Jan 2012 16:25:16 +0000 (16:25 +0000)]
mesa/format_unpack: add LUMINANCE 8/16 UINT/INT

This just copies what the LUMINANCE_ALPHA bits do.

Fixes piglit tests on softpipe complaining about missing unpack.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix udiv/idiv/umod/imod on cayman
Dave Airlie [Mon, 23 Jan 2012 13:38:24 +0000 (13:38 +0000)]
r600g: fix udiv/idiv/umod/imod on cayman

Cayman needs some of the MUL instructions spread across a full slot
of vectors.

It also no longer has RECIP_UINT, the recommendation is to replace it
with a U2F + RECIP_IEEE + MUL + F2U.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: enable blend_bypass for uint/sint
Dave Airlie [Sun, 29 Jan 2012 19:38:28 +0000 (19:38 +0000)]
r600g: enable blend_bypass for uint/sint

12 years agor600g: fix fragcoord.w test on cayman
Dave Airlie [Mon, 30 Jan 2012 13:19:14 +0000 (13:19 +0000)]
r600g: fix fragcoord.w test on cayman

12 years agor600g: remove unused streamout code
Marek Olšák [Mon, 30 Jan 2012 00:03:43 +0000 (01:03 +0100)]
r600g: remove unused streamout code

12 years agor600g: disable printing debug info for streamout
Marek Olšák [Mon, 30 Jan 2012 00:01:37 +0000 (01:01 +0100)]
r600g: disable printing debug info for streamout

12 years agogallium: remove trailing comma to silence warning
Brian Paul [Sun, 29 Jan 2012 22:02:43 +0000 (15:02 -0700)]
gallium: remove trailing comma to silence warning

12 years agoadd wayland cflags when building wayland-egl
Juan Zhao [Sun, 29 Jan 2012 22:46:41 +0000 (14:46 -0800)]
add wayland cflags when building wayland-egl

to fix the header file missing when building wayland-egl

12 years agonvfx,nv50,nvc0: handle PIPE_CAP_GLSL_FEATURE_LEVEL
Christoph Bumiller [Sun, 29 Jan 2012 12:24:11 +0000 (13:24 +0100)]
nvfx,nv50,nvc0: handle PIPE_CAP_GLSL_FEATURE_LEVEL

12 years agodri: don't link with DRICORE_LIB_DEPS
Matt Turner [Sun, 29 Jan 2012 03:00:29 +0000 (22:00 -0500)]
dri: don't link with DRICORE_LIB_DEPS

DRI_LIB_DEPS is sufficient since it includes DRICORE_LIB_DEPS

12 years agoscons: don't add -Wmissing-field-initializers
Marek Olšák [Wed, 25 Jan 2012 13:08:16 +0000 (14:08 +0100)]
scons: don't add -Wmissing-field-initializers

The warning is absolutely useless. It doesn't actually say that there are
uninitialized variables. It points out the fact that there are missing
initializers and that variables are initialized to zero implicitly, which is
exactly what we want and what we commonly make use of.

C90 and C99 require all unspecified variables in the initializer list to be set
to zero.

12 years agost/mesa: use table-driven approach to exposing extensions for formats (v3)
Marek Olšák [Wed, 25 Jan 2012 00:01:54 +0000 (01:01 +0100)]
st/mesa: use table-driven approach to exposing extensions for formats (v3)

The check for ctx->API was unnecessary, because OES extensions are not exposed
in desktop GL.

Also require renderbuffer support for ARB_texture_rgb10_a2ui,
as per the spec.

Tested by comparing old and new glxinfo with softpipe and r600g.

v2: fix bugs
v3: rename need_only_one -> need_at_least_one
    rename num_elements -> num_mappings
    add comments
    use const when appropriate

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: use table-driven approach to exposing extensions based on CAPs
Marek Olšák [Tue, 24 Jan 2012 22:16:50 +0000 (23:16 +0100)]
st/mesa: use table-driven approach to exposing extensions based on CAPs

This change is not exactly equivalent (sometimes we checked for non-zero,
sometimes if >0 or >1), but the behavior shouldn't change, because all drivers
report 0 for unsupported CAPs.

Exposing CAP_STREAM_OUTPUT_PAUSE_RESUME without CAP_MAX_STREAM_OUTPUT_BUFFERS
is a driver bug and st/mesa does no checking if the latter is supported as
well. Drivers must report CAPs consistently.

v2: make the array const

12 years agost/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.c
Marek Olšák [Tue, 24 Jan 2012 21:23:01 +0000 (22:23 +0100)]
st/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.c

v2: handle the cap in r300 and r600 as well

Additional info for r600g:
   The env var R600_GLSL130=1 enables GLSL 1.3.
   Along with R600_STREAMOUT=1, it enables full GL 3.

12 years agostate_stracker: Fix access to uninitialized memory.
Mathias Fröhlich [Sat, 28 Jan 2012 17:55:08 +0000 (18:55 +0100)]
state_stracker: Fix access to uninitialized memory.

Fix an access to uninitialized memory pointed out by valgrind in
glsl_to_tgsi_visitor::simplify_cmp(void).

Note: This is a candidate for the 8.0 branch.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agodraw: Remove unused variables.
Vinson Lee [Sun, 15 Jan 2012 07:31:03 +0000 (23:31 -0800)]
draw: Remove unused variables.

Fix this GCC warning.
draw_pipe_clip.c: In function ‘interp’:
draw_pipe_clip.c:122:13: warning: variable ‘clip_dist’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix linear and flat interpolation
Vadim Girlin [Tue, 24 Jan 2012 19:32:50 +0000 (23:32 +0400)]
r600g: fix linear and flat interpolation

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi965: fix inverted point sprite origin when rendering to FBO
Yuanhan Liu [Thu, 19 Jan 2012 23:48:52 +0000 (07:48 +0800)]
i965: fix inverted point sprite origin when rendering to FBO

When rendering to FBO, rendering is inverted. At the same time, we would
also make sure the point sprite origin is inverted. Or, we will get an
inverted result correspoinding to rendering to the default winsys FBO.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44613

NOTE: This is a candidate for stable release branches.

v2: add the simliar logic to ivb, too (comments from Ian)
    simplify the logic operation (comments from Brian)

v3: pick a better comment from Eric
    use != for the logic instead of ^ (comments from Ian)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: remove byteswap check in fast_read_rgba_pixels_memcpy()
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: remove byteswap check in fast_read_rgba_pixels_memcpy()

It's handled by _mesa_format_matches_format_and_type() now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb9_e5, r11_g11_b10f, argb2101010_uint functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb332, signed rgba8888, signed rgba888_rev functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgba5551, argb1555, argb2101010 formats.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb565, argb8888, rgb888, argb4444 functions.

12 years agomesa: use _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: use _mesa_format_matches_format_and_type() in texstore code

This simplifies the code quite a bit, consolidates some cases and
possibly catches more cases for the memcpy path.

More such changes will follow.  Do just a few at a time to help bisect
any possible regressions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: implement more cases in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: implement more cases in _mesa_format_matches_format_and_type()

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: use swapBytes parameter in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: use swapBytes parameter in _mesa_format_matches_format_and_type()

This will let us use memcpy in more situations.  We can also remove
the checks for byte spapping that happen before the calls to
_mesa_format_matches_format_and_type().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: added swapBytes parameter to _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: added swapBytes parameter to _mesa_format_matches_format_and_type()

Not actually used yet though.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: rewrite, simplify some of the logic in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: rewrite, simplify some of the logic in _mesa_format_matches_format_and_type()

In preparation for adding GL_PACK/UNPACK_SWAP_BYTES support.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: add BGR888 code in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: add BGR888 code in _mesa_format_matches_format_and_type()

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: fix error in _mesa_format_matches_format_and_type() for RGB888
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: fix error in _mesa_format_matches_format_and_type() for RGB888

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove redundant byte swap check
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: remove redundant byte swap check

The outer conditional already did the test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove LSB-first pixel packing check in glReadPixels
Brian Paul [Fri, 27 Jan 2012 03:01:10 +0000 (20:01 -0700)]
mesa: remove LSB-first pixel packing check in glReadPixels

GL_UNPACK_LSB_FIRST only applies to bitmap data, not glReadPixels.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoswrast: Fix implicit declaration warnings
Chad Versace [Sat, 28 Jan 2012 00:44:26 +0000 (16:44 -0800)]
swrast: Fix implicit declaration warnings

In a recent commit,
    commit 1c0f1dd42a50464eeb81de4aad8eecf24b3d6c89
    Author: Chad Versace <chad.versace@linux.intel.com>
    swrast: Fix fixed-function fragment processing
I defined a new function,_swrast_fragment_program, but neglected
to #include s_fragprog.h for clients of that function.

Note: This is a candidate for the 8.0 branch.
Reported-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agor600g: remove unsupported evergreen CB formats
Alex Deucher [Fri, 27 Jan 2012 23:42:39 +0000 (18:42 -0500)]
r600g: remove unsupported evergreen CB formats

The evergreen+ CB no longer supports the following formats
compared to 6xx/7xx:
- COLOR_4_4
- COLOR_3_3_2
- COLOR_6_5_5
- COLOR_8_24_FLOAT
- COLOR_24_8_FLOAT
- COLOR_11_11_10
- COLOR_11_11_10_FLOAT

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agomesa: Avoid void * arithmetic.
José Fonseca [Fri, 27 Jan 2012 21:54:12 +0000 (21:54 +0000)]
mesa: Avoid void * arithmetic.

Should fix MSVC build.

12 years agoswrast: Fix fixed-function fragment processing
Chad Versace [Thu, 26 Jan 2012 03:38:10 +0000 (19:38 -0800)]
swrast: Fix fixed-function fragment processing

On i965, _mesa_ir_link_shader is never called. As a consequence, the
current fragment program (ctx->FragmentProgram->_Current) exists but is
invalid because it has no instructions. Yet swrast continued to attempt to
use the empty program.

To avoid using the empty program, this patch 1) defines a new function,
_swrast_use_fragment_program, which checks if the current fragment program
exists and differs from the fixed function fragment program, and, when
appropriate, 2) replaces checks of the form
    if (ctx->FragmentProgram->_Current == NULL)
with
    if (_swrast_use_fragment_program(ctx))

Fixes the following oglconform regressions on i965/gen6:
    api-fogcoord(basic.allCases.log)
    api-mtexcoord(basic.allCases.log)
    api-seccolor(basic.allCases.log)
    api-texcoord(basic.allCases.log)
    blend-separate(basic.allCases)
    colorsum(basic.allCases.log)

The tests were ran with the GLXFBConfig:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24 8  0  0  0  0  0 0 None

(Note: I originally believed that the hunk in
_swrast_update_fragment_program was unnecessary. But it is required to fix
blend-separate.)

Note: This is a candidate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327
Reveiwed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agomesa: set clamp bit in glGetTexImage for GL_UNSIGNED_NORMALIZED
Anuj Phogat [Wed, 25 Jan 2012 04:06:27 +0000 (20:06 -0800)]
mesa: set clamp bit in glGetTexImage for GL_UNSIGNED_NORMALIZED

Color clamping should be enabled in glGetTexImage if texture dataType is
GL_UNSIGNED_NORMALIZED and format is GL_LUMINANCE or GL_LUMINANCE_ALPHA

Fixes 2 Intel oglconform test cases: pxconv-gettex and pxtrans-gettex
https://bugs.freedesktop.org/show_bug.cgi?id=40864

NOTE: This is a candidate for the 8.0 branch

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Don't round-trip integer texture data through a floating point temp.
Eric Anholt [Tue, 24 Jan 2012 22:52:04 +0000 (14:52 -0800)]
mesa: Don't round-trip integer texture data through a floating point temp.

This was losing bits of precision.  Fixes (with the previous commits):
piglit EXT_texture_integer/getteximage-clamping
piglit EXT_texture_integer/getteximage-clamping GL_ARB_texture_rg
oglc advanced.mipmap.upload

Regresses oglc negative.typeFormatMismatch.teximage from fail to
abort, because it's been hitting texstore for a format/type combo that
shouldn't happen.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: When unpacking signed integer pixel data, don't clamp to 0.
Eric Anholt [Tue, 24 Jan 2012 22:48:56 +0000 (14:48 -0800)]
mesa: When unpacking signed integer pixel data, don't clamp to 0.

In the core, we always treat spans of int/uint data as uint, so this
extract function was truncating storage of integer pixel data to a n
int texture to (0, max_int) instead of (min_int, max_int).  There is
probably missing code for handling truncation on conversion between
pixel formats, still, but this does improve things.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add clamping for packing of integer data.
Eric Anholt [Tue, 24 Jan 2012 22:16:59 +0000 (14:16 -0800)]
mesa: Add clamping for packing of integer data.

Mostly fixes piglit EXT_texture_integer/getteximage-clamping.  The
remaining failure involves precision loss on storing of int32 texture
data (something I knew was an issue, but wasn't trying to test).

NOTE: This is a candidate for the 8.0 branch.

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