Commit Graph

61967 Commits

Author SHA1 Message Date
Emil Velikov 330a3799d0 automake: make clean the correct git_sha1.h.tmp
When building out of tree, the file ends up dangling which
may result in a binary with the old git sha.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-03-08 20:40:56 +00:00
Christian König 6a402359fd radeonsi: fix freeing descriptor buffers
That structure member is a pointer, so the loop with
the Elements macro only freed up the first entry.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-08 16:08:15 +01:00
Christian König 58d2afa223 radeonsi: fix leaking the bound state on destruction v2
v2: rebased on stale pointer fixes

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-08 16:08:15 +01:00
Christian König 1fa2acba61 radeonsi: avoid stale state pointers
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-08 16:08:15 +01:00
Christian König 1a8c66023b radeonsi: avoid stale pointers in si_delete_shader_selector
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-08 16:08:15 +01:00
Marek Olšák c1a06da465 Revert "winsys/radeon: if there's VRAM-only usage, keep it"
This reverts commit 67aef6dafa.

It caused GPU hangs. The question is why.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75900
2014-03-08 16:00:25 +01:00
Christian König a995f564c7 radeon/vce: fix memory leak
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-08 14:43:53 +01:00
Sir Anthony 6e39a8f6ec glcpp: Do not remove spaces to preserve locations.
After preprocessing by glcpp all adjacent spaces were replaced by
single one and glsl parser received column-shifted shader source.
It negatively affected ast location set up and produced wrong error
messages for heavily-spaced shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-03-08 01:38:32 -08:00
Sir Anthony da2275cd9b glsl: Change locations from yylloc to appropriate tokens positions.
Reviewed-by: Carl Worth <cworth@cworth.org>
2014-03-08 01:29:00 -08:00
Sir Anthony 5656775cf6 glsl: Add ast_node method to set location range.
Reviewed-by: Carl Worth <cworth@cworth.org>
2014-03-08 01:29:00 -08:00
Sir Anthony 654ee41cd3 glsl: Make ast_node location comments more informative.
Reviewed-by: Carl Worth <cworth@cworth.org>
2014-03-08 01:29:00 -08:00
Sir Anthony 433d562ac6 glsl: Extend ast location structure to hande end token position.
Reviewed-by: Carl Worth <cworth@cworth.org>
2014-03-08 01:29:00 -08:00
Sir Anthony 6984aa4350 glsl: Update lexers in glsl and glcpp to hande end position of token.
Reviewed-by: Carl Worth <cworth@cworth.org>
2014-03-08 01:29:00 -08:00
Vinson Lee 98fb8c95c0 scons: Add drivers/common/meta_generate_mipmap.c to src/mesa/SConscript.
This patch fixes this SCons build error introduced with commit
70e7905608.

build/linux-x86_64-debug/mesa/libmesa.a(driverfuncs.os): In function `_mesa_init_driver_functions':
src/mesa/drivers/common/driverfuncs.c:99: undefined reference to `_mesa_meta_GenerateMipmap'

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2014-03-07 23:39:29 -08:00
Kenneth Graunke 14ca611258 meta: Support GenerateMipmaps on 1DArray textures.
I don't know how many people care about this case, but it's easy enough
to do, so we may as well.  The tricky part is that for some reason Mesa
stores the number of array slices in Height, not Depth.

I thought the easiest way to handle that here was to make Height = 1
(the actual height), and srcDepth = srcImage->Height.  This requires
some munging when calling _mesa_prepare_mipmap_level, so I created a
wrapper that sorts it out for us.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:25 -08:00
Kenneth Graunke 158a7440c3 meta: Use srcWidth/Height/Depth rather than srcImage->Width and such.
This is equivalent for now, and will differ once we add 1DArray support.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:19 -08:00
Kenneth Graunke ec23d5197e meta: Support GenerateMipmaps on 2DArray textures.
This is largely a matter of looping over the number of slices/layers,
and not minifying depth (presumably that code exists for the unfinished
3D texture support).

