Christian König [Sat, 14 Jan 2017 12:57:02 +0000 (13:57 +0100)]
vl/video_buffer: add support for P016
Just simply the description of the planes.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Christian König [Fri, 13 Jan 2017 18:11:43 +0000 (19:11 +0100)]
gallium: add P016 format
Same layout as NV12, but 16bit per channel instead of 8.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Kenneth Graunke [Mon, 13 Mar 2017 05:39:51 +0000 (22:39 -0700)]
i965: Delete unused last_ring local.
Dead since
071d80bde2a78f464a7f54c3e6c6e42845ef52e4, and causing
warnings.
Bas Nieuwenhuizen [Sun, 12 Mar 2017 13:12:19 +0000 (14:12 +0100)]
radv: Store shaders in VRAM.
Less IFETCH latency on misses. Shader code is write once read many,
so GTT doesn't make much sense anyway.
If it turns out to fragment the CPU visible VRAM too much, we can upload with SDMA.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 5 Mar 2017 23:58:45 +0000 (09:58 +1000)]
radv/ac: move to new image intrinsics.
This hooks up radv to the new image intrinsic builders.
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 7 Mar 2017 07:00:39 +0000 (17:00 +1000)]
radv: disabled scaled formats for transfers.
These really are only supported for vertex buffers.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Fri, 10 Mar 2017 02:28:53 +0000 (13:28 +1100)]
util/u_queue: make u_queue accessible to cpp
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Fri, 10 Mar 2017 00:30:01 +0000 (11:30 +1100)]
glsl: don't use ralloc for blob creation
There is no need to use ralloc here.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 23:07:43 +0000 (10:07 +1100)]
gallium/util: replace pipe_thread_setname() with u_thread_setname()
They do the same thing we just moved the function to be
accessible to all of Mesa.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 23:03:00 +0000 (10:03 +1100)]
gallium/util: replace pipe_thread_get_time_nano() with u_thread_get_time_nano()
They do the same thing we just moved the function to be
accessible to all of Mesa.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 22:57:58 +0000 (09:57 +1100)]
gallium/util: replace pipe_thread_create() with u_thread_create()
They do the same thing we just moved the function to be
accessible to all of Mesa.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 04:33:38 +0000 (15:33 +1100)]
gallium/util: move u_queue.{c,h} to src/util
This will allow us to use it outside of gallium for things like
compressing shader cache entries.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 04:20:33 +0000 (15:20 +1100)]
gallium/util: make use of new u_thread.h in u_queue.{c,h}
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 04:18:34 +0000 (15:18 +1100)]
util: add u_thread.h
This is a minimal copy of os_thread.h from gallium in order to move
u_queue.{c,h} to this directory.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 03:58:00 +0000 (14:58 +1100)]
gallium/util: use standard malloc/calloc/free in u_queue.c
This will help us moving the file to the shared src/util dir.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 03:36:17 +0000 (14:36 +1100)]
gallium/util: move u_string.h to src/util/u_string.h
This will help us move u_queue.c here eventually and also provide
string function wrappers for anyone wishing to port disk_cache.c
to windows.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 03:36:16 +0000 (14:36 +1100)]
gallium/util: remove unused header from u_string.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 03:36:15 +0000 (14:36 +1100)]
gallium/util: remove unused util_strbuf*
Looks like they have been unused since 2008
b8a7eef242f6bb97d90f.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Wed, 8 Mar 2017 03:36:14 +0000 (14:36 +1100)]
gallium/util: remove unused util_memmove()
This is not used anywhere and Visual Studio looks to have
supported memmove() for a long time if not always.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Thu, 9 Mar 2017 11:58:38 +0000 (22:58 +1100)]
glsl: don't recompile a shader on fallback unless needed
Because we optimistically skip compiling shaders if we have seen them
before we may need to compile them later at link time if they haven't
yet been use in a specific combination to create a program.
Rather than always recompiling we take advantage of the
gl_compile_status enum introduced in the previous patch to only
compile when we have previously skipped compilation.
This helps with regressions in app start-up times on cold cache
runs, compared with no cache.
Deus Ex: Mankind Divided start-up times:
cache disabled: ~3m15s
cold cache master: ~4m23s
cold cache with this patch: ~3m33s
Acked-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Thu, 9 Mar 2017 11:58:37 +0000 (22:58 +1100)]
mesa/glsl: introduce new gl_compile_status enum
This will allow us to tell if a shader really has been compiled or
if the shader cache has just seen it before.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Matt Turner [Sat, 11 Mar 2017 07:15:33 +0000 (23:15 -0800)]
i965: Initialize compaction tables in unit test.
Fixes: fa4b792e833a "i965: Move brw_init_compaction_tables() to brw_create_compiler()."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100154
Matt Turner [Fri, 10 Mar 2017 00:01:30 +0000 (16:01 -0800)]
i965: Move brw_init_compaction_tables() to brw_create_compiler().
... so that we can avoid threading complications or unnecessary
compaction table initializations (which just consists of setting some
pointers based on devinfo->gen).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Emil Velikov [Thu, 23 Feb 2017 17:05:50 +0000 (17:05 +0000)]
bin/get-fixes-pick-list.sh: do not mandate bash
Silly thinko on my end, as I was writing the script. There is nothing
bash specific in there.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:58:54 +0000 (19:58 +0000)]
bin/shortlog_mesa.sh: remove the final bashism
Remove the typeset built-in and toggle to /bin/sh
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Thu, 23 Feb 2017 11:57:49 +0000 (11:57 +0000)]
bin/bugzilla_mesa.sh: rework the looping method
We don't use DRYRUN (and no others scripts have one) so just drop it.
This allows us to rework the loop to the more commonly used "git .... |
while read foo; do ... done"
That in itself gets rid of the only remaining bashism and we can toggle
the shebang to /bin/sh.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:57:31 +0000 (19:57 +0000)]
wayland-egl/wayland-egl-symbols-check: do not mandate bash
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:56:42 +0000 (19:56 +0000)]
gbm/gbm-symbols-check: do not mandate bash
Analogous to previous commit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:56:07 +0000 (19:56 +0000)]
egl/egl-symbols-check: do not mandate bash
There's nothing bash specific in the script.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:54:58 +0000 (19:54 +0000)]
glsl/tests: remove any bashisms
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 18:15:59 +0000 (18:15 +0000)]
dri: use correct shebang for gen-symbol-redefs.py
This is a python2 script and the generic "python" may point to python3.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:23:16 +0000 (19:23 +0000)]
util: remove shebang from format_srgb.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:02:08 +0000 (19:02 +0000)]
xmlpool: remove shebang from gen_xmlpool.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:21:58 +0000 (19:21 +0000)]
genxml: remove shebang from gen_pack_header.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:39:13 +0000 (16:39 +0000)]
nir: remove shebang from python scripts
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 18:43:58 +0000 (18:43 +0000)]
st/xa: suffix xa-indent{,.sh} and add a shebang line
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 18:21:45 +0000 (18:21 +0000)]
gallium/tools: use correct shebang for python scripts
These are python2 scripts and the generic "python" may point to
python3.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:19:44 +0000 (16:19 +0000)]
gallium/tools: do not hardcode bash location
It is not guaranteed to be in /bin
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 18:36:56 +0000 (18:36 +0000)]
gallium/tests: remove execute bit from TGSI shader - vert-uadd.sh
Just like the the dozens of other shaders, the file is parsed by
separate tool and not executed.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:30:48 +0000 (16:30 +0000)]
mapi/gen: remove shebang from python scripts
All of those should be executed $PYTHON2/python2 [or equivalent] hence
why they are missing the execute bit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:04:05 +0000 (16:04 +0000)]
mapi: do not mandate bash for es*api/ABI-check
Seemingly there is nothing bash specific in these. The Debian
checkbashisms does not spot neither run in zsh.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:14:15 +0000 (15:14 +0000)]
bin/perf-annotate-jit: add .py suffix
To provide direct feedback about the file in question.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:56:49 +0000 (16:56 +0000)]
i965: remove shebang from brw_nir_trig_workarounds.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:55:45 +0000 (16:55 +0000)]
i965: remove execute bit from brw_nir_trig_workarounds.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:52:37 +0000 (16:52 +0000)]
mesa: remove shebang from python scripts
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:52:02 +0000 (16:52 +0000)]
mesa: remove execute bit from main/format_parser.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:49:46 +0000 (16:49 +0000)]
amd: remove shebang from python scripts
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:49:02 +0000 (16:49 +0000)]
amd: remove execute bit from python scripts
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:48:33 +0000 (16:48 +0000)]
gallium: remove shebang from python scripts
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:09:54 +0000 (15:09 +0000)]
gallium: remove execute bit from the python script(s)
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:20:31 +0000 (19:20 +0000)]
svga: remove shebang from svgadump/svga_dump.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:15:54 +0000 (19:15 +0000)]
svga: remove execute bit from svga_dump.py
The file is used to generate svgadump/svga_dump.c... in theory at least.
Atm. the file is checked in-tree but that is about to change later
commits.
As we get to that we'll use $PYTHON2 or equivalent as used throughout
the tree.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 19:19:36 +0000 (19:19 +0000)]
freedreno: remove shebang from ir3_nir_trig.py
Analogous to earlier commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:06:44 +0000 (15:06 +0000)]
freedreno: remove execute bit from ir3_nir_trig.py
The file is meant to be called with $(PYTHON2) and not executed
directly.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:41:00 +0000 (16:41 +0000)]
glsl: remove shebang from python scripts
All of the scripts are [must be] executed via $PYTHON2 [or equivalent]
hence why they are missing the execute bit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:58:10 +0000 (15:58 +0000)]
glsl/tests: remove execute bit from compare_ir python script
Nearly all the python scripts used in-tree are invoked via $PYTHON2 or
equivalent. As such having the execute bit not needed and generally
ill-advised.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:53:21 +0000 (15:53 +0000)]
glsl/tests: suffix .sh/.py files as applicable
This makes it easier/clearer as to:
- if the file should have the execute bit set (.py should not)
- do we need the shebang in the first place and if so what it should be
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 16:09:59 +0000 (16:09 +0000)]
mesa: drop the execute bit from gl.xml
This is a spec file which is parsed by scripts.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Wed, 22 Feb 2017 15:59:28 +0000 (15:59 +0000)]
mapi/glapi: remove unused next_available_offset.sh
Afaict there was no [documented] users since it was introduced.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Ben Widawsky [Wed, 26 Oct 2016 23:02:23 +0000 (16:02 -0700)]
gbm: Export a per plane getter for offset
Unlike stride, there was no previous offset getter, so it can be right
on the first try.
v2: Return EINVAL when plane is greater than total planes to make it
match the similar APIs.
Avoid leak after fromPlanar (Daniel)
Make sure when getting offsets we consider dumb images (Daniel)
v3: Use Jason's recommendation for handling the non-planar case.
v4: Return int64_t so we can get real errors
v5: Add an assertion for dumb BOs (Jason)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Ben Widawsky [Wed, 26 Oct 2016 20:36:42 +0000 (13:36 -0700)]
gbm: Export a per plane getter for stride
v2: Preserve legacy behavior when plane is 0 (Jason Ekstrand)
EINVAL when input plane is greater than total planes (Jason Ekstrand)
Don't leak the image after fromPlanar (Daniel)
Move bo->image check below plane count preventing bad index succeeding (Daniel)
v3: Fix DRIimage leak (using Jason's recommended change)
Make plane 0 return planar stride. This might break legacy behavior (Jason)
v4: Move bogus hunk for get_handle_for_plane to the right patch (Jason)
Fix error handling path to be cleaner (Jason)
v5: Add assert for dumb BOs to make sure plane == 0 (Jason)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Ben Widawsky [Wed, 26 Oct 2016 19:26:51 +0000 (12:26 -0700)]
gbm: Create a gbm_device getter for stride
This will be used so we can query information per plane.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Ben Widawsky [Fri, 2 Dec 2016 19:00:00 +0000 (11:00 -0800)]
gbm: Export a getter for per plane handles
v2: Make the error return be -1 instead of 0 because I think 0 is
actually valid.
v3: Set errno to EINVAL when the specified plane is above the total
planes. (Jason Ekstrand)
Return the bo's handle if there is no image ie. for dumb images like cursor (Daniel)
v4:
- Add assertions about plane == 0 (Jason)
- Add a comment about new restriction on planar dumb bo which is not an
earlier patch in the series.
- Correctly refactor from v2 in this patch; it ended up rebased into the
wrong patch.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Ben Widawsky [Wed, 30 Nov 2016 05:53:52 +0000 (21:53 -0800)]
gbm: Export a plane getter function
This will be used by clients that need to know the number of planes
allocated for them on behalf of the GL or other API. The best current
example of this is when an extra "plane" is allocated to store
compression data for the primary plane.
v2: Return 1 for cases where there is no image, ie. dumb bo (Daniel)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Ben Widawsky [Tue, 7 Mar 2017 23:06:23 +0000 (15:06 -0800)]
gbm: Explicitly disallow a planar dumb BO
As more GBM functionality support planes is being evaluated, it becomes
clear that a dumb bo can never actually be planar. It's questionable
whether it was ever feasible to do this, and later functionality will
implicitly assume a dumb BO is non-planar.
v2: Include stdbool.h
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Anuj Phogat [Fri, 3 Mar 2017 22:39:52 +0000 (14:39 -0800)]
i965: Rename brw_format_for_mesa_format() to brw_isl_format_for_mesa_format()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Robert Bragg [Fri, 5 Jun 2015 12:44:56 +0000 (13:44 +0100)]
i965: Add more Haswell OA metrics sets
This extends the brw_oa_hsw.xml to expose these additional queries:
- Compute Metrics Basic Gen7.5
- Compute Metrics Extended Gen7.5
- Memory Reads Distribution Gen7.5
- Memory Writes Distribution Gen7.5
- Metric set Sampler Balance
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 4 Jun 2015 21:42:38 +0000 (22:42 +0100)]
i965: Expose OA counters via INTEL_performance_query
This adds support for exposing basic Observation Architecture
performance counters on Haswell.
This support is based on the i915 perf kernel interface which is used
to configure the OA unit, allowing Mesa to emit MI_REPORT_PERF_COUNT
commands around queries to collect counter snapshots.
To take into account the small chance that some of the 32bit counters
could wrap around for long queries (~50 milliseconds for a GT3 Haswell @
1.1GHz) the implementation also collects periodic metrics.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 23 Feb 2017 14:45:10 +0000 (14:45 +0000)]
exec_list: Add a foreach_list_typed_from macro
This allows iterating list nodes from a given start point instead of
necessarily the list head.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 4 Jun 2015 12:55:37 +0000 (13:55 +0100)]
i965: Add script to gen code for OA counter queries
Avoiding lots of error prone boilerplate and easing our ability to add +
maintain support for multiple OA performance counter queries for each
generation:
This adds a python script to generate code for building up
performance_queries from the metric sets and counters described in
brw_oa_hsw.xml as well as functions to normalize each counter based on
the RPN expressions given.
Although the XML file currently only includes a single metric set, the
code generated assumes there could be many sets.
The metrics as described in XML get translated into C structures
which are registered in a brw->perfquery.oa_metrics_table hash table
keyed by the GUID of the metric set in XML.
v2: numerous python style improvements (Dylan)
v3: Makefile.am fixups (Emil)
v4: Pattern rule for codegen + orthogonal .c and .h rules (Robert)
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 4 Jun 2015 22:26:40 +0000 (23:26 +0100)]
i965: extend query/counter structs for OA queries
In preparation for generating code from brw_oa_hsw.xml for describing OA
performance counter queries this adds some OA specific members to
brw_perf_query that our generated code will initialize:
- The oa_metric_set_id is the ID we will pass to
DRM_IOCTL_I915_PERF_OPEN, and is an ID got via sysfs under:
/sys/class/drm/<card>/metrics/<guid/id
- The oa_format is the OA report layout we will request from the kernel
- The accumulator offsets determine where the different groups of A, B
and C counters are located within an intermediate 64bit 'accumulator'
buffer.
Additionally brw_perf_query_counter now has 64bit or float _read()
callback members for OA counters.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 4 Jun 2015 22:27:36 +0000 (23:27 +0100)]
i965: brw_context.h additions for OA unit query codegen
In preparation for generating code from the XML performance counter meta
data, this makes some additions to brw_context.h for this code to be
able to reference.
It adds a brw->perfquery.oa_metrics_table hash table for indexing built
up query descriptions by the GUID that is expected to be advertised by
the kernel (via sysfs) to be able to use that query.
It adds an 'OA_COUNTERS' brw_query_kind to be assigned to queries built
up by generated code.
It adds a brw->perfquery.sys_vars structure to have a consistent place
to represent the different system variables like $EuCoresTotalCount and
$EuSlicesTotalCount that are referenced by OA counter normalization
equations.
Although extending + referencing gen_device_info for these variables
was considered, these are some of the (mostly minor) reasons for
going with a dedicated structure:
- Currently we only need this info for the performance_query backend
and it might be a bit tedious to go back and initialize the state
for pre-Haswell devinfo structures.
- Considering the $SubsliceMask then the requirement for how multiple
per-slice masks are packed only comes from how the variables are
references by availability tests in XML, and might not be a good
general representation for tracking subslice masks if another use
case arises.
- If we used gen_device_info then we'd likely want to avoid making
assumptions about the C types during codegen and adding explicit
casts, while that's not necessary with a dedicated struct with all
members being uint64_t.
- This structure and the code for initializing it is currently shared
(just through copy & paste) with a few other projects dealing with
OA counters, and that's been convenient so far.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Robert Bragg [Thu, 4 Jun 2015 12:54:43 +0000 (13:54 +0100)]
i965: XML description of Haswell OA metric set
In preparation for exposing Gen Observation Architecture performance
counters via INTEL_performance_query this adds an XML description for an
initial 'Render Metrics Basic Gen7.5' query and corresponding counters.
The intention is to auto generate code for building a query from these
counters as well as the code for normalizing the individual counters.
Note that the upstream for this XML data is currently GPU Top:
https://github.com/rib/gputop
The files are maintained under gputop-data/ and they are themselves
derived from files in an internal 'MDAPI XML' schema. There are scripts
under gputop-scripts/ and make rules in gputop-data/Makefile.xml for
maintaining these files.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Pierre Moreau [Sat, 18 Feb 2017 17:51:50 +0000 (18:51 +0100)]
nv50/ir: check for origin insn in findOriginForTestWithZero
Function arguments do not have an "origin" instruction, causing a
NULL-pointer dereference without this check.
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Thu, 9 Mar 2017 09:50:14 +0000 (10:50 +0100)]
mesa/main: make use of lookup_samplerobj_locked()
There is no need to check sampler == 0 twice. This removes now
unused _mesa_lookup_samplerobj_locked().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Samuel Pitoiset [Thu, 9 Mar 2017 09:50:13 +0000 (10:50 +0100)]
mesa/main: inline {begin,end}_samplerobj_lookups()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Grazvydas Ignotas [Thu, 2 Mar 2017 23:59:57 +0000 (01:59 +0200)]
glsl/blob: clear padding bytes
Since blob is intended for serializing data, it's not a good idea to
leave padding holes with uninitialized data, which may leak heap
contents and hurt compression if the blob is later compressed, like
done by shader cache. Clear it.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Grazvydas Ignotas [Thu, 9 Mar 2017 00:54:53 +0000 (02:54 +0200)]
util/disk_cache: fix size subtraction on 32bit
Negating size_t on 32bit produces a 32bit result. This was effectively
adding values close to UINT_MAX to the cache size (the files are usually
small) instead of intended subtraction.
Fixes 'make check' disk_cache failures on 32bit.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Grazvydas Ignotas [Thu, 9 Mar 2017 00:54:52 +0000 (02:54 +0200)]
util/disk_cache: fix compressed size calculation
It incorrectly doubles the size on each iteration.
Fixes: 85a9b1b5 "util/disk_cache: compress individual cache entries"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Lionel Landwerlin [Tue, 7 Mar 2017 18:37:58 +0000 (18:37 +0000)]
glsl: builtin: always return clones of the builtins
Builtins are created once and allocated using their own private ralloc
context. When reparenting IR that includes builtins, we might be steal
bits of builtins. This is problematic because these builtins might now
be freed when the shader that includes then last is disposed. This
might also lead to inconsistent ralloc trees/lists if shaders are
created on multiple threads.
Rather than including builtins directly into a shader's IR, we should
include clones of them in the ralloc context of the shader that
requires them. This fixes double free issues we've been seeing when
running shader-db on a big multicore (72 threads) server.
v2: Also rename _mesa_glsl_find_builtin_function_by_name() to better
reflect how this function is used. (Ken)
v3: Rename ctx to mem_ctx (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 8 Mar 2017 00:12:00 +0000 (16:12 -0800)]
i965: Delete render ring prelude.
This was a hook I came up when trying to do the initial performance
counter work years ago. Nothing's used it for a long time, and the
upcoming performance counter support doesn't want it either.
So, goodbye render ring prelude.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Vinson Lee [Wed, 8 Mar 2017 22:56:04 +0000 (14:56 -0800)]
swr: s/uint/enum pipe_render_cond_flag/
Fix build error.
swr_context.cpp: In function ‘void swr_blit(pipe_context*, const pipe_blit_info*)’:
swr_context.cpp:336:44: error: invalid conversion from ‘uint {aka unsigned int}’ to ‘pipe_render_cond_flag’ [-fpermissive]
ctx->render_cond_mode);
~~~~~^~~~~~~~~~~~~~~~
Fixes: b0d39384307d ("gallium: s/uint/enum pipe_render_cond_flag/ for set_render_condition()")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100133
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bas Nieuwenhuizen [Sun, 5 Mar 2017 16:17:06 +0000 (17:17 +0100)]
radv: Don't flush the CB before doing a fast clear eliminate.
The only way we write CMASK/DCC compressed textures through shaders
is fast clears and CMASK/DCC inits, which have their own flushes.
Hence the CB cache is always up to date.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sun, 5 Mar 2017 14:52:28 +0000 (15:52 +0100)]
radv: Don't emit cache flushes on subpass switch.
I think we should only flush right before an action (draw/dispatch etc.),
as otherwise it is too easy to issue redundant flushes.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 22:51:01 +0000 (23:51 +0100)]
radv: Only flush for the needed stages, and before the flushes.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 22:45:45 +0000 (23:45 +0100)]
radv: Don't invalidate CB/DB for images that aren't modified outside CB/DB.
Without stores, the only writes are fast clears, transfers and metadata
initialization, each of which have the appropiate invalidations already.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 20:36:55 +0000 (21:36 +0100)]
radv: Flush more caches after writes.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 20:34:53 +0000 (21:34 +0100)]
radv: Don't flush for fixed-function reading.
The data should always be in memory after a src flush.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 20:31:53 +0000 (21:31 +0100)]
radv: Invalidate the correct caches for CB/DB dst barriers.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Wed, 8 Mar 2017 20:25:00 +0000 (21:25 +0100)]
radv: Determine cache flushes per object.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Samuel Pitoiset [Wed, 8 Mar 2017 13:30:40 +0000 (14:30 +0100)]
mesa/main: remove unused _mesa_new_texture_image()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Dave Airlie [Wed, 8 Mar 2017 22:26:13 +0000 (08:26 +1000)]
radv/ac: fixup texture coord to have right number of channels.
Jason has patches to add validation to this area, this should fix
radv shaders.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Thu, 2 Mar 2017 23:12:09 +0000 (10:12 +1100)]
st/nine: pass NULL to ureg_get_tokens()
The number of tokens in never used and the pointer is NULL checked
so just pass NULL.
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Matt Turner [Wed, 8 Mar 2017 21:57:20 +0000 (13:57 -0800)]
docs: ARB_shader_atomic_counter_ops is enabled on i965/gen7+.
This extension was enabled in commit
40dd45d0c6aa ("i965: Enable
ARB_shader_atomic_counter_ops") but the commit failed to update the
release notes or features.txt. The release notes ship has sailed, since
the commit was in 13.0.
Eric Anholt [Wed, 8 Mar 2017 20:07:16 +0000 (12:07 -0800)]
vc4: Fix math with a condition flag set.
Math results land in r4, regardless of the condition. To implement them,
we just need to ensure that the results are moved out of r4 (as often
happens anyway, the values is live across another math instruction), so
that we can attach the condition to the MOV.
Fixes dEQP-GLES2.functional.shaders.random.all_features.fragment.93 and a
couple others, that were assertion failing that their conditions hadn't
been handled during the QIR->QPU stage.
Eric Anholt [Sat, 4 Mar 2017 01:03:44 +0000 (17:03 -0800)]
vc4: Fix register pressure cost estimates when a src appears twice.
This ended up confusing the scheduler for things like fabs (implemented as
fmaxabs x, x) or squaring a number, and it would try to avoid scheduling
them because it appeared more expensive than other instructions.
Fixes failure to register allocate in
dEQP-GLES2.functional.uniform_api.random.3 with almost no shader-db
effects (+.35% max temps)
Eric Anholt [Sat, 4 Mar 2017 00:37:50 +0000 (16:37 -0800)]
vc4: Report to shader-db how many threads a fragment shader has.
Doing instruction count analysis when we emit the thread switches that
will save us from tons of stalls is kind of missing the point.
Eric Anholt [Tue, 7 Mar 2017 02:04:12 +0000 (18:04 -0800)]
Revert "vc4: Lazily emit our FS/VS input loads."
This reverts commit
292c24ddac5acc35676424f05291c101fcd47b3e. It broke a
lot of GLES2 deqp, and I see at least one problem that will require some
serious rework to fix.
Marek Olšák [Mon, 6 Mar 2017 22:57:33 +0000 (23:57 +0100)]
radeonsi: fix elimination of literal VS outputs
broken when switched to the new intrinsics.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fabio Estevam [Sat, 4 Mar 2017 22:07:27 +0000 (19:07 -0300)]
loader: Move non-error message to debug level
Currently when running mesa on imx6 the following loader warnings
are seen:
# kmscube -D /dev/dri/card1
MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
Using display 0x1920948 with EGL version 1.4
As this is not an error message, change it to debug level in
order to have a cleaner log output.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>