mesa.git
12 years agomesa: Add unpack_uint_z_row support for floating-point depth buffers
Ian Romanick [Wed, 18 Jan 2012 19:56:12 +0000 (11:56 -0800)]
mesa: Add unpack_uint_z_row support for floating-point depth buffers

This is a hack, and it will result in incorrect rendering.  However,
it does eliminate spurious warnings in several piglit CopyPixels tests
that involve floating-point depth buffers.

The real solution is to add a zf field to SWspan to store float Z
values.  When a float depth buffer is involved, swrast should also
populate the zf field.  I'll consider this post-8.0 work.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoRevert "Fix underlinking in libOSMesa since commit adefee5 "Always build shared glapi""
Brian Paul [Thu, 2 Feb 2012 15:14:35 +0000 (08:14 -0700)]
Revert "Fix underlinking in libOSMesa since commit adefee5 "Always build shared glapi""

This reverts commit 4e5a8937d1a1bfb2a3bd067ed01e036728675fc2.
... to fix build with --enable-osmesa

12 years agodraw: Avoid NULL pointer dereference when binding NULL fragment shaders.
José Fonseca [Thu, 2 Feb 2012 13:19:56 +0000 (13:19 +0000)]
draw: Avoid NULL pointer dereference when binding NULL fragment shaders.

Now that the draw module avoids flushing, it may flush precisely when
binding a NULL shader, so care must be taken when restoring the original
fragment shader.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomapi/glapi: Never use a generic no-op entry-point on Windows.
José Fonseca [Thu, 2 Feb 2012 10:44:10 +0000 (10:44 +0000)]
mapi/glapi: Never use a generic no-op entry-point on Windows.

When GLAPIENTRY is __stdcall (ie Windows), the stack is popped by the
callee making the number/type of arguments significant, therefore
using a generic no-op causes stack corruption for many entry-points.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agogallivm: Fix LLVM-2.7 build.
ojab [Wed, 1 Feb 2012 06:00:10 +0000 (10:00 +0400)]
gallivm: Fix LLVM-2.7 build.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
12 years agogallivm: Remove MSVC RT hack.
José Fonseca [Wed, 1 Feb 2012 14:38:28 +0000 (14:38 +0000)]
gallivm: Remove MSVC RT hack.

The hack never worked reliably, and docs/llvmpipe.html is quite clear on
the requirement of matching CRT when building LLVM and Mesa already.

12 years agomesa: fix maximum allowed proxy texture size condition
Anuj Phogat [Thu, 26 Jan 2012 03:05:45 +0000 (19:05 -0800)]
mesa: fix maximum allowed proxy texture size condition

width, height parameter in glTexImage2D() includes: texture image
width + 2 * border (if any). So when doing the texture size check
in _mesa_test_proxy_teximage() width and height should not exceed
maximum supported size for target texture type.
i.e. 1 << (ctx->Const.MaxTextureLevels - 1)

Texture border is anyway stripped out before it is given to intel
or gallium drivers.

This patch fixes Intel oglconform test case: max_values
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44970

Note: This is a candidate for mesa 8.0 branch.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agosvga: fix a crash happening before setting fragment shaders.
Zack Rusin [Wed, 1 Feb 2012 04:12:22 +0000 (23:12 -0500)]
svga: fix a crash happening before setting fragment shaders.

In certain situations API's will call pipe->clear which doesn't
require fragment shader, but then we'd try to verify the pipeline
and assume fragment shader was always set. This was leading to
crash when API would just call simple clear's before anything else.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agost-api: fix typos, whitespace, line wrapping
Brian Paul [Wed, 1 Feb 2012 21:02:35 +0000 (14:02 -0700)]
st-api: fix typos, whitespace, line wrapping

12 years agovbo: fix node_attrsz[] usage in vbo_bind_vertex_list()
Brian Paul [Wed, 1 Feb 2012 15:42:48 +0000 (08:42 -0700)]
vbo: fix node_attrsz[] usage in vbo_bind_vertex_list()

The node_attrsz[] array is initially copied from the node->attrsz[]
array but some values get rewritten.  Thereafter, we need to use the
node_attrsz[] values.

Fixes a bug when replaying a display list that uses generic vertex
array[16] (at least).

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agonv50: add assertions missed in earlier nv50 commit
Brian Paul [Wed, 1 Feb 2012 15:20:05 +0000 (08:20 -0700)]
nv50: add assertions missed in earlier nv50 commit

