Commit Graph

53833 Commits

Author SHA1 Message Date
Dmitry Cherkassov fd1196c412 gallium: fix some function comments in p_context.h
Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-15 07:54:38 -07:00
Andreas Boll 8a9f0fdeab build: add missing files to tarballs target
fixes errors ./configure and make was complaining about

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-11-14 23:13:34 +01:00
Andreas Boll bc08f26485 build: add missing Makefile.in files to tarballs target
fixes errors ./configure was complaining about

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-11-14 23:13:14 +01:00
Andreas Boll a0a90ea920 build: add config.sub and config.guess to tarballs target
fixes errors ./configure was complaining about

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-11-14 23:12:58 +01:00
Andreas Boll ca8988673b mesa: use .cherry-ignore in the get-pick-list.sh script
NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-11-14 20:45:33 +01:00
Paul Berry b85a8cd208 mesa: Add .gitignore for hashtable collision unit test.
This test was introduced in commit
35fd61bd99.
2012-11-14 11:23:51 -08:00
Michel Dänzer 73d9703a93 radeonsi: Set STENCILOPVAL fields to 1.
This is necessary for backwards compatibility with pre-SI for stencil.

Fixes a number of stencil related piglit tests, and real apps using stencil.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-11-14 16:08:34 +01:00
Michel Dänzer 91c1d4472f radeonsi: Bump SI_PM4_MAX_DW.
Fixes assertion failure with Mesa demo glsl/samplers.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-14 12:08:25 +01:00
Michel Dänzer 56ae9be957 radeonsi: Handle TGSI TXL opcode.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-14 12:08:19 +01:00
Michel Dänzer 3e20513b8f radeonsi: Handle TGSI TXB opcode.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-14 12:08:10 +01:00
Vinson Lee ca5840afb0 mesa: Include compiler.h in hash_table.h.
Include the header for the inline symbol. MSVC does not have the inline
keyword for C.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2012-11-13 21:19:50 -08:00
Marek Olšák 186579e724 r600g: use LINEAR_ALIGNED tiling for 1D array textures and if height0 <= 3
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-13 17:17:05 +01:00
Tom Stellard 2e6b81ff7a auxillary: Append LLVM_CXXFLAGS to CXXFLAGS 2012-11-13 15:13:07 +00:00
Marek Olšák e3813ecfa3 r300g: don't call buffer_unmap in draw functions
It's been a no-op anyway.
2012-11-13 15:53:17 +01:00
Marek Olšák 7a8affb6a1 r300g: fix crash since the set_vertex_buffers(start_slot) change 2012-11-13 15:53:16 +01:00
Marek Olšák d4780fddb1 r600g: untiled window-system buffers should be LINEAR_ALIGNED
though I guess the DDX allocates them as LINEAR_GENERAL

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-13 15:00:37 +01:00
Marek Olšák c9e5309223 r600g: use LINEAR_ALIGNED tiling for 1D textures
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-13 15:00:37 +01:00
Marek Olšák ac4f61b232 r600g: use LINEAR_ALIGNED tiling for staging textures, reorder the code
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-13 15:00:37 +01:00
Kenneth Graunke fe2ef4b810 i965/vs: Fix user clip plane setup on Gen4-5.
On Gen6-7, we don't compact clip planes, and nr_userclip_plane_consts
is the last bit set, so iterating from i = 0..nr_userclip_plane_consts
covers all active clip planes and is the right thing to do.
works and is the right thing to do.

However, that doesn't work at all on Gen4-5.  Since we don't compact
clip planes, we skip over ones which aren't active (via the continue
statement).  We also set set nr_userclip_plane_consts to the number of
active clip planes, which means that we end the loop after checking that
many bits.  If the set of clip planes wasn't contiguous, this means we'd
fail to find the last few.

By changing the iteration to MAX_CLIP_PLANES, we correctly find all of
the active clip planes.

