OSDN Git Service
Kenneth Graunke [Wed, 5 Dec 2018 08:57:07 +0000 (00:57 -0800)]
iris: Move iris_stream_output_target def to iris_context.h
now that it doesn't have genxml
Kenneth Graunke [Wed, 5 Dec 2018 08:55:45 +0000 (00:55 -0800)]
iris: Don't bother packing 3DSTATE_SO_BUFFER at create time
We have to do half the packet late anyway, we may as well just do it
all at set time. This also lets us move the struct def out of genxml
Kenneth Graunke [Wed, 5 Dec 2018 06:04:16 +0000 (22:04 -0800)]
iris: Add _MI_ALU helpers that don't paste
This lets you pass arguments as function parameters
Kenneth Graunke [Wed, 5 Dec 2018 06:02:50 +0000 (22:02 -0800)]
iris: Reorder LRR parameters to have dst first.
LRI and LRM both put dst first, be consistent.
Kenneth Graunke [Wed, 5 Dec 2018 00:38:14 +0000 (16:38 -0800)]
iris: rewrite set_vertex_buffer and VB handling
I was using the Gallium API wrong. set_* functions with start_slot
and count parameters are supposed to update a subrange of the items.
I had been trashing all bound vertex buffers and starting over.
This should hopefully also make it easier to slot in additional
VERTEX_BUFFER_STATEs at draw time, say, for shader draw parameters.
Kenneth Graunke [Tue, 4 Dec 2018 22:11:51 +0000 (14:11 -0800)]
iris: handle PatchVerticesIn as a system value.
Tapani Pälli [Mon, 3 Dec 2018 12:15:13 +0000 (14:15 +0200)]
iris: add Android build
Note that at least following additional libs/components require changes
since they refer to BOARD_GPU_DRIVERS variable which is used to select
the driver:
- mixins
- minigbm
- libdrm
- drm_gralloc
v2: (feedback by Gustaw Smolarczyk) Fix trailing \ in a few cases
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Kenneth Graunke [Tue, 4 Dec 2018 08:18:41 +0000 (00:18 -0800)]
iris: override alpha to one src1 blend factors
No idea why this used to pass and doesn't after updating...seems like
we should have been handling it all along...
Kenneth Graunke [Mon, 3 Dec 2018 10:59:08 +0000 (02:59 -0800)]
iris: Always do rasterizer discard in clipper
but continue doing it in SOL if possible because it's faster
Fixes ./bin/ext_transform_feedback-discard-drawarrays - simpler too
Kenneth Graunke [Mon, 3 Dec 2018 10:59:08 +0000 (02:59 -0800)]
iris: Fix primitive generated query active flag
Kenneth Graunke [Mon, 3 Dec 2018 10:08:23 +0000 (02:08 -0800)]
iris: Enable guardband clipping
Kenneth Graunke [Mon, 3 Dec 2018 10:02:49 +0000 (02:02 -0800)]
iris: Clamp viewport extents to the framebuffer dimensions
Fixes arb_framebuffer_no_attachments-query's resize subtest.
Kenneth Graunke [Mon, 3 Dec 2018 09:03:17 +0000 (01:03 -0800)]
iris: Fix clear dimensions
Fixes depthstencil-render-miplevels 1024 s=z24_s8
Kenneth Graunke [Mon, 3 Dec 2018 07:30:09 +0000 (23:30 -0800)]
iris: Drop continues in resolve
Now that we u_bit_scan we know it exists
Kenneth Graunke [Mon, 3 Dec 2018 07:17:44 +0000 (23:17 -0800)]
iris: Replace num_textures etc with a bitmask we can scan
More accurate bounds, plus can skip dead ones
Kenneth Graunke [Mon, 3 Dec 2018 07:15:41 +0000 (23:15 -0800)]
iris: Fix set_sampler_views with start > 0
Kenneth Graunke [Mon, 3 Dec 2018 07:07:27 +0000 (23:07 -0800)]
iris: fix set_sampler_views to not unbind, be better about bounds
Kenneth Graunke [Mon, 3 Dec 2018 07:03:08 +0000 (23:03 -0800)]
iris: fix overhead regression from flushing for storage images
st calls us with count = 32 but a NULL pointer...we only really care
about the highest non-NULL image...
Kenneth Graunke [Mon, 3 Dec 2018 06:30:07 +0000 (22:30 -0800)]
iris: Fix NOS mechanism
Set bits, not values
Kenneth Graunke [Mon, 3 Dec 2018 00:06:01 +0000 (16:06 -0800)]
iris: re-pin inherited streamout buffers
Kenneth Graunke [Sun, 2 Dec 2018 23:52:46 +0000 (15:52 -0800)]
iris: reemit SBE when sprite coord origin changes
fixes arb_point_sprite-checkerboard
Kenneth Graunke [Sun, 2 Dec 2018 23:41:13 +0000 (15:41 -0800)]
iris: omask can kill
Kenneth Graunke [Sun, 2 Dec 2018 22:51:52 +0000 (14:51 -0800)]
iris: reject all clipping when we can't use streamout render disabled
Kenneth Graunke [Sun, 2 Dec 2018 22:39:29 +0000 (14:39 -0800)]
iris: make clipper statistics dynamic
Kenneth Graunke [Sun, 2 Dec 2018 22:16:08 +0000 (14:16 -0800)]
iris: CS stall for stream out -> VB
i965 doesn't do this, but I suspect it just stalls a lot and doesn't hit
this. Fixes ext_transform_feedback-position render among others.
Kenneth Graunke [Sun, 2 Dec 2018 21:37:55 +0000 (13:37 -0800)]
iris: fix dma buf import strides
Kenneth Graunke [Sun, 2 Dec 2018 01:07:09 +0000 (17:07 -0800)]
iris: fix alpha channel for RGB BC1 formats
Jason Ekstrand [Thu, 25 Oct 2018 22:02:56 +0000 (17:02 -0500)]
iris: Allocate buffer resources separately
(cleaned up by Ken - make sure a bunch of things were more obviously
not using res->surf, do allow checking res->surf.tiling == LINEAR,
drop format cpp checks that aren't needed, drop memzone handling for
images, assume buffers / non-buffers in a few places...)
Kenneth Graunke [Fri, 30 Nov 2018 07:03:20 +0000 (23:03 -0800)]
iris: Don't bother considering if the underlying surface is a cube
Dave fixed it to consider whether the sampler view is a cube.
With that, there's no point (possibly harm) in looking if the original
resource was a cube...if it's an array view, we don't want to treat it
as a cube anymore...
Kenneth Graunke [Fri, 30 Nov 2018 06:23:34 +0000 (22:23 -0800)]
iris: move some non-buffer case code in a bit
Kenneth Graunke [Thu, 29 Nov 2018 00:43:21 +0000 (16:43 -0800)]
iris: Stop leaking iris_uncompiled_shaders like mad
Now shader-db actually executes. We still need a plan for culling
dead iris_compiled_shaders...
Kenneth Graunke [Wed, 28 Nov 2018 23:23:13 +0000 (15:23 -0800)]
iris: Destroy the bufmgr
Plugs a 12360 byte leak
Kenneth Graunke [Wed, 28 Nov 2018 23:29:38 +0000 (15:29 -0800)]
iris: Fix IRIS_MEMZONE_COUNT to exclude the border color pool
This is supposed to exclude single address zones. We were getting
too many VMA allocators but failing to set them up, which worked out
because we also forgot to destroy them...
Kenneth Graunke [Wed, 28 Nov 2018 23:22:07 +0000 (15:22 -0800)]
iris: Unref unbound_tex resource
Plugs a 12536 byte leak
Kenneth Graunke [Wed, 28 Nov 2018 23:15:21 +0000 (15:15 -0800)]
iris: Destroy the border color pool
This plugs a 12224 byte leak
Kenneth Graunke [Wed, 28 Nov 2018 23:10:07 +0000 (15:10 -0800)]
iris: Destroy transfer helper on screen teardown
Plugs a 16 byte leak
Kenneth Graunke [Wed, 28 Nov 2018 23:06:00 +0000 (15:06 -0800)]
iris: Fix failed to compile TCS message
Kenneth Graunke [Wed, 28 Nov 2018 10:30:42 +0000 (02:30 -0800)]
iris: Rework tiling/modifiers handling
We were being very picky about things being Y tiled. But, not
everything can be - for example, > 16382 surfaces on SKL GT1-3
have to fall back to linear.
Instead, give ISL options and let it pick.
Kenneth Graunke [Tue, 27 Nov 2018 23:30:16 +0000 (15:30 -0800)]
iris: fix conditional compute, don't stomp predicate for pipelined queries
Kenneth Graunke [Tue, 27 Nov 2018 22:20:48 +0000 (14:20 -0800)]
iris: check query first
this lets us avoid the predicate bit in more cases, which is nice
Kenneth Graunke [Tue, 27 Nov 2018 04:55:59 +0000 (20:55 -0800)]
iris: for BLORP, only use the predicate enable bit when USE_BIT
Dave Airlie [Mon, 26 Nov 2018 23:03:16 +0000 (09:03 +1000)]
iris: add conditional render support
Kenneth Graunke [Tue, 27 Nov 2018 23:35:48 +0000 (15:35 -0800)]
iris: drop key_size_for_cache
dead since my program cache API rework. we could still use it for one
function, but it's so trivial to pass the size, that it's probably not
worth the extra code
Dave Airlie [Fri, 9 Nov 2018 02:13:17 +0000 (12:13 +1000)]
iris: iris add load register reg32/64
These will be needed for broadwell and conditional render
Dave Airlie [Tue, 27 Nov 2018 03:42:58 +0000 (13:42 +1000)]
iris: execute compute related query on compute batch.
This only happens for the compute invocations query.
Dave Airlie [Tue, 27 Nov 2018 03:02:03 +0000 (13:02 +1000)]
iris: fix cube texture view
Kenneth Graunke [Mon, 26 Nov 2018 22:59:17 +0000 (14:59 -0800)]
iris: fix some SO overflow query bugs and tidy the code a bit
Dave Airlie [Mon, 26 Nov 2018 05:22:48 +0000 (15:22 +1000)]
iris: add initial transform feedback overflow query paths (V3)
v2: fix cpu overflow calc
v3: use a struct
Kenneth Graunke [Mon, 26 Nov 2018 03:03:43 +0000 (19:03 -0800)]
iris: actually flush for storage images
Kenneth Graunke [Sat, 24 Nov 2018 10:55:40 +0000 (02:55 -0800)]
iris: add an extra BT assert from Chris Wilson
Kenneth Graunke [Sat, 24 Nov 2018 03:12:36 +0000 (19:12 -0800)]
iris: add assertions about binding table starts
Kenneth Graunke [Fri, 23 Nov 2018 21:01:47 +0000 (13:01 -0800)]
iris: drop pull constant binding table entry
nothing uses this
Kenneth Graunke [Fri, 23 Nov 2018 19:47:55 +0000 (11:47 -0800)]
iris: Use program's num textures not the state tracker's bound
the state tracker might bind more textures than the program is using.
Kenneth Graunke [Thu, 22 Nov 2018 10:55:27 +0000 (02:55 -0800)]
iris: Enable precompiles
Kenneth Graunke [Thu, 22 Nov 2018 02:15:28 +0000 (18:15 -0800)]
iris: rework program cache interface
This exposes iris_upload_shader() without having to bind it, which will
be useful for precompiles. It also lets us examine the old programs and
flag dirty bits at a higher level, rather than cramming all that
knowledge into the cache layer.
Kenneth Graunke [Thu, 22 Nov 2018 01:02:02 +0000 (17:02 -0800)]
iris: Use wrappers for create_xs_state rather than a switch statement
Kenneth Graunke [Thu, 22 Nov 2018 00:53:09 +0000 (16:53 -0800)]
iris: fix comment location
Kenneth Graunke [Thu, 22 Nov 2018 00:45:14 +0000 (16:45 -0800)]
iris: export iris_upload_shader
Kenneth Graunke [Thu, 22 Nov 2018 00:45:35 +0000 (16:45 -0800)]
iris: fix prototype warning
Kenneth Graunke [Wed, 21 Nov 2018 19:54:37 +0000 (11:54 -0800)]
iris: Re-pin even if nothing is dirty
Kenneth Graunke [Wed, 21 Nov 2018 09:03:48 +0000 (01:03 -0800)]
iris: Flush for history at various moments
When we blit, transfer, or copy_resource to a buffer, we need to flush
to ensure any stale data for that buffer is invalidated in the caches.
bind_history will inform us which caches need to be flushed.
Also, for any push constant buffers, we need to flag those dirty so
that we re-emit 3DSTATE_CONSTANT_*, causing the data to be re-pushed.
Kenneth Graunke [Wed, 21 Nov 2018 08:52:25 +0000 (00:52 -0800)]
iris: add iris_flush_and_dirty_for_history
Kenneth Graunke [Wed, 21 Nov 2018 08:38:49 +0000 (00:38 -0800)]
iris: Track a binding history for buffer resources
This will let us know what caches to flush / state to dirty when
altering the contents of a buffer.
Kenneth Graunke [Wed, 21 Nov 2018 19:37:12 +0000 (11:37 -0800)]
iris: drop long dead XXX comment
Kenneth Graunke [Wed, 21 Nov 2018 08:06:46 +0000 (00:06 -0800)]
iris: Do the 48-bit vertex buffer address invalidation workaround
Kenneth Graunke [Wed, 21 Nov 2018 07:03:16 +0000 (23:03 -0800)]
iris: Fix VIEWPORT/LAYER in stream output info
Fixes glsl-1.50-transform-feedback-builtins and
ext_transform_feedback-builtin-varyings gl_PointSize
Kenneth Graunke [Wed, 21 Nov 2018 06:51:26 +0000 (22:51 -0800)]
iris: Fix buffer -> buffer copy_region
Size can be too large for a surf, blorp_buffer_copy chops things up
into segments we can actually handle
Fixes map_buffer_range_test and copy_buffer_coherency
Kenneth Graunke [Wed, 21 Nov 2018 02:16:02 +0000 (18:16 -0800)]
iris: Lie about indirects
fixes interpolateAt tests
Kenneth Graunke [Tue, 20 Nov 2018 21:42:31 +0000 (13:42 -0800)]
iris: Enable ctx->Const.UseSTD430AsDefaultPacking
hooray for obscurely named pipe caps with bizarre descriptions!
Kenneth Graunke [Tue, 20 Nov 2018 19:25:13 +0000 (11:25 -0800)]
iris: update comment
Kenneth Graunke [Tue, 20 Nov 2018 19:20:27 +0000 (11:20 -0800)]
iris: RT flush for memorybarrier with texture bit
PIXEL_BUFFER_BARRIER_BIT turns into PIPE_BARRIER_TEXTURE and it ought
to trigger an RT flush, according to brw_memory_barrier
Kenneth Graunke [Tue, 20 Nov 2018 17:12:54 +0000 (09:12 -0800)]
iris: PIPE_CONTROL workarounds for GPGPU mode
Kenneth Graunke [Tue, 20 Nov 2018 17:00:22 +0000 (09:00 -0800)]
iris: Put batches in an array
We keep re-making this array all over the place
Kenneth Graunke [Tue, 20 Nov 2018 17:00:43 +0000 (09:00 -0800)]
iris: put render batch first in fence code
this shouldn't matter, but it will make the next refactor easier
Kenneth Graunke [Tue, 20 Nov 2018 16:48:34 +0000 (08:48 -0800)]
iris: flush the compute batch too if border pool is redone
Kenneth Graunke [Tue, 20 Nov 2018 08:11:18 +0000 (00:11 -0800)]
iris: leave a TODO
Chris Wilson [Wed, 7 Nov 2018 11:50:02 +0000 (11:50 +0000)]
iris: Add fence support using drm_syncobj
Kenneth Graunke [Thu, 8 Nov 2018 22:51:16 +0000 (14:51 -0800)]
iris: Add wait fences to properly sync between render/compute
When flushing a batch due to a data dependency, we need to not only
kick off the other batch's work, but stall our execution until it
completes. Just wait on last_syncpt after flushing it.
Kenneth Graunke [Tue, 20 Nov 2018 04:41:26 +0000 (20:41 -0800)]
iris: Hang on to the last batch's sync-point, so we can wait on it
Chris Wilson [Fri, 9 Nov 2018 15:02:12 +0000 (15:02 +0000)]
iris: Tag each submitted batch with a syncobj
(adjusted by Ken to make the signalling sync object immediately on
batch reset, rather than batch finish time. this will work better
with deferred flushes...)
Kenneth Graunke [Mon, 19 Nov 2018 22:16:03 +0000 (14:16 -0800)]
iris: Drop vestiges of throttling code
Chris Wilson [Mon, 19 Nov 2018 22:12:52 +0000 (14:12 -0800)]
iris: Merge two walks of the exec_bos list
Kenneth Graunke [Thu, 8 Nov 2018 22:42:00 +0000 (14:42 -0800)]
iris: replace vestiges of fence fds with newer exec_fence API
patch by me and Chris Wilson
Kenneth Graunke [Tue, 20 Nov 2018 06:08:51 +0000 (22:08 -0800)]
iris: Avoid synchronizing due to the workaround BO
Kenneth Graunke [Tue, 20 Nov 2018 05:49:56 +0000 (21:49 -0800)]
iris: Avoid cross-batch synchronization on read/reads
This avoids flushing batches just because e.g. both are reading the same
dynamic state streaming buffer, or shader assembly buffer.
Kenneth Graunke [Tue, 20 Nov 2018 05:40:54 +0000 (21:40 -0800)]
iris: Combine iris_use_pinned_bo and add_exec_bo
Kenneth Graunke [Tue, 20 Nov 2018 05:32:52 +0000 (21:32 -0800)]
iris: Use iris_use_pinned_bo rather than add_exec_bo directly
less special this way
Chris Wilson [Tue, 13 Nov 2018 17:55:45 +0000 (17:55 +0000)]
iris: Fix assigning the output handle for exporting for KMS
Fixes gbm_bo_get_handle() used for KMS in glamor.
Chris Wilson [Tue, 13 Nov 2018 17:55:21 +0000 (17:55 +0000)]
iris: Tidy exporting the flink handle
Kenneth Graunke [Mon, 19 Nov 2018 19:22:56 +0000 (11:22 -0800)]
iris: Fix SLM
Now that Jason has set up the L3 we can do this. Also, my assert was
useless because we hadn't set up the field in the first place. Oops.
Jason Ekstrand [Wed, 14 Nov 2018 22:52:26 +0000 (16:52 -0600)]
iris: Don't set constant read lengths at upload time
They're set in derived_data as part of store_cs_state
Jason Ekstrand [Thu, 15 Nov 2018 05:09:10 +0000 (23:09 -0600)]
iris: Configure the L3$ on the compute context
Kenneth Graunke [Mon, 19 Nov 2018 08:23:54 +0000 (00:23 -0800)]
iris: properly pin stencil buffers
Kenneth Graunke [Sat, 17 Nov 2018 00:01:28 +0000 (16:01 -0800)]
iris: Fix TCS/TES slot unification
TCS outputs, TES inputs...not TCS inputs
Fixes some barrier tests
Kenneth Graunke [Fri, 16 Nov 2018 23:12:57 +0000 (15:12 -0800)]
iris: more todo notes
Kenneth Graunke [Fri, 9 Nov 2018 05:16:59 +0000 (21:16 -0800)]
iris: scissored and mirrored blits
Kenneth Graunke [Sat, 10 Nov 2018 19:41:22 +0000 (11:41 -0800)]
iris: more TODO
Kenneth Graunke [Mon, 12 Nov 2018 19:33:44 +0000 (11:33 -0800)]
iris: Fix independent alpha blending.
independent_blend_enable means per-RT blending, not RGB != A
Kenneth Graunke [Sat, 10 Nov 2018 10:25:24 +0000 (02:25 -0800)]
iris: "Fix" transfer maps of buffers
x should be in bytes, not cpp units
This generally worked out because PIPE_BUFFER is supposedly required
to be R8_UINT or R8_UNORM. I hear some state trackers pass
PIPE_FORMAT_NONE instead, however, which would make this break.
Just do the right thing directly, to be defensive and clear.
Kenneth Graunke [Sat, 10 Nov 2018 08:15:37 +0000 (00:15 -0800)]
iris: Fix SourceAlphaBlendFactor