Ilia Mirkin [Mon, 11 Aug 2014 20:01:55 +0000 (16:01 -0400)]
mesa: add ARB_texture_barrier support
This extension is identical to NV_texture_barrier. Alias
glTextureBarrier to the existing glTextureBarrierNV and use the existing
NV_texture_barrier extension bit.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Fri, 15 Aug 2014 00:01:07 +0000 (02:01 +0200)]
docs: document radeonsi BPTC support, sort extensions in 10.3 release notes
Glenn Kennard [Wed, 13 Aug 2014 11:02:53 +0000 (13:02 +0200)]
r600g: Implement BPTC texture support
Requires Evergreen/Cayman
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Kristian Høgsberg [Thu, 7 Aug 2014 23:13:01 +0000 (16:13 -0700)]
i965: Rename intelValidateState to intel_update_state
This matches the name of the dd hook. Also convert a couple of nearby
dd implementations to lowercase + underscore as is now the standard.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kristian Høgsberg [Mon, 7 Jul 2014 21:43:30 +0000 (14:43 -0700)]
i965: Assign PS kernel start pointers when we decide which kernels to use
Right now we decide which kernels to use and the GRF start offsets in
one place and emit the kernel pointers later. The logic of how to map
8, 16 and 32 kernels to kernel start pointers follows the same logic as which
GRF start offsets to use, so lets figure out these two things in one place.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Grigori Goronzy [Wed, 13 Aug 2014 00:39:02 +0000 (02:39 +0200)]
radeonsi: implement BPTC texture support
Passes all piglit tests.
v2: rebased
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Mon, 11 Aug 2014 13:06:23 +0000 (15:06 +0200)]
radeonsi: fix buffer invalidation of unbound texture buffer objects
This maintains a list of all TBOs in a pipe_context.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Mon, 11 Aug 2014 11:32:40 +0000 (13:32 +0200)]
r600g: implement invalidation of texture buffer objects
This fixes piglit spec/ARB_texture_buffer_object/data-sync.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Marek Olšák [Sun, 10 Aug 2014 18:21:21 +0000 (20:21 +0200)]
r600g: fix constant buffer fetches
Somebody forgot to do this. It was uncovered by recent st/mesa changes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82139
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Marek Olšák [Thu, 31 Jul 2014 00:33:12 +0000 (02:33 +0200)]
r600g: clear constant buffer sizes at the beginning of CS
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Pekka Paalanen [Fri, 8 Aug 2014 13:26:28 +0000 (16:26 +0300)]
egl_dri2: fix EXT_image_dma_buf_import fds
The EGL_EXT_image_dma_buf_import specification was revised (according to
its revision history) on Dec 5th, 2013, for EGL to not take ownership of
the file descriptors.
Do not close the file descriptors passed in to eglCreateImageKHR with
EGL_LINUX_DMA_BUF_EXT target.
It is assumed, that the drivers, which ultimately process the file
descriptors, do not close or modify them in any way either. This avoids
the need to dup(), as it seems we would only need to just close the
dup'd file descriptors right after.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76188
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Pekka Paalanen [Thu, 14 Aug 2014 18:17:04 +0000 (21:17 +0300)]
i965: fix compiler error in union initiliazer
gcc 4.6.3 chokes with the following error:
brw_vec4.cpp: In member function 'int brw::vec4_visitor::setup_uniforms(int)':
brw_vec4.cpp:1496:37: error: expected primary-expression before '.' token
Apparently C++ does not do named initializers for unions, except maybe
as a gcc extension, which is not present here.
As .f is the first element of the union, just drop it. Fixes the build
error.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Anuj Phogat [Tue, 29 Jul 2014 02:27:59 +0000 (19:27 -0700)]
i965: Bail on FS copy propagation for scratch writes with source modifiers
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Anuj Phogat [Mon, 28 Jul 2014 22:41:55 +0000 (15:41 -0700)]
i965: Bail on vec4 copy propagation for scratch writes with source modifiers
Fixes Khronos GLES3 CTS test:
dynamic_expression_array_access_vertex
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Aras Pranckevicius [Wed, 13 Aug 2014 17:40:05 +0000 (20:40 +0300)]
glsl: Fixed vectorize pass vs. texture lookups.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82574
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Thu, 14 Aug 2014 14:44:06 +0000 (08:44 -0600)]
ra: move declarations before code to fix MSVC build
Trivial.
Brian Paul [Wed, 13 Aug 2014 22:30:48 +0000 (16:30 -0600)]
svga: remove some unneeded INLINE qualifiers
Trivial.
Emil Velikov [Wed, 13 Aug 2014 20:31:33 +0000 (21:31 +0100)]
docs/autoconf: update to better reflect reality
* --enable-{32,64}-bit is done. Use --build and --host instead.
* Configure does not add "-g -O2" to C{,XX}FLAGS.
* Pkg-config has been mandatory for a while now.
* Avoid using LDFLAGS, refer to pkg-config.
* --with-expat is deprecated. Use pkg-config.
v2:
* Note that CC/CXX will need to be set for multilib builds.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
Jose Fonseca [Wed, 13 Aug 2014 19:33:35 +0000 (20:33 +0100)]
scons: do not include headers from the sources lists
The SCons documentation is not explicit on the topic yet building mesa
with SCons and MSVC is known to have problems when headers are listed.
So be safe just drop them for now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82534
Tested-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Wed, 13 Aug 2014 17:05:56 +0000 (18:05 +0100)]
configure.ac: remove enable 32/64 bit hacks
These two were added ages ago, with an explicit comment "Hacks ..."
They have been insufficient for years and maintainers needed to
explicitly handle the build themselves.
Rather than lying and pretending that it works, just kill this hack and
let maintainers build things the way it should be done for their
distribution.
Document the removal in the release notes.
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Wed, 13 Aug 2014 16:55:39 +0000 (17:55 +0100)]
Revert "configure: Fix --enable-XX-bit flags by moving LT_INIT where it should"
This reverts commit
2af28040d639dddbb7c258981a00eaf3dfcbcf03.
The commit was resolving an issue where libtool will not setup the
environment correctly when one explicitly provides --enable-{32,64}-bit
at configure time. It was caused due to the "-m32,64" C{,XX}FLAGS being
set too late relative to LT_INIT.
At the same time this cases the enable_static to be incorrectly set,
amongst others leading to build issues. Rather than being smart and
trying to handle 32/64 bit build ourselves it may be better to delegate
it to the builder/maintainer. The latter should now know better which is
the correct(most appropriate) method.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82536
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82546
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Neil Roberts [Mon, 11 Aug 2014 11:21:44 +0000 (12:21 +0100)]
i965: Store uniform constant values in a gl_constant_value instead of float
The brw_stage_prog_data struct previously contained an array of float pointers
to the values of parameters. These were then copied into a batch buffer to
upload the values using a regular assignment. However the float values were
also being overloaded to store integer values for integer uniforms. This can
break if x87 floating-point registers are used to do the assignment because
the fst instruction tries to fix up invalid float values. If an integer
constant happened to look like an invalid float value then it would get
altered when it was copied into the batch buffer.
This patch changes the pointers to be gl_constant_value instead so that the
assignment should end up copying without any alteration. This also makes it
more obvious that the values being stored here are overloaded for multiple
types.
There are some static asserts where the values are uploaded to ensure that the
size of gl_constant_value is the same as a float.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81150
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Christian König [Wed, 13 Aug 2014 13:49:18 +0000 (15:49 +0200)]
st/vdpau: add device reference counting
This fixes an issue with flash where it tries to destroy a decoder
after already destroying the device associated with the decoder.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82517
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Chris Forbes [Sun, 10 Aug 2014 04:10:29 +0000 (16:10 +1200)]
mesa: Make ARB_gpu_shader5 core-profile-only
Requires GLSL 1.50 or higher, which we only support in the core profile.
V2: Fix broken alignment
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Sun, 10 Aug 2014 19:13:44 +0000 (15:13 -0400)]
nouveau: force luminance clear colors to have the same g/b values as r
Fixes the LUMINANCE_ALPHA formats of fbo-clear-formats piglit test.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Kenneth Graunke [Thu, 17 Jul 2014 21:33:15 +0000 (14:33 -0700)]
i965: Enable INTDIV in SIMD16 mode.
All we need to do is decompose this to two SIMD8 instructions, like we
do in many other cases. We even already have code for that.
I apparently just botched this last time I tried, and it was easy.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Kenneth Graunke [Tue, 8 Jul 2014 18:57:19 +0000 (11:57 -0700)]
i965/fs: Drop "do dual source blending" generator parameter.
When dual source blending, the visitor already stores a flag in
brw_wm_prog_data (dual_src_blend) for the state upload code to use.
The generator also receives this, so there's no need to pass an
additional flag.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Wed, 13 Aug 2014 18:03:36 +0000 (11:03 -0700)]
mesa/texstore: Don't use the _mesa_swizzle_and_convert if we need transfer ops
The _mesa_swizzle_and_convert path can't do transfer ops, so we should bail
if they're needed.
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Dave Airlie [Thu, 14 Aug 2014 00:49:55 +0000 (10:49 +1000)]
docs: update ARB_vertex_attrib_64bit status
I started this as well on top of my fp64 stuff.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 10 Aug 2014 23:04:47 +0000 (09:04 +1000)]
docs/GL3.txt: add GLES 3.1 section
This just cherry-pick the extensions into a list for GLES 3.1
I'm not actually sure if this list if complete or correct, maybe someone
else can tell me what I missed, and I'm not 100% sure on multi_draw_indirect.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 11 Aug 2014 02:07:06 +0000 (12:07 +1000)]
hud: don't overrun malloced arrays
==17630== Invalid read of size 4
==17630== at 0x400AE10: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==17630== by 0x49024A2: u_upload_data (u_upload_mgr.c:253)
==17630== by 0x49050E1: u_vbuf_draw_vbo (u_vbuf.c:980)
==17630== by 0x487DE29: cso_draw_vbo (cso_context.c:1425)
==17630== by 0x487DEA0: cso_draw_arrays (cso_context.c:1445)
==17630== by 0x48A3B0E: hud_draw_colored_prims.constprop.6 (hud_context.c:123)
==17630== by 0x48A4810: hud_draw (hud_context.c:266)
==17630== by 0x48763F7: dri_flush (dri_drawable.c:483)
==17630== by 0x4057510: dri2Flush.constprop.4 (dri2_glx.c:559)
==17630== by 0x405789E: dri2SwapBuffers (dri2_glx.c:851)
==17630== by 0x402C531: glXSwapBuffers (glxcmds.c:842)
==17630== by 0x8049716: ??? (in /usr/bin/glxgears)
==17630== Address 0x4426b2c is 4 bytes after a block of size 1,008 alloc'd
==17630== at 0x4006B11: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==17630== by 0x48A4CE7: hud_pane_add_graph (hud_context.c:625)
==17630== by 0x48A68F0: hud_pipe_query_install (hud_driver_query.c:175)
==17630== by 0x48A6A30: hud_driver_query_install (hud_driver_query.c:207)
==17630== by 0x48A5835: hud_create (hud_context.c:791)
==17630== by 0x48756CB: dri_create_context (dri_context.c:165)
==17630== by 0x4871CD4: driCreateContextAttribs (dri_util.c:435)
==17630== by 0x4871E06: driCreateNewContext (dri_util.c:464)
==17630== by 0x4056A22: dri2_create_context (dri2_glx.c:223)
==17630== by 0x402CF68: CreateContext (glxcmds.c:299)
==17630== by 0x402D265: glXCreateContext (glxcmds.c:430)
==17630== by 0x804B136: ??? (in /usr/bin/glxgears)
This is due to second vertex element being specified, and the upload
tries to fetch over the end. However the pane rendering only requires
a single vertex element, so specify only one.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Roland Scheidegger [Wed, 13 Aug 2014 17:30:48 +0000 (19:30 +0200)]
mesa: fix texstore with GL_COLOR_INDEX data
This got broken by
3dbf5bf6571e0c9d3e4febce01dea82be190d9d2.
GL_COLOR_INDEX data is still supported (in legacy contexts), but the new
texstore_swizzle path cannot handle it (and didn't detect this).
Unfortunately there's no piglit test trying to specify textures with a
GL_COLOR_INDEX source format, and I don't really understand how all the color
map stuff which is used by this works, but this caused conform failures
(with a reported mesa implementation error when trying to figure out the color
mapping).
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Andreas Boll [Wed, 13 Aug 2014 17:04:11 +0000 (19:04 +0200)]
winsys/radeon: fix hawaii accel_working2 comment
accel_working2 returns 3 if the new firmware is used.
The comment wasn't updated in v3 of commit:
36771dc winsys/radeon: fix nop packet padding for hawaii
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tom Stellard [Wed, 13 Aug 2014 18:37:03 +0000 (14:37 -0400)]
r300g: Fix bug in build_loop_info()/compiler v2
Fixes piglit glean "do-loop with continue and break" on RS690
It's based on Tom Stellard patch and improved to handle CMP instruction.
[v2] handle CMP instruction
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
Tom Stellard [Fri, 8 Aug 2014 13:32:20 +0000 (09:32 -0400)]
clover: Flush the command queue in clReleaseCommandQueue()
This is required by the spec.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Fri, 8 Aug 2014 13:27:34 +0000 (09:27 -0400)]
radeonsi/compute: Stop leaking the input buffer
We were leaking the input buffer used for kernel arguments and since
we were allocating it using si_upload_const_buffer() we were leaking
1 MB per kernel invocation.
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Fri, 8 Aug 2014 14:05:44 +0000 (10:05 -0400)]
radeonsi/compute: Whitespace fixes
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Fri, 8 Aug 2014 13:38:08 +0000 (09:38 -0400)]
radeonsi/compute: Call si_pm4_free_state() after emitting compute state
This will decrement the reference count for buffers referenced in the
command stream will prevent us from leaking them.
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Fri, 8 Aug 2014 13:30:33 +0000 (09:30 -0400)]
radeonsi/compute: Update reference counts for buffers in si_set_global_binding()
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Thu, 7 Aug 2014 19:31:17 +0000 (15:31 -0400)]
radeon/compute: Report a value for PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Thu, 7 Aug 2014 19:21:59 +0000 (15:21 -0400)]
radeon/compute: Fix reported values for MAX_GLOBAL_SIZE and MAX_MEM_ALLOC_SIZE
There is a hard limit in older kernels of 256 MB for buffer allocations,
so report this value as MAX_MEM_ALLOC_SIZE and adjust MAX_GLOBAL_SIZE
to statisfy requirements of OpenCL.
CC: "10.2" <mesa-stable@lists.freedesktop.org>
Connor Abbott [Fri, 1 Aug 2014 01:57:23 +0000 (18:57 -0700)]
ra: optimistically color only one node at a time
Before, when we encountered a situation where we had to optimistically
color a node, we would immediately give up and push all the remaining
nodes on the stack in the order of their index - which is a random, and
potentially not optimal, order. Instead, choose one node to
optimistically color in ra_select(), and then once we've optimistically
colored it, keep on going as normal in the hopes that we've opened up
more avenues for the normal select phase to make progress. In cases with
high register pressure, this helps make the order we push things on the
stack much better, and therefore increase the chance that we can allocate
successfully.
total instructions in shared programs:
4545447 ->
4545401 (-0.00%)
instructions in affected programs: 1353 -> 1307 (-3.40%)
GAINED: 124
LOST: 6
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Connor Abbott [Fri, 1 Aug 2014 01:57:22 +0000 (18:57 -0700)]
ra: don't consider nodes for spilling we don't need to
Previously, we would consider any optimistically colored nodes for
spilling. However, spilling any optimistically colored nodes below the
node that we failed to color on the stack wouldn't help us make
progress, since it wouldn't help with allowing us to find a color for
the node currently failing to get colored. Only consider nodes
which were above the failing node on the stack for spilling, which
simplifies the logic, and comment the code better so people know what's
going on here.
No shader-db changes with BRW_MAX_GRF reduced to 90 (or with the normal
number of GRF's).
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Connor Abbott [Fri, 1 Aug 2014 01:57:21 +0000 (18:57 -0700)]
ra: make the p, q test more efficient
We can store the q total that pq_test() would've calculated in the node
itself, updating it when we add a node to the stack. This way, we only
have to walk the adjacency list when we push a node on the stack (i.e.
when the p, q test succeeds) instead of every time we do the p, q test.
No difference in shader-db run times, but I'm keeping this in because
the q total that it calculates will also be used in the next few commits.
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Connor Abbott [Fri, 1 Aug 2014 01:57:20 +0000 (18:57 -0700)]
ra: cleanup the public API
Previously, there were 3 entrypoints into parts of the actual allocator,
and an API called ra_allocate_no_spills() that called all 3. Nobody
would ever want to call any of the 3 entrypoints by themselves, so
everybody just used ra_allocate_no_spills(). So just make them static
functions, and while we're at it rename ra_allocate_no_spills() to
ra_allocate() since there's no equivalent "with spills," because the
backend is supposed to handle spilling.
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ilia Mirkin [Sun, 10 Aug 2014 15:52:55 +0000 (11:52 -0400)]
nouveau: only try to get new storage if there are any levels
This would try to allocate 0-sized bo's when the max level was below the
base level.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Ilia Mirkin [Sun, 10 Aug 2014 15:52:10 +0000 (11:52 -0400)]
nouveau: add emacs dir-locals file for tabs/8-space indents
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Ilia Mirkin [Sun, 10 Aug 2014 00:03:50 +0000 (20:03 -0400)]
nvc0: increase GLSL level to 400 to enable ARB_gpu_shader5
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Sun, 10 Aug 2014 00:00:20 +0000 (20:00 -0400)]
mesa/st: enable ARB_gpu_shader5 if the reported GLSL version >= 400
The ARB_gpu_shader5 extension is made up of a lot of small sub-parts.
Instead of adding PIPE_CAP's for each of these, just rely on the GLSL
version reported by the pipe driver. The remaining extensions lend
themselves naturally to being checked through a single CAP.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Emil Velikov [Mon, 4 Aug 2014 18:11:41 +0000 (19:11 +0100)]
android: add CleanSpec.mk
The file contains rules that are executed on incremental builds. This
way one can avoid doing a full clean and ensure that the new object
(library) is correctly build.
Inspired by the work of Chih-Wei Huang, from the Android-x86 project.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 4 Aug 2014 18:03:44 +0000 (19:03 +0100)]
android: megadriver_stub: prefix static libraries with libmesa_
Will make it easier on us as CleanSpec.mk comes along and improves
consistency across the Android build.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 4 Aug 2014 17:59:58 +0000 (18:59 +0100)]
android: loader: prefix static libraries with libmesa_*
Will make it easier on us as CleanSpec.mk comes along and improves
consistency across the Android build.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:32:04 +0000 (00:32 +0100)]
android: dri/i9*5: remove used _INCLUDES variable
No longer needed as of last commit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Tue, 29 Jul 2014 00:21:34 +0000 (01:21 +0100)]
android: drivers/dri: add $(mesa_top)/src to the includes list
Will allow us to nuke an include or two from the drivers.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:27:32 +0000 (00:27 +0100)]
android: dri: use the installed libdrm headers
Saves us a few lines and brings us closer to the automake build.
Drop DRM_TOP as it's not longer used.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:22:05 +0000 (00:22 +0100)]
android: gallium: use the installed libdrm headers
Saves us a few lines and brings us closer to the automake build.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:18:11 +0000 (00:18 +0100)]
android: loader: use the installed libdrm headers
One step closer to the way we handle automake builds.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:16:01 +0000 (00:16 +0100)]
android: egl/dri2: use the installed libdrm headers
Trying to get rid of the hardcoded dependency of DRM_TOP which
expects that mesa is localted in /external/drm. Will
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 23:33:30 +0000 (00:33 +0100)]
android: dri/i915: do not build an 'empty' driver
The variable i915_C_FILES changed to i915_FILES with commit
34d4216e641 back in mesa 9.1/9.2. Yet we've missed to update the
the android build, essentially creating an dummy/empty driver that
can never work.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 1 Aug 2014 16:12:07 +0000 (17:12 +0100)]
automake: mesa: whitespace fixes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Fri, 1 Aug 2014 16:06:10 +0000 (17:06 +0100)]
mesa: guard better when building with sse4.1 optimisations
When the compiler is not capable/does not accept -msse4.1 while the target
has the instruction set we'll blow up as _mesa_streaming_load_memcpy is
going to be undefined.
To make sure that never happens, wrap the runtime cpu check+caller in an
ifdef thus do not compile that hunk of the code.
Fix the android build by enabling the optimisation and adding the define
where applicable.
v2: autoconf conditionals end with "fi" rather than endif.
v3: Wrap the definition and call to intel_miptree_{un,}map_movntdqa in
if defined(USE_SSE41). Spotted by Matt.
Cc: Matt Turner <mattst88@gmail.com>
Cc: Adrian Negreanu <adrian.m.negreanu@intel.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 19:24:02 +0000 (20:24 +0100)]
android: glsl: the stlport over the limited Android STL
The latter lacks various functionality used by mesa/glsl.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 27 Jul 2014 02:27:08 +0000 (03:27 +0100)]
android: drop HAL_PIXEL_FORMAT_RGBA_{5551,4444}
Upstream Android (system/core) has dropped these formats with commit
6bac41f1bf9(get rid of HAL pixelformats 5551 and 4444) yet does not
mention why.
These formats never really worked so we're safe to drop them as well.
Identical commit is available in the android-x86 external/mesa repo
commit
06a2d36edcd1e2247440e5800e6bf3028f37aee6
Author: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Wed Sep 25 01:16:57 2013 +0800
android: get rid of HAL pixelformats 5551 and 4444
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 27 Jul 2014 02:03:30 +0000 (03:03 +0100)]
android: gallium/auxiliary: drop log2/log2f redefitions
Recent versions of bionic has picked up support for these functions,
leading to build issues due to the redefition of the symbols.
Note: wrapping things in #ifdef does not cut it :\
Identical patch is available in chromium, android-x86 and perhaps other
projects.
commit
66c1c789ce3407472de9ed620c9f815639058835
Author: rmcilroy@chromium.org
Date: Wed Apr 02 10:59:34 2014 +0000
Porting to x64 Android. Remove redefinitions of log2 and log2f.
BUG=
R=kbr@chromium.org
Review URL: https://codereview.chromium.org/
216773005
commit
9cc0a0d2b0499556680b182888af86f29d4ec30b
Author: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Sun Jul 21 23:04:19 2013 +0800
android: remove log2, log2f
The functions are already defined in the latest bionic.
Cc: Chia-I Wu <olvaffe@gmail.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Emil Velikov [Sat, 26 Jul 2014 22:20:44 +0000 (23:20 +0100)]
android: targets/egl-static: add correct include for DRM headers
Android build never really installs the headers, as such we need to
explicitly add their location in the source tree otherwise it will
fail to find them.
v2: Android now installs the headers, so let's use that ;)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 22:40:14 +0000 (23:40 +0100)]
scons: group state-trackers' and targets' scons
Both share the identical dependencies, as such we can simplify
the scons script.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 21:20:04 +0000 (22:20 +0100)]
android: reorder gallium SUBDIRS
To be closer to its automake counterpart.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 22:20:57 +0000 (23:20 +0100)]
automake: handle gallium SUBDIRs in gallium/Makefile
Considering the way we've been consolidating things it makes
sense to add the final two (aux and tests) in here.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 22:12:08 +0000 (23:12 +0100)]
automake: compact gallium/target/Makefile into gallium/Makefile
Yet another makefile less to worry about.
v2: Add state_trackers and targets on a single SUBDIRS line.
Requested by Matt.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Tue, 12 Aug 2014 23:03:19 +0000 (00:03 +0100)]
automake: merge gallium/state_trackers/Makefile into gallium/Makefile
One makefile less, with the potential of further compacting the
automake build.
v2: Rebase on top of vc4 changes.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Tue, 12 Aug 2014 23:00:50 +0000 (00:00 +0100)]
automake: compact gallium/drivers and gallium/winsys makefiles
Rather than having two separate almost empty and identical makefiles,
compact them thus improving the configure and build time.
Additionally this makes the automake build symmetrical to the scons
and android one.
v2: Rebase on top of vc4, compact drivers + winsys on a single line.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 21:21:23 +0000 (22:21 +0100)]
android: egl/main: add/enable freedreno
For all everyone willing to give the freedreno driver
a go they can now build it under Android.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Cc: Rob Clark <robclark@freedesktop.org>
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 21:13:34 +0000 (22:13 +0100)]
android: gallium/freedreno: add preliminary build
For all the people interested in testing the freedreno driver on
their Android devices. The next commit will hook these up within
the libEGL driver (via the gallium-egl backend).
There may be some rough edges but those can be sorted when a
willing builder/tester comes along.
v2:
- s/freefreno/freedreno/. Spotted by Matt Turner.
- Use the installed libdrm headers.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Cc: Rob Clark <robclark@freedesktop.org>
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 18:45:09 +0000 (19:45 +0100)]
automake: gallium/freedreno: drop spurious include dirs
Rather than including two extra folders only for two headers,
just prefix the headers and be done with it.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Cc: Rob Clark <robclark@freedesktop.org>
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Paulo Sergio Travaglia [Sun, 20 Jul 2014 20:53:56 +0000 (21:53 +0100)]
android: egl/main: resolve radeon linking issues
- link against libdrm_radeon
- link the r600 driver against libstlport
- linkin the newly added libmesa_pipe_radeon library
required by r600 and radeonsi drivers
v2: Include pipe_radeon after pipe_r600/radeonsi.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
[Emil Velikov] Split up and add commit message.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Paulo Sergio Travaglia [Sun, 20 Jul 2014 20:47:59 +0000 (21:47 +0100)]
android: gallium/radeon: attempt to fix the android build
- include the correct folders
- add a new buildscript for the common radeon folder
v2: Use the installed libdrm headers over the DRM_TOP ones.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
[Emil Velikov] Split up and add commit message.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 20:12:18 +0000 (21:12 +0100)]
android: egl/main: fixup the nouveau build
For a while the nouveau pipe driver has been a static library
and it has been using STL for even longer.
Correct add the link and cleanup the gallium_DRIVERS.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 20:18:34 +0000 (21:18 +0100)]
android: gallium/nouveau: fix include folders, link against libstlport
nouveau uses STL for a while now thus we need to include
external/stlport/libstlport.mk in order to get the build
at least partially working.
v2: Use the installed libdrm headers over the DRM_TOP ones.
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 20 Jul 2014 18:41:58 +0000 (19:41 +0100)]
egl/main: Bring in the Makefile.sources
Rather than having the sources list duplicated across all three
build systems, define it once and use it whenever needed.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Wed, 23 Jul 2014 00:07:27 +0000 (20:07 -0400)]
nvc0: add BPTC format support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Tue, 22 Jul 2014 23:59:36 +0000 (19:59 -0400)]
mesa/st: add BPTC formats, expose ARB_texture_compression_bptc
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Ilia Mirkin [Wed, 23 Jul 2014 01:08:14 +0000 (21:08 -0400)]
softpipe,llvmpipe: mark BPTC formats as unsupported
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Ilia Mirkin [Tue, 22 Jul 2014 23:58:00 +0000 (19:58 -0400)]
gallium: add basic support for BPTC formats
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Ilia Mirkin [Mon, 11 Aug 2014 19:07:09 +0000 (15:07 -0400)]
docs: add GL4.5 section
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Emil Velikov [Thu, 24 Jul 2014 22:09:26 +0000 (23:09 +0100)]
configure.ac: drop enable_dri check in gallium_gbm
A while back we've mandated that gbm requires enable_dri,
thus this check is no longer required.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Thu, 24 Jul 2014 22:05:55 +0000 (23:05 +0100)]
configure.ac: bail out if building gallium_gbm without gallium_egl
The former is the only user of the latter. As such building gbm
without egl makes little to no sense.
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Tue, 12 Aug 2014 22:18:23 +0000 (23:18 +0100)]
st/dri: define GALLIUM_SOFTPIPE when building kms_swrast
To avoid unresolved symbols in the DRI modules with earlier commit we
wrapped the innards of dri_kms_init_screen() in a
DRI_TARGET/GALLIUM_SOFTPIPE ifdef.
At the same time we forgot to adds the defines to the st/dri build
systems, breaking kms_swrast and gnome-continuous.
Drop the DRI_TARGET define, we're already in st/DRI.
Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Alexandre Demers [Sat, 23 Nov 2013 01:06:20 +0000 (20:06 -0500)]
configure: Fix --enable-XX-bit flags by moving LT_INIT where it should
Moving LT_INIT after setting completely (AM_)C(XX)FLAGS and LDFLAGS.
LT_INIT needs them as they are expected to be used all along
the compilation when the macro runs its tests to determine among other
things the host type.
For info, see http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50754
Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Tested-by: Tapani Palli <lemody@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 1 Aug 2014 16:39:49 +0000 (17:39 +0100)]
c11/threads: correct assertion
We should assert when either the function or the flag pointer
is null or we'll end up with a null reference a few lines later.
Currently unused by mesa thus it has gone unnoticed.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 12 Aug 2014 16:24:00 +0000 (10:24 -0600)]
docs: now distributing the GL/glcorearb.h header
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Tue, 12 Aug 2014 16:20:30 +0000 (10:20 -0600)]
mesa: pull Khronos glcorearb.h header into include/GL/
Apps that only want to use core functionality should #include this
header. This version covers everything up to OpenGL 4.5.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Mon, 11 Aug 2014 19:47:30 +0000 (12:47 -0700)]
vc4: Drop the dump_fbo() routine.
Now that eglkms is working, and some tests are working under
PIGLIT_PLATFORM=gbm, I don't think I need this any more.
Eric Anholt [Tue, 12 Aug 2014 17:06:48 +0000 (10:06 -0700)]
vc4: Claim the GL 2.1 minimum for 3D textures.
We don't actually do them (or even fake them) currently, but it does get
us a bunch of unrelated glean glsl1 tests passing, which previously would
error out due to glean assuming the minimums on a 3D texture that 2 of the
subtests use.
Eric Anholt [Mon, 11 Aug 2014 23:03:17 +0000 (16:03 -0700)]
vc4: Declare what vertex formats we actually support.
We will support more than this eventually, but for now this makes u_vbuf
format-convert a few things (32-bit snorm and scaled, doubles) for us.
Eric Anholt [Mon, 11 Aug 2014 23:00:28 +0000 (16:00 -0700)]
vc4: Stash some debug code for format support checks.
This can be useful for looking at context init setup and texture format
choices, and there's no reason for the silly retval computation we do if
you're not going to have this code (mostly from freedreno) around.
Eric Anholt [Mon, 11 Aug 2014 22:55:45 +0000 (15:55 -0700)]
vc4: Texture format support has nothing to do with VBO format support.
This was inherited from freedreno, but doesn't apply to us.
Eric Anholt [Mon, 11 Aug 2014 22:37:05 +0000 (15:37 -0700)]
vc4: Fix off-by-one in texture maximum levels.
It's 2048x2048 that's the max, not 1024x1024.
Eric Anholt [Mon, 11 Aug 2014 22:24:43 +0000 (15:24 -0700)]
vc4: Add support for the FLR opcode.
Kenneth Graunke [Mon, 11 Aug 2014 17:07:07 +0000 (10:07 -0700)]
i965: Delete the Gen8 code generators.
We now use the brw_eu_emit.c code instead.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Kenneth Graunke [Mon, 11 Aug 2014 17:05:01 +0000 (10:05 -0700)]
i965: Never use the Gen8 code generators.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>