Fixes regressions since 66c8473e02 (replacing the old VS backend) in
Piglit's spec/glsl-1.20/execution/clipping/fixed-clip-enables and
oglconform's mustpass(basic.clip) and userclip(basic.allCases).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56791
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-13 01:27:33 -08:00
Kenneth Graunke 3262857843 i965/vs: Simplify the Gen6-7 part of setup_uniform_clipplane_values().
There's no compaction, so we can drop that code and simply use 'i'.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-13 01:27:31 -08:00
Kenneth Graunke 0ad4360ca1 i965/vs: Split setup_uniform_clipplane_values() into Gen4-5/6-7 parts.
Since Gen4-5 compacts clip planes and Gen6-7 doesn't, it makes sense to
split them into separate code paths.  This patch simply copies the code
to both halves; the next commits will simplify it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-13 01:27:15 -08:00
Vinson Lee bb284669f8 mesa: Replace random with standard C rand.
BSD random is not available on some compilers.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2012-11-12 22:15:42 -08:00
Brian Paul 9b67460223 automake: Remove empty file variable.
Fixes SCons build regression introduced with commit
a665cf1226.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Vinson Lee <vlee@freedesktop.org>
2012-11-12 21:29:34 -08:00
Eric Anholt 3a5ad21cd3 mesa: Fix gallium build since 6991c2922f
Looks like I screwed up and didn't test gallium again after tweaking the
Makefile.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57044
2012-11-12 19:35:31 -08:00
Eric Anholt 6991c2922f mesa: Convert the hash table for GL object ids to the open-addressing hash.
The previous 1023-entry chaining hash table never resized, so it was very
inefficient when there were many objects live.  While one could have an even
more efficient implementation than this (keep an array for genned names with
packed IDs, or take advantage of the fact that key == hash or key ==
*(uint32_t *)data to store less data), this is fairly fast, and I want a nice
replacement hash table for other parts of Mesa, too.

It improves Minecraft performance 12.3% +/- 1.4% (n=9), dropping hash lookups
from 8% of the profile to 0.5%.

I also tested cairo-gl, which should be a pessimal workload for this hash
table: around 247000 FBOs created and destroyed, only around 65 live at any
time, and few lookups of them between creation and destruction.  No
statistically significant performance difference at n=76 (mean 20.3/20.4
seconds, sd 2.8/3.2 seconds).  If I remove the >20 seconds outliers that
appear to be due to thermal throttling, there's possibly a .97% +/- 0.31%
performance win (n=61/59).  The choice of cutoff for outliers feels a lot like
cooking the data, but I've gone through this process 3 times for minor
iterations of the code with the same conclusion each time.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Chad Versace <chad.versace@linux.intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2012-11-12 15:52:43 -08:00
Eric Anholt 35fd61bd99 mesa: Import a copy of the open-addressing hash table code I wrote.
Mesa's chaining hash table for object names is slow, and this should be much
faster.  I namespaced the functions under _mesa_*, to avoid visibility
troubles that we may have had before with hash_table_* functions.

v2: Move .c file to main/, const a few things, clean up loop conditions,
    add/extend some comments.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2012-11-12 15:52:42 -08:00
Eric Anholt 1e8dd15311 automake: Remove libdricore clip.c workaround lib.
sparc/clip.c got moved to sparc/sparc-clip.c to avoid doing this workaround in
the parent directory.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2012-11-12 15:52:42 -08:00
Eric Anholt 9078441072 automake,android: Build program/ into a helper lib (v2)
While simplifying mesa/Makefile.am, the more important feature of this commit
is allowing a file with the same name to appear in both main/ and program/.

v2: [chadv] Add changes to Android makefiles.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Signed-off-by: Chad Versace <chad.versace@linux.intel.com> (v2)
2012-11-12 15:52:42 -08:00
Chad Versace 0ef8535747 android: Moves rules for libmesa_st_mesa to separate makefile
The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too
long and complex to be easily understood. This patch belongs to a series
that decomposes them into several easily digestible makefiles.

This patch move the rules for libmesa_st_mesa.a from Android.mk to
Android.libmesa_st_mesa.mk.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-12 15:52:42 -08:00
Chad Versace 7071ffb464 android: Moves rules for libmesa_dricore to separate makefile
The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too
long and complex to be easily understood. This patch belongs to a series
that decomposes them into several easily digestible makefiles.

This patch move the rules for libmesa_dricore.a from Android.mk to
Android.libmesa_dricore.mk.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-12 15:52:42 -08:00
Chad Versace 5f935af675 android: Moves rules for mesa_gen_matypes to separate makefile
The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too
long and complex to be easily understood. This patch belongs to a series
that decomposes them into several easily digestible makefiles.

This patch move the rules for host executable mesa_gen_matypes from
Android.mk to Android.mesa_gen_matypes.mk.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-12 15:52:42 -08:00
Chad Versace f2b638a997 android: Moves rules for libmesa_glsl_utils to separate makefile
The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too
long and complex to be easily understood. This patch belongs to a series
that decomposes them into several easily digestible makefiles.

