Mateusz Krzak
f4fc2ece57
panfrost: use os_mmap and os_munmap
...
32-bit needs mmap64 for 64-bit offsets. We get 64-bit offsets from kernel.
Signed-off-by: Mateusz Krzak <kszaquitto@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2019-04-12 16:33:00 +00:00
Mateusz Krzak
411da8b80d
panfrost: cast bo_handles pointer to uintptr_t first
...
Required for 64-bit kernel to interpret the pointer from 32-bit userspace.
Signed-off-by: Mateusz Krzak <kszaquitto@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2019-04-12 16:33:00 +00:00
Jason Ekstrand
7eaaff18cb
anv/pipeline: Fix MEDIA_VFE_STATE::PerThreadScratchSpace on gen7
...
We were always programming it with the Broadwell convention which is too
large by a factor of two on Haswell and just plain wrong on IVB and BYT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable@lists.freedesktop.org
2019-04-12 16:08:35 +00:00
Eric Engestrom
da1a5a19bd
gitlab-ci: add lima to the build
...
Suggested-by: Karol Herbst <karolherbst@gmail.com >
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
2019-04-12 15:43:19 +00:00
Marek Olšák
f4ae188d50
ac: use the common helper ac_apply_fmask_to_sample
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
2019-04-12 11:35:31 -04:00
Marek Olšák
971bc10177
radeonsi: set AC_FUNC_ATTR_READNONE for image opcodes where it was missing
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
2019-04-12 11:34:39 -04:00
Marek Olšák
467ff6ebfe
mesa: don't overwrite existing shader files with MESA_SHADER_CAPTURE_PATH
...
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
2019-04-12 11:34:39 -04:00
Marek Olšák
bd2995c8b7
glsl: allow the #extension directive within code blocks for the dri option
...
for Viewperf 13
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
2019-04-12 11:34:39 -04:00
Samuel Pitoiset
6718bb57ac
ac/nir: remove some useless integer casts for ALU operations
...
Sources are always casted to integers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
8a6442075f
ac/nir: remove useless integer cast in visit_image_load()
...
ac_build_image_opcode() casts if necessary and buffer images
are casted too.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
ffbb62f808
ac/nir: remove useless integer cast in adjust_sample_index_using_fmask()
...
It's already casted if necessary in ac_build_image_opcode().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
7b5b27a685
ac/nir: remove useles LLVMGetUndef for nir_op_pack_64_2x32_split
...
Trivial.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
fd4041987b
ac: add ac_build_load_helper_invocation() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
590a4c8981
ac: add ac_build_ddxy_interp() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
4cb13e9462
ac: add ac_build_umax() and use it where possible
...
This changes the predicate from LessThan to Equal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:55 +02:00
Samuel Pitoiset
cf88bfa75a
ac/nir: make use of ac_build_umin() where possible
...
This changes the predicate from LessThan to Equal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:54 +02:00
Samuel Pitoiset
15dd81913f
ac/nir: make use of ac_build_imin() where possible
...
This changes the predicate from LessThan to Equal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:54 +02:00
Samuel Pitoiset
d7a0c0d53b
ac/nir: make use of ac_build_imax() where possible
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 17:30:54 +02:00
Karol Herbst
a55c7352d6
lima: add bool parameter to type_size function
...
Fixes: 035759b61b
("nir/i965/freedreno/vc4: add a bindless bool to type size functions")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Icenowy Zheng <icenowy@aosc.io >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
2019-04-12 17:08:53 +02:00
Karol Herbst
98934e6aa1
nvc0/nir: enable bindless texture
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
89a81fbd98
nv50/ir/nir: add support for bindless images
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
b286cdedb7
nv50/ir/nir: handle bindless texture
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
2019-04-12 09:02:59 +02:00
Timothy Arceri
d62d434fe9
ac/nir_to_llvm: add image bindless support
...
With this all piglit bindless image tests pass on radeonsi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Timothy Arceri
55fb93b586
ac/nir_to_llvm: make get_sampler_desc() more generic and pass it the image intrinsic
...
This will be required by the bindless support in the following patches.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
4a3c04a11f
glsl/nir: add support for lowering bindless images_derefs
...
v2: handle atomics as well
make use of nir_rewrite_image_intrinsic
v3: remove call to nir_remove_dead_derefs
v4: (Timothy Arceri) dont actually call lowering yet
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v3)
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
0b2e8d9e17
glsl/nir: fetch the type for images from the deref instruction
...
fixes retrieving the sampler type for bindless images stored inside structs.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
d7bbb3caf1
glsl_to_nir: handle bindless textures
...
v2: add support for AMD
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v1)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Timothy Arceri
035759b61b
nir/i965/freedreno/vc4: add a bindless bool to type size functions
...
This required to calculate sizes correctly when we have bindless
samplers/images.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Karol Herbst
3b2a9ffd60
nir: move brw_nir_rewrite_image_intrinsic into common code
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2019-04-12 09:02:59 +02:00
Icenowy Zheng
400f0bfba1
lima: lower bool to float when building shaders
...
Both processors of Mali Utgard are float-only, so bool are not
acceptable data type of them. Fortunately the NIR compiler
infrastructure has a lower pass to lower bool to float.
Call this lower pass to lower bool to float for both GP and PP. This
makes Glamor on Xorg server 1.20.3 at least doesn't hang when starting
gtk3-demo.
The old map of nir op bcsel is changed to fcsel, and the map of b2f32 in
PP is dropped because it's not needed now (it's originally only mapped
to ppir_op_mov).
Signed-off-by: Icenowy Zheng <icenowy@aosc.io >
Reviewed-by: Qiang Yu <yuq825@gmail.com >
2019-04-12 13:40:47 +08:00
Tomeu Vizoso
8f1c686bca
panfrost: Guard against reading past end of buffer
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2019-04-12 07:12:17 +02:00
Tomeu Vizoso
c35ae93803
panfrost: split asserts in pandecode
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2019-04-12 07:11:52 +02:00
Dave Airlie
604d89c2d1
llvmpipe: fix undefined shift 1 << 31.
...
Pointed out by coverity.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
2019-04-12 08:54:02 +10:00
Dave Airlie
4690f90728
swrast: fix undefined shift of 1 << 31
...
Pointed out by coverity
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
2019-04-12 08:53:59 +10:00
Dave Airlie
e4ed08873b
draw: fix undefined shift of (1 << 31)
...
Pointed out by a coverity scan.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
2019-04-12 08:53:10 +10:00
Kenneth Graunke
4fcb749044
iris: Actually pin the scratch BO.
...
We were pinning it for compute shaders, and pinning it when restoring
saved buffers, but we never actually pinned it in the original batch
for VS/TCS/TES/GS/FS.
Fixes rendering in GFXBench5's Tessellation demo and a bunch of Piglit
geometry shader tests.
2019-04-11 15:03:27 -07:00
Lionel Landwerlin
628c9ca908
anv: store heap address bounds when initializing physical device
...
We can then reuse those bounds to initialize the VMA heaps at logical
device creation.
This fixes an issue on EHL which has only 36bits of VMA. We were
incorrectly using the fixed 48bits upper bound to initialize the
logical device heap, resulting in addresses beyong the device's
limits.
v2: Don't confuse heap size (limited by system memory) and VMA size
(limited by number of addressing bits the platform has)
v3: Fix low heap vma_size :( (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reported-by: James Xiong <james.xiong@intel.com >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com > (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v2)
2019-04-11 22:56:43 +01:00
Jason Ekstrand
316a98dec9
intel/common: Support bigger right-shifts with mi_builder
...
Because why not?
2019-04-11 18:04:09 +00:00
Jason Ekstrand
0d6dea0ac8
anv/cmd_buffer: Use gen_mi_sub instead of gen_mi_add with a negative
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
d17dd46b09
anv: Move mi_memcpy and mi_memset to gen_mi_builder
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
bacb21fc6b
anv: Use gen_mi_builder for queries
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
48da45891e
anv: Use gen_mi_builder for conditional rendering
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
a3b0894afc
anv: Use gen_mi_builder for indirect dispatch
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
b829dc30c1
anv: Use gen_mi_builder for indirect draw parameters
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
0122a6f037
anv: Use gen_mi_builder for computing resolve predicates
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
83b46ad6d8
anv: Use gen_mi_builder for CmdDrawIndirectByteCount
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
8b8deeca78
intel/common: Add unit tests for gen_mi_builder
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Jason Ekstrand
2f7fcd103e
intel/common: Add a MI command builder
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
2019-04-11 18:04:09 +00:00
Eric Anholt
8f065596d2
v3d: Add an optimization pass for redundant flags updates.
...
Our exec masking introduces lots of redundant flags updates, and even
without that there will be cases where NIR comparisons on the same sources
for different reasons may generate the same comparison instruction before
the selection.
total instructions in shared programs: 6492930 -> 6460934 (-0.49%)
total uniforms in shared programs: 2117460 -> 2115106 (-0.11%)
total spills in shared programs: 4983 -> 4987 (0.08%)
total fills in shared programs: 6408 -> 6416 (0.12%)
2019-04-11 09:24:02 -07:00
Lubomir Rintel
3dd2001993
kmsro: Extend to include armada-drm
...
This allows using the Marvell Armada display controllers (with the
armada drm modesetting driver) along with the render-only drivers,
such as Etnaviv on an OLPC XO-1.75 laptop.
v2:
- Add to Android.mk too
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-04-11 15:53:29 +00:00