12 years agobuild: Note that we don't support srcdir != builddir
Colin Walters [Sat, 14 Jan 2012 14:16:20 +0000 (09:16 -0500)]
build: Note that we don't support srcdir != builddir

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonv50: use larger arrays to silence warnings and fix buffer overflows
Brian Paul [Tue, 31 Jan 2012 14:01:53 +0000 (07:01 -0700)]
nv50: use larger arrays to silence warnings and fix buffer overflows

The warnings were:
nv50_pc_regalloc.c: In function ‘pass_generate_phi_movs’:
nv50_pc_regalloc.c:423:41: warning: array subscript is above array bounds
codegen/nv50_ir_peephole.cpp: In member function ‘bool nv50_ir::MemoryOpt::replaceStFromSt(nv50_ir::Instruction*, nv50_ir::MemoryOpt::Record*)’:
codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds
codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds
codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds
codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds

And add some assertions to catch this sooner in debug builds.

12 years agomesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)
Brian Paul [Wed, 1 Feb 2012 01:24:07 +0000 (18:24 -0700)]
mesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)

This fixes a dangling texture object pointer bug hit via wglShareLists().
When we push the GL_TEXTURE_BIT state we may push references to the default
texture objects which are owned by the gl_shared_state object.  We don't
want to accidentally delete that shared state while the attribute stack
references shared objects.  So keep a reference to it.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agomesa: use new _mesa_reference_shared_state() function
Brian Paul [Wed, 1 Feb 2012 01:23:03 +0000 (18:23 -0700)]
mesa: use new _mesa_reference_shared_state() function

This cleans up the reference counting of shared context state.
The next patch will use this to fix an actual bug.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agomesa: remove stray comment in PopAttrib() code
Brian Paul [Tue, 31 Jan 2012 19:33:38 +0000 (12:33 -0700)]
mesa: remove stray comment in PopAttrib() code

12 years agoRevert "automake: src/mesa/drivers/osmesa"
Matt Turner [Wed, 1 Feb 2012 02:34:42 +0000 (21:34 -0500)]
Revert "automake: src/mesa/drivers/osmesa"

This reverts commit 275ac7e5c1fd6c1847a428192fe259e50690fced.

12 years agoRevert "automake: src/glsl and src/glsl/glcpp"
Matt Turner [Wed, 1 Feb 2012 02:33:59 +0000 (21:33 -0500)]
Revert "automake: src/glsl and src/glsl/glcpp"

This reverts commit 9947656168d09f9019600fccc42ca8e0de49b83a.

12 years agoRevert "src/glsl/glcpp: wire up glcpp-test to make check"
Matt Turner [Wed, 1 Feb 2012 02:33:21 +0000 (21:33 -0500)]
Revert "src/glsl/glcpp: wire up glcpp-test to make check"

This reverts commit 2bb9f9e1fda61fceb9284cbb4619d7e60e39f190.

12 years agoRevert "Make sure libGL.so links with libglsl"
Matt Turner [Wed, 1 Feb 2012 02:33:07 +0000 (21:33 -0500)]
Revert "Make sure libGL.so links with libglsl"

This reverts commit f53e7e981ef35ab64a084c8da6c67bd2d230fe33.

12 years agoRevert "glsl: Fix optimization tests after converting src/glsl to automake."
Matt Turner [Wed, 1 Feb 2012 02:32:33 +0000 (21:32 -0500)]
Revert "glsl: Fix optimization tests after converting src/glsl to automake."

This reverts commit ffe376d5a74dee837dc1a421de29ae551087630f.

12 years agor600g: shorten expressions accessing family and chip_class
Marek Olšák [Tue, 31 Jan 2012 06:47:41 +0000 (07:47 +0100)]
r600g: shorten expressions accessing family and chip_class

12 years agor300g: don't use pipe_context::winsys
Marek Olšák [Tue, 31 Jan 2012 06:44:22 +0000 (07:44 +0100)]
r300g: don't use pipe_context::winsys

12 years agor600g: remove unused variable num_dest_buffers
Marek Olšák [Tue, 31 Jan 2012 06:32:31 +0000 (07:32 +0100)]
r600g: remove unused variable num_dest_buffers