Normally, I would have made the loop over array slices the outermost
loop.  I suspect that would make it trickier to support 3D textures
someday, though, so I didn't.  The advantage is that we would only have
one BufferData call per slice, rather than one per miplevel and slice.

However, a GenerateMipmaps microbenchmark indicates that either way is
basically just as fast.  So I'm not sure it's worth bothering.

Improves performance in a GenerateMipmaps microbenchmark by nearly 5x.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:17 -08:00
Kenneth Graunke 15b2f69b9c meta: Add a 'layer' argument to bind_fbo_image().
For array textures and 3D textures, this represents the layer to use.
Just pass 0 for now.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:16 -08:00
Kenneth Graunke be84d53d44 meta: Refactor code for binding a texture image to the FBO.
Almost the exact same code appeared twice, and it needs to expand to
handle additional texture targets.  Refactor it to tidy up the code and
avoid duplicating more work in the future.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:14 -08:00
Kenneth Graunke 45ee1b30d7 meta: Use minify() in GenerateMipmaps code.
This is what the macro is for.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:13 -08:00
Kenneth Graunke 9afca91984 meta: Drop redundant FBO creation code in GenerateMipmaps.
fallback_required() already creates the FBO in order to check whether we
can render to the format.  So it's guaranteed to exist.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:11 -08:00
Kenneth Graunke 1285bc87ac meta: Replace GLboolean with bool in fallback_required().
This doesn't interact with the GL API, so we shouldn't use GL types.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:10 -08:00
Kenneth Graunke 092b7edb3f meta: Make _mesa_meta_check_generate_mipmap_fallback static.
This was only ever used in one place; there's no reason for it to be
non-static.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:09 -08:00
Kenneth Graunke 70e7905608 meta: Split GenerateMipmap() into its own file.
Putting the implementation of each GL function in its own file makes it
much easier not to get lost.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:07 -08:00
Kenneth Graunke 3a7f3d843a meta: De-static setup_texture_coords().
This will be used in multiple files soon.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 22:45:04 -08:00
Timothy Arceri 1308d21fbf glapi: Add KHR_debug.xml 2014-03-08 15:45:26 +11:00
Timothy Arceri 6c3f5abc2d mesa: add missing DebugMessageControl types
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-08 15:38:31 +11:00
Timothy Arceri fb78fa58d2 mesa: make ARB_debug_output functions an alias of
KHR_debug

Also update dispatch sanity removing ARB_debug_output checks and
removing KHR_debug placeholders as the checks have already been added

V2: Make sure we exit case statements with conditional breaks rather than
just dropping through.

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-08 15:38:31 +11:00
Timothy Arceri 0608d346aa glapi: move KHR_debug into its own file
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-08 15:31:59 +11:00
Adel Gadllah b972e55684 glx_pbuffer: Refactor GetDrawableAttribute
Move the pdraw != NULL check out so that they don't
have to be duplicated.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 16:59:57 -08:00
Adel Gadllah 6b13cd1f7f glx: Update glxext.h to revision 25407
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 16:59:57 -08:00
Tom Stellard a1b189ac90 radeon: Include radeon_elf_util.c in the list of LLVM_C_FILES v2
This fixes the a build breakage caused by
6974eb9076 on build configurations where
all the following are true:

1. radeonsi is not being built
2. r600g is being built
3. opencl is disabled
4. --enable-r600-llvm-compiler is not being used
5. libelf is not installed

v2:
  - Add $(RADEON_CFLAGS) to libllvmradeon_la_CFLAGS

