Eric Engestrom
9c6fa9421d
egl: const _eglDriver
...
Converted using `s/_EGLDriver/const _EGLDriver/g` and dropped a couple
of irrelevant changes in comments, in the `_EGL_DRIVER_TYPECAST()` macro
and the typedef itself.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6129 >
2020-08-01 17:12:20 +00:00
Lepton Wu
81c0e2ab63
egl: Allow software rendering for vgem/virtio_gpu in platform_device
...
Then user could explicitly choose the underlying device for software
rendering when both vgem/virtio_vga are there.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5830 >
2020-08-01 10:07:25 +00:00
Matt Turner
eaf27eb512
intel/tools: Test notification subregisters
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
ac7ecd205b
intel/tools: Simplify notification register handling
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
63181df09b
intel/tools: Don't hardcode notification register
...
Previously we parsed a src non-terminal but did nothing with it. Since
the WAIT instruction is kind of weird, in that you have to give it the
same notification subregister for both destination and source, and it
always has an exec size of 1, let's parse a destination instead of a
source. This way, we can parse a writemask rather than a swizzle in
align16 mode, and easily convert the writemask to a swizzle to create
the source register.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
90c18ec8db
intel/tools: Manually set ARF register file/nr/subnr
...
brw_reg::subnr is in bytes, like the subnr field in the instruction
word, but we disassemble the subregister number in units of the type.
For example g0.3<1>F would have a subnr=12.
These non-terminals produce a brw_reg and feed into other non-terminals
that call brw_reg(), where they are passed the subnr that we set here.
brw_reg()'s subnr parameter is expected to be in terms of the register
type, and it is multiplied by the type size to calculate the subnr in
bytes.
In these non-terminals, we don't know the register type yet, so we
must store the subregister number as it was given to us in the .subnr
field and let the brw_reg() constructor handle the conversion to the
canonical byte-based subnr form when it knows the type.
Before this patch, subregister numbers applied to these registers would
be multiplied with the type size twice.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
af6d6f5c43
intel/tools: Pass integers, not enums, to stride()
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
c883c482be
intel/compiler: Relax SENDS regioning assertions
...
The next commit fixes a mistake in the assembler and ends up running
afoul of this assertion.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
363e5ef5a5
intel/tools: Simplify dstregion
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
3d9c673c0f
intel/tools: Simplify immediate handling
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
59801f07e7
intel/tools: Make writemask an integer
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
e115c499da
intel/tools: Make swizzle an integer
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
3e1602cc4f
intel/tools: Simplify register type handling
...
Produce a brw_reg_type rather than a whole brw_reg and rename a few
non-terminals.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
2851c218e2
intel/tools: Don't allow empty type specifier
...
It's preferable to require an explicit type.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
6809b93411
intel/tools: Remove stray newline
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Matt Turner
fdfbb1ed26
intel/tools: Fix typos
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956 >
2020-07-31 12:59:24 -07:00
Alyssa Rosenzweig
2dec9092be
pan/bit: Remove BI_SHIFT stub
...
Fixes compile error with -Dtools=panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: 946ff9b439 ("bifrost: Add support for nir_op_ishl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6142 >
2020-07-31 10:15:00 -04:00
Alyssa Rosenzweig
aa989aed6d
pan/bit: Update f32->f16 convert test
...
Needs a second argument to be consistent with the real IR and the
hardware instruction.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: 8a4efe2d73 ("pan/bi: Pack second argument of F32_TO_F16")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6142 >
2020-07-31 10:14:59 -04:00
Tomeu Vizoso
cf8a8b764e
ci: Set date in LAVA DUTs from NTP servers
...
The MinIO server is sometimes complaining about the submitted date being
too off.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6135 >
2020-07-31 14:14:38 +02:00
Eric Anholt
7f40db42a2
docs: Explain how to set up a personal gitlab runner.
...
I'm not the only one doing it, so document it, especially since there's a
new trick as of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5669
Reviewed-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5988 >
2020-07-31 09:17:02 +00:00
Connor Abbott
8e626879dd
freedreno/a6xx: Fix CP_BIN_SIZE_ADDRESS name
...
Also document some other registers gleaned from looking at the context
switch save/restore routines and fix CP_SDS_REM_SIZE, and make the names
line up with the CP perfcntr names. Note that the CP reads the draw
stream size in CP_SET_BIN_DATA5 using MEM_READ_ADDR, which is probably
why this was mistaken for the draw stream size address.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6123 >
2020-07-31 07:44:02 +00:00
David Stevens
6c11a7994d
i965/i915: Add colorspace support to YUV sampling
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6122 >
2020-07-31 07:27:03 +00:00
David Stevens
d8fdb8dab4
nir: Add colorspace support to YUV lowering pass
...
This change adds support for BT709 and BT2020 colorspace to the YUV
lowering pass. The default remains BT601.
This change also fixes minor imprecision in the last digits of the BT601
offsets due to computation from rounded values when the math was
simplified.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6122 >
2020-07-31 07:27:03 +00:00
Mike Blumenkrantz
f3509c0766
zink: add extension loading framework for spirv builder
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5969 >
2020-07-31 06:53:01 +00:00
Italo Nicola
a91011c9ec
pan/mdg: emit REGISTER_UNUSED on unused ALU src2
...
This saves power and time by skipping a roundtrip to the register file.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6128 >
2020-07-31 00:25:21 +00:00
Lepton Wu
a2065917cc
mapi: Return NULL function pointers for GL_EXT_debug_marker
...
Mesa returns a stub function pointer to glAnything for years.
Android framework till API level 30 just uses function pointers
returned from eglGetProcAddress without checking if the underlying
extension is supported. If we return stub pointers for functions
in GL_EXT_debug_marker, Android just uses our stub functions instead
of its own stubs and then fail the dEQP. In the past, the issue
didn't show up because mesa only has limited slots and run out of slots
before Android calls eglGetProcAddress on functions inside
GL_EXT_debug_marker.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5652 >
2020-07-30 23:45:56 +00:00
Eric Engestrom
258165bed4
egl: drop left-over function prototype
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Eric Engestrom
ed3f1e04c7
egl: rename _eglMatchDriver() to _eglInitializeDisplay()
...
... and fix the comment to better reflect what this really does.
The whole "match a driver at runtime" thing has been gone for years.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Eric Engestrom
6d6b82a159
egl: inline _eglMatchAndInitialize() and refactor _eglMatchDriver()
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Eric Engestrom
a77050c034
egl: fix _eglMatchDriver() return type
...
The one caller only ever checks if the return value is NULL or not, so
let's simplify the function by only returning that information.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Eric Engestrom
f91851e615
egl: drop unnecessary _eglGetDriver()
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Eric Engestrom
d24e3ea8cb
egl: replace _eglInitDriver() with a simple variable
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037 >
2020-07-30 23:24:30 +00:00
Italo Nicola
3d4deb659e
pan/mdg: remove ins->br_compact and ins->branch_extended
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
8150c1d632
pan/mdg: defer branch packing
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
140185eb04
pan/mdg: refactor emit_alu_bundle
...
This refactor prepares emit_alu_bundle() for the next commit that
reconstructs branch instructions right before emission.
It also simplifies the code since the previous control flow was only
better when we had the prepacked fields in midgard_instruction.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
0f0f9ee710
pan/mdg: remove ins->alu
...
This commit removes the `ins->alu` field from midgard_instruction,
simplifying the code by just recreating midgard_vector_alu later when we
have to emit it.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
5299239c2e
pan/mdg: externalize mir_pack_mod
...
midgard_print.c requires mir_pack_mod to remove references to ins->alu.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
1a4d165683
pan/mdg: defer register packing
...
This commit moves the packing of registers and other things from
install_registers_instr() to midgard_emit.c, right before emitting the
binary.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
bea6a652db
pan/mdg: eliminate references to ins->load_store.op
...
This commit makes `ins->op` the correct field to use with load_store
instructions.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
92c808cd47
pan/mdg: eliminate references to ins->texture.op
...
This commit makes the `ins->op` the correct field to use with texture
instructions.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
83592de7ad
pan/mdg: apply float outmods to textures
...
Texture instructions in midgard support float outmods, this commit makes
it so these instructions are emitted when the conditions are met.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
5011373e2b
pan/mdg: eliminate references to ins->alu.outmod
...
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.outmod` so that we can later remove the
`ins->alu` field from midgard_instruction.
Every place that was using `ins->alu.outmod` was changed to now use the
generic `ins->outmod` field instead.
We then reconstruct the outmod field right before emission.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
f34815c6be
pan/mdg: fix comment
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
5f7e0185cd
pan/mdg: eliminate references to ins->alu.reg_mode
...
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.reg_mode` so that we can later remove
the `ins->alu` field from midgard_instruction.
Every place that was using reg_mode was changed to now use the generic
`ins->src_type` field instead.
We then reconstruct the reg_mode field right before emission.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
f4c89bf9bd
pan/mdg: eliminate references to ins->alu.op
...
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.op` so that we can later remove the
`ins->alu` field from midgard_instruction.
Every place that was using ins->op was changed to now use the generic
`ins->op` field instead.
We then reconstruct the `alu.op` field right before emission.
This new field is generic and can contain opcodes for ALU, texture or
load/store instructions. It should be used in conjunction with
`ins->type`, just like the current prepacked `op` field.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
598527f2fe
pan/mdg: prepare effective_writemask()
...
In the next commits we will be removing the `alu` field from
midgard_instruction in order to simplify the code.
effective_writemask() doesn't actually use `alu` for anything, it only
needs to know the opcode.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Italo Nicola
b1b0ce04b3
pan/mdg: fix src_type in instructions that need a implicit zero
...
We were incorrectly assuming uint32 for src_type[1] regardless of
src_type[0].
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933 >
2020-07-30 22:55:36 +00:00
Eric Anholt
75b1f3d39d
drm-shim: Return -EINVAL instead of abort()ing on unknown ioctls.
...
I had this as abort() in my original implementation since I was doing
drm-shim and my kernel driver in parallel based around using a SW
simulator, and I wanted to always update both, but it means that people's
new feature detection code can easily end up breaing their drm-shim
shader-db runs (such as intel's kernel_has_dynamic_config_support()
checking for -ENOENT instead of -EINVAL for a feature, which showed up on
my personal runner but not fd.o's for reasons I'm unclear on).
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5994 >
2020-07-30 19:59:20 +00:00
Mike Blumenkrantz
c77a414ec2
u_prim_restart: handle indirect draws
...
this is pretty gross, but we need to map the indirect buffer to get the
index info and then use that for mapping the index buffer and translating
the restart index
Reviewed-by: Dave Airlie <airlied@redhat.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5886 >
2020-07-30 19:34:03 +00:00
Roman Stratiienko
a58081f97c
panfrost: Android build fixes 2020 week 31
...
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6109 >
2020-07-30 18:21:53 +00:00