12 years agor600g: use the new code for streamout flush as well
Marek Olšák [Mon, 30 Jan 2012 08:29:40 +0000 (09:29 +0100)]
r600g: use the new code for streamout flush as well

12 years agor600g: rename r600_reg::flush_flags -> sbu_flags
Marek Olšák [Mon, 30 Jan 2012 08:12:33 +0000 (09:12 +0100)]
r600g: rename r600_reg::flush_flags -> sbu_flags

There is no other use for that.

12 years agor600g: fix computation of how many dwords is needed for a flush at the end of CS
Marek Olšák [Mon, 30 Jan 2012 08:11:01 +0000 (09:11 +0100)]
r600g: fix computation of how many dwords is needed for a flush at the end of CS

12 years agor600g: remove unused r600_reg::flush_mask
Marek Olšák [Mon, 30 Jan 2012 08:02:30 +0000 (09:02 +0100)]
r600g: remove unused r600_reg::flush_mask

12 years agor600g: remove more dead code
Marek Olšák [Mon, 30 Jan 2012 07:54:01 +0000 (08:54 +0100)]
r600g: remove more dead code

12 years agor600g: remove dead code for tracking relocations
Marek Olšák [Mon, 30 Jan 2012 07:39:32 +0000 (08:39 +0100)]
r600g: remove dead code for tracking relocations

12 years agor600g: remove unused flush code
Marek Olšák [Mon, 30 Jan 2012 07:34:13 +0000 (08:34 +0100)]
r600g: remove unused flush code

12 years agor600g: rework cache flushing
Marek Olšák [Mon, 30 Jan 2012 05:21:07 +0000 (06:21 +0100)]
r600g: rework cache flushing

This also significantly improves the RV670 flush by using the CB1 flush
*always* and also DEST_BASE_0_ENA, which appears to magically fix some tests.
I am not entirely sure, but it's possible that RV670 flushing is fixed
completely.

v2: fix cayman by flushing texture cache instead of vertex cache

Thanks to Dave Airlie for testing Cayman.

12 years agor600g: add a new simple API for state emission
Marek Olšák [Mon, 30 Jan 2012 00:23:14 +0000 (01:23 +0100)]
r600g: add a new simple API for state emission

12 years agor600g: remove redundant pm4 and pm4_cdwords in r600_context
Marek Olšák [Mon, 30 Jan 2012 03:08:15 +0000 (04:08 +0100)]
r600g: remove redundant pm4 and pm4_cdwords in r600_context

These only mirrored radeon_winsys_cs.

12 years agor600g: consolidate some context_draw code
Marek Olšák [Mon, 30 Jan 2012 01:00:51 +0000 (02:00 +0100)]
r600g: consolidate some context_draw code

12 years agor600g: remove the now-useless internal flush callback
Marek Olšák [Sun, 29 Jan 2012 22:40:23 +0000 (23:40 +0100)]
r600g: remove the now-useless internal flush callback

12 years agor600g: don't initialize the screen and winsys pointer twice
Marek Olšák [Sun, 29 Jan 2012 22:35:10 +0000 (23:35 +0100)]
r600g: don't initialize the screen and winsys pointer twice

12 years agor600g: merge r600_context with r600_pipe_context
Marek Olšák [Sun, 29 Jan 2012 22:25:42 +0000 (23:25 +0100)]
r600g: merge r600_context with r600_pipe_context

The split made no sense.

12 years agor600g: remove u8,u16,u32,u64 types
Marek Olšák [Sun, 29 Jan 2012 22:13:39 +0000 (23:13 +0100)]
r600g: remove u8,u16,u32,u64 types

12 years agoglsl: Fix optimization tests after converting src/glsl to automake.
Paul Berry [Tue, 31 Jan 2012 02:53:09 +0000 (18:53 -0800)]
glsl: Fix optimization tests after converting src/glsl to automake.

Commit 99476561 (automake: src/glsl and src/glsl/glcpp) changed the
build system so that src/glsl/glsl_test is not built by default.  This
inadvertently broke "make check", since the tests in
src/glsl/tests/lower_jumps (which are run by "make check") rely on
glsl_test.

This patch ensures that "make check" builds glsl_test before running
any tests.

Reviewed-by: Matt Turner <mattst88@gmail.com>
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.