Tested-by: Brian Paul <brianp@vmware.com>
2014-03-07 18:06:59 -05:00
Brian Paul 9b322d540a st/mesa: only mark framebuffer as sRGB capable if Mesa supports the format
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-03-07 15:43:36 -07:00
Tom Stellard 6974eb9076 radeon/llvm: Factor elf parsing code out into its own function
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-03-07 13:31:52 -05:00
Tom Stellard 1f4a9fc84e radeon: Rename struct radeon_llvm_binary to radeon_shader_binary v2
And move its definition into r600_pipe_common.h;  This struct is a just
a container for shader code and has nothing to do with LLVM.

v2:
  - Drop unrelated Makefile change

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-03-07 13:31:51 -05:00
Marek Olšák d8fde8ffed gallium: rename R4A4 and A4R4 formats to match their swizzle
Like L4A4.

Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-07 18:07:05 +01:00
Marek Olšák 780ce576bb mesa: fix the format of glEdgeFlagPointer
Softpipe expects a float in the vertex shader, which is what glEdgeFlag
generates.

This fixes piglit/gl-2.0-edgeflag.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07 18:07:05 +01:00
Marek Olšák 472ac0db08 radeonsi: fix blit compressed texture workaround to support 2D arrays
We don't have a piglit test for this, but I think it's correct.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-03-07 18:07:05 +01:00
Marek Olšák fcdf6fa86c r600g: fix blitting the last 2 mipmap levels for Evergreen
This fixes a lot of compressedteximage piglit tests.

R600-R700 don't have this issue.

Cc: mesa-stable@lists.freedesktop.org
2014-03-07 18:07:05 +01:00
Marek Olšák 8a08051e2a r600g: fix texelFetchOffset GLSL functions
Cc: mesa-stable@lists.freedesktop.org
2014-03-07 18:07:05 +01:00
Marek Olšák 67aef6dafa winsys/radeon: if there's VRAM-only usage, keep it 2014-03-07 18:07:05 +01:00
Niels Ole Salscheider f112ba03bb radeon: Use upload manager for buffer downloads
Using DMA for reads is much faster.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Signed-off by: Marek Olšák <marek.olsak@amd.com>
2014-03-07 18:07:05 +01:00
Brian Paul b46e8622f1 glapi: use 'Mesa' in error messages
A user would have no idea what "_glthread_" is.  This removes the
last remaining instance of the _glthread_ string in Mesa.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
2014-03-07 09:04:01 -07:00
Brian Paul 6d2dffe8b1 st/mesa: add test_format_conversion() debug function
To check that the st_mesa_format_to_pipe_format() and
st_pipe_format_to_mesa_format() functions correctly convert
all corresponding Mesa/Gallium formats.

This found that MESA_FORMAT_YCBCR_REV was missing in
st_mesa_format_to_pipe_format().  Fixed that too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-07 07:31:29 -07:00
Brian Paul d8f7e3d79e st/mesa: add MESA_FORMAT_R8G8B8A8_SRGB in st_mesa_format_to_pipe_format()
v2: rename patch after rebasing on top of Jose's changes.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2014-03-07 07:31:18 -07:00
José Fonseca b3689adf51 mesa/st: Fix PIPE_FORMAT_R8G8B8A8_SRGB -> MESA_FORMAT_ conversion.
Copy'n'past typo introduced in my
1d8e3067fd commit.

This fixes swapped RB channels I was seeing in my test machines.

Trivial.
2014-03-07 13:35:24 +00:00
Kusanagi Kouichi 7233d4479e st/vdpau: Add rotation v2
v2: add static asserts

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-07 09:20:11 +01:00
Kusanagi Kouichi e7e207658c vl: Add rotation v3
v2: rotate in gen_rect_verts instead
v3: clear rotate in vl_compositor_clear_layers,
    update calc_drawn_area as well

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-07 09:20:11 +01:00
Christian König 53d1d879d5 st/omx/enc: fix crash on destruction
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-07 08:55:57 +01:00
Kenneth Graunke 378c6f2246 mesa: Drop unused hash_table::mem_ctx field.
It's never used, and it's equivalent to ralloc_parent(ht) if you really
need it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-06 20:55:34 -08:00