This patch move the rules for the host and target libmesa_glsl_utils.a
from Android.mk to Android.libmesa_glsl_utils.mk.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-12 15:52:42 -08:00
Eric Anholt a665cf1226 automake: Merge *_CXX_FILES variables in the glsl build.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12 15:52:42 -08:00
Eric Anholt 34d4216e64 automake: Merge per-type *_FILES variables in intel drivers.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12 15:52:42 -08:00
Eric Anholt e9e8e194e2 automake: Merge separated *_CXX_FILES variables to *_FILES in core mesa.
They were always used with the corresponding *_FILES variables now that
automake handles rule generation.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12 15:52:41 -08:00
Eric Anholt be655ec617 automake: Remove dead *_OBJECTS variables from the old build system.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12 15:52:41 -08:00
Eric Anholt 906d832db5 automake: Fix a comment typo.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12 15:52:41 -08:00
Marek Olšák f5ac60152b r600g: remove redundant parameter in r600_init_surface 2012-11-13 00:34:35 +01:00
Marek Olšák e7dde5c8fb st/mesa: fix computation of last_level in GenerateMipmap
Array textures were broken.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:37:31 +01:00
Marek Olšák 6dd839f23a st/mesa: fix computation of last_level during texture creation
Array textures were broken.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:37:31 +01:00
Marek Olšák c06258dd02 st/mesa: fix guessing the base level size
It was pretty broken with array textures, where the array size (height or
depth depending on the target) shouldn't be magnified.

The guessing also doesn't fail with 1D and cube textures.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:37:31 +01:00
Marek Olšák 985f2aec4a mesa: fix error checking of TexStorage(levels) for array and rect textures
NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:37:30 +01:00
Marek Olšák 12a4fd7e45 mesa: use MaxNumlevels in _mesa_test_texobj_completeness
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:37:30 +01:00
Marek Olšák 8111342e81 mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2
MaxLog2 led to bugs, because it didn't work well with 1D and 3D textures.

NOTE: This is a candidate for the stable branches.

v2: correct the comment at MaxNumlevels

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-11-12 21:36:56 +01:00
Roland Scheidegger 26097c4855 gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointers
This might have a slight overhead but handling mip offsets more like
the width (and image) strides should make some things easier (mip level
being just part of the offset calculation) later.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-11-12 21:02:59 +01:00
Roland Scheidegger 8257bb963f llvmpipe: always allocate whole miptrees not individual levels
This is preparation work for using mip level offsets + base_ptr for texture
sampling instead of per-mip pointers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-11-12 21:02:59 +01:00
Kenneth Graunke df3cecab7d i965: Add comments for each of the surface state table's columns.
I can never remember what "AB" means, and having to constantly consult
the docs is annoying.  Just add comments to the top which explain each
of the abbreviations.
2012-11-12 11:24:38 -08:00
Paul Berry 21e23fbe21 glapi: Stop handling XML annotation exec="{es,check,loopback}".
Previously, we used these XML annotations to make the code generation
scripts aware of any instances where the Mesa implementation of a
function had a prefix other than "_mesa_".  Now that all of the mesa
implementation functions have been renamed to match the XML, we only
need to handle exec="skip", exec="dynamic", and the default case of
exec="mesa".

Acked-by: Brian Paul <brianp@vmware.com>
2012-11-12 10:53:58 -08:00
Paul Berry 55b81ff56b glapi: Remove handling of mesa_name XML attribute.
Previously, we used the mesa_name XML attribute to make the code
generation scripts aware of any instances where the Mesa
implementation of a function had a different function name suffix than
the primary name in the XML.  Now that all of the Mesa implementation
functions have been renamed to match the XML, this attribute is no
longer necessary.

Acked-by: Brian Paul <brianp@vmware.com>
2012-11-12 10:53:57 -08:00
Paul Berry bb3db388d8 mesa: Fix const correctness of API implementation functions.
This patch changes the use of const in the type signatures of
_mesa_ShaderSource() and _mesa_TransformFeedbackVaryings(), to match
the type signatures in the GL spec.  This avoids warnings when
building the code-generated api_exec.c file.

Note: previously we avoided the build warnings because these functions
were being type-checked against ShaderSourceARB and
TransformFeedbackVaryingsEXT; those functions are semantically
equivalent, but have fewer const qualifiers in their type signatures.

Acked-by: Brian Paul <brianp@vmware.com>
2012-11-12 10:53:57 -08:00