mesa.git
5 years agoiris: use linear for 1D textures
Kenneth Graunke [Thu, 23 Aug 2018 06:39:38 +0000 (23:39 -0700)]
iris: use linear for 1D textures

This gets us the gen9 compact linear storage

5 years agoiris: big old hack for tex-miplevel-selection
Kenneth Graunke [Thu, 23 Aug 2018 08:49:49 +0000 (01:49 -0700)]
iris: big old hack for tex-miplevel-selection

copied from ilo.  I don't understand this at all..

5 years agoiris: fix sampler state setting
Kenneth Graunke [Thu, 23 Aug 2018 09:15:12 +0000 (02:15 -0700)]
iris: fix sampler state setting

5 years agoiris: try to hack around binder issue
Kenneth Graunke [Tue, 21 Aug 2018 18:50:56 +0000 (11:50 -0700)]
iris: try to hack around binder issue

5 years agoiris: fix line-aa-width
Kenneth Graunke [Tue, 21 Aug 2018 18:30:09 +0000 (11:30 -0700)]
iris: fix line-aa-width

we should probably move the roundf to st_atom_raster

5 years agoiris: implement get_sample_position
Kenneth Graunke [Tue, 21 Aug 2018 06:37:13 +0000 (23:37 -0700)]
iris: implement get_sample_position

Fixes arb_sample_shading/builtin-gl-sample-position

5 years agoiris: z_res -> s_res
Kenneth Graunke [Tue, 21 Aug 2018 04:23:25 +0000 (21:23 -0700)]
iris: z_res -> s_res

fixes crashes introduced a few commits ago

5 years agoiris: reenable R32G32B32 texture buffers
Kenneth Graunke [Tue, 21 Aug 2018 03:55:17 +0000 (20:55 -0700)]
iris: reenable R32G32B32 texture buffers

This dropped us from GL 4.2 to GL 3.3 by mistake.  Thanks to Dave for
catching this!

5 years agoiris: Record reusability of bo on construction
Chris Wilson [Sun, 19 Aug 2018 09:32:43 +0000 (10:32 +0100)]
iris: Record reusability of bo on construction

We know that if the bufmgr->reuse is set to false or if the bo is too
large for a bucket, the same will be true when we come to free the bo.

5 years agoiris: Reduce binder alignment from 64 to 32
Kenneth Graunke [Sun, 19 Aug 2018 21:05:53 +0000 (14:05 -0700)]
iris: Reduce binder alignment from 64 to 32

3DSTATE_BINDING_TABLE_POINTER_XS's alignment requirement is only 32B.

Makes us waste less precious binder space.

5 years agoiris: precompute hashes for cache tracking
Kenneth Graunke [Sun, 19 Aug 2018 17:08:05 +0000 (10:08 -0700)]
iris: precompute hashes for cache tracking

saves a touch of cpu overhead in the new resolve tracking

5 years agoiris: AMD_pinned_memory
Chris Wilson [Tue, 31 Jul 2018 13:47:02 +0000 (14:47 +0100)]
iris: AMD_pinned_memory

(rebased by Ken, mainly set res->internal_format)

5 years agoiris: proper cache tracking
Kenneth Graunke [Sun, 19 Aug 2018 07:21:34 +0000 (00:21 -0700)]
iris: proper cache tracking

this is copied from the i965 aux resolve stuff...minus the aux resolves

5 years agoiris: Move cache tracking to iris_resolve.c
Kenneth Graunke [Sun, 19 Aug 2018 07:18:51 +0000 (00:18 -0700)]
iris: Move cache tracking to iris_resolve.c

5 years agoiris: use consistent copyright formatting
Kenneth Graunke [Sun, 19 Aug 2018 07:31:46 +0000 (00:31 -0700)]
iris: use consistent copyright formatting

some of them had typos, didn't say 'authors or copyright holders',
or other mistakes.  This is now https://opensource.org/licenses/MIT
text, formatted consistently.

5 years agoiris: track depth/stencil writes enabled
Kenneth Graunke [Sun, 19 Aug 2018 06:21:41 +0000 (23:21 -0700)]
iris: track depth/stencil writes enabled

5 years agoiris: Move iris_sampler_view declaration to iris_resource.h
Kenneth Graunke [Sun, 19 Aug 2018 06:58:54 +0000 (23:58 -0700)]
iris: Move iris_sampler_view declaration to iris_resource.h

We'll need this for resolve tracking.  There's also no genxml stuff here

5 years agoiris: Move things to iris_shader_state
Kenneth Graunke [Sun, 19 Aug 2018 06:43:14 +0000 (23:43 -0700)]
iris: Move things to iris_shader_state

We didn't originally have this struct, so we had lots of ad-hoc arrays.
Now that we have it, it makes sense to group things there.

5 years agoiris: move iris_shader_state from ice->shaders.state to ice->state.shaders
Kenneth Graunke [Sun, 19 Aug 2018 06:39:48 +0000 (23:39 -0700)]
iris: move iris_shader_state from ice->shaders.state to ice->state.shaders

it's more state related...

5 years agoiris: Drop bogus sampler state saving
Kenneth Graunke [Sun, 19 Aug 2018 06:44:11 +0000 (23:44 -0700)]
iris: Drop bogus sampler state saving

We do this in an earlier loop.  This was just reading things out of the
array, and saving them back over the same array...but in the wrong slots

5 years agoiris: rename pipe to base
Kenneth Graunke [Sun, 19 Aug 2018 06:21:32 +0000 (23:21 -0700)]
iris: rename pipe to base

5 years agoiris: don't emit SBE all the time
Kenneth Graunke [Sat, 18 Aug 2018 08:24:38 +0000 (01:24 -0700)]
iris: don't emit SBE all the time

5 years agoiris: port non-bucket alignment bugfix
Kenneth Graunke [Fri, 17 Aug 2018 06:49:31 +0000 (23:49 -0700)]
iris: port non-bucket alignment bugfix

Sergii's 24839663a40257e0468406d72c48d431b5ae2bd4

5 years agoiris: drop pwrite
Kenneth Graunke [Fri, 17 Aug 2018 06:48:24 +0000 (23:48 -0700)]
iris: drop pwrite

nobody uses it

5 years agoiris: drop dead assignments
Kenneth Graunke [Fri, 17 Aug 2018 06:47:58 +0000 (23:47 -0700)]
iris: drop dead assignments

Eric's commit 9a6a6317629eb4c63d28860ded30778ac341ac63

5 years agoiris: last VUE map NOS, handle > 16 FS inputs
Kenneth Graunke [Wed, 15 Aug 2018 20:35:05 +0000 (13:35 -0700)]
iris: last VUE map NOS, handle > 16 FS inputs

not sure if the UNCOMPILED_FS flagging is still needed, should
reevaluate those hacks at some point

5 years agoiris: implement ARB_clear_texture
Kenneth Graunke [Wed, 15 Aug 2018 08:34:10 +0000 (01:34 -0700)]
iris: implement ARB_clear_texture

5 years agoiris: call maybe_flush for each blorp operation
Kenneth Graunke [Wed, 15 Aug 2018 06:37:53 +0000 (23:37 -0700)]
iris: call maybe_flush for each blorp operation

otherwise with high layer counts we may exceed two batches worth of
commands... (!)

5 years agoiris: assert depth is 1 in resource_copy_region
Kenneth Graunke [Wed, 15 Aug 2018 06:22:12 +0000 (23:22 -0700)]
iris: assert depth is 1 in resource_copy_region

given the dstz parameter I don't think it does multiple slices..

5 years agoiris: blorp blit multiple slices
Kenneth Graunke [Wed, 15 Aug 2018 06:20:21 +0000 (23:20 -0700)]
iris: blorp blit multiple slices

fixes getteximage-depth

5 years agoiris: Fix tiled memcpy for cubes...and for array slices
Kenneth Graunke [Tue, 14 Aug 2018 23:44:07 +0000 (16:44 -0700)]
iris: Fix tiled memcpy for cubes...and for array slices

tiled_memcpy_map was not offsetting map->ptr based on the slice,
while unmap was.  also, we were doing offsetting wrong for cubes.

5 years agoiris: disallow RGB32 formats too
Kenneth Graunke [Tue, 14 Aug 2018 22:50:42 +0000 (15:50 -0700)]
iris: disallow RGB32 formats too

5 years agoiris: Convert RGBX to RGBA for rendering.
Kenneth Graunke [Mon, 13 Aug 2018 23:41:19 +0000 (16:41 -0700)]
iris: Convert RGBX to RGBA for rendering.

Fixes a bunch of RGB bugs.

5 years agoiris: we can do multisample Z resolves
Kenneth Graunke [Sat, 11 Aug 2018 19:48:24 +0000 (12:48 -0700)]
iris: we can do multisample Z resolves

5 years agoiris: deal with Marek's new MSAA caps
Kenneth Graunke [Sat, 11 Aug 2018 19:47:46 +0000 (12:47 -0700)]
iris: deal with Marek's new MSAA caps

storage sample count is equal to sample count for us, for now,
so 0 the pipe cap and ignore the new parameter

5 years agoiris: say no to more formats
Kenneth Graunke [Sat, 11 Aug 2018 06:50:02 +0000 (23:50 -0700)]
iris: say no to more formats

copied from brw_surface_formats.c

5 years agoiris: actually do stencil blits
Kenneth Graunke [Thu, 9 Aug 2018 19:27:58 +0000 (12:27 -0700)]
iris: actually do stencil blits

5 years agoiris: refcounting, who needs it?
Kenneth Graunke [Thu, 9 Aug 2018 16:19:58 +0000 (09:19 -0700)]
iris: refcounting, who needs it?

that's right, we do!

5 years agoiris: drop stencil handling now that u_transfer_helper does it
Kenneth Graunke [Thu, 9 Aug 2018 10:28:24 +0000 (03:28 -0700)]
iris: drop stencil handling now that u_transfer_helper does it

5 years agoiris: use u_transfer_helper for depth stencil packing/unpacking
Kenneth Graunke [Wed, 8 Aug 2018 21:54:09 +0000 (14:54 -0700)]
iris: use u_transfer_helper for depth stencil packing/unpacking

5 years agoiris: WTF transfers
Kenneth Graunke [Tue, 7 Aug 2018 16:21:40 +0000 (09:21 -0700)]
iris: WTF transfers

stencil unfortunately is stored in the Weird Tile Format (WTF or Tile-W)
which needs special CPU detiling code.

5 years agoiris: allow S8 as a stencil format
Kenneth Graunke [Sun, 5 Aug 2018 06:19:12 +0000 (23:19 -0700)]
iris: allow S8 as a stencil format

5 years agoiris: actually emit stencil packets
Kenneth Graunke [Fri, 3 Aug 2018 23:18:09 +0000 (16:18 -0700)]
iris: actually emit stencil packets

5 years agoiris: clear stencil
Kenneth Graunke [Mon, 30 Jul 2018 22:08:02 +0000 (15:08 -0700)]
iris: clear stencil

5 years agoiris: depth or stencil fixes
Kenneth Graunke [Fri, 3 Aug 2018 08:24:51 +0000 (01:24 -0700)]
iris: depth or stencil fixes

5 years agoiris: fill out more caps
Kenneth Graunke [Thu, 2 Aug 2018 05:27:16 +0000 (22:27 -0700)]
iris: fill out more caps

5 years agoiris: get angry about execbuf failures
Kenneth Graunke [Wed, 1 Aug 2018 18:21:57 +0000 (11:21 -0700)]
iris: get angry about execbuf failures

want this to be easy to detect for now

5 years agoiris: simplify batch len qword alignment
Kenneth Graunke [Wed, 1 Aug 2018 00:32:47 +0000 (17:32 -0700)]
iris: simplify batch len qword alignment

Split from a patch by Chris Wilson so I can test it independently

5 years agoiris: rename ring to engine
Kenneth Graunke [Tue, 31 Jul 2018 23:10:50 +0000 (16:10 -0700)]
iris: rename ring to engine

makes more sense these days.  split from a patch by Chris Wilson

5 years agoiris: remember to set bo->userptr
Kenneth Graunke [Tue, 31 Jul 2018 22:40:12 +0000 (15:40 -0700)]
iris: remember to set bo->userptr

5 years agoiris: Wrap userptr for creating bo
Chris Wilson [Mon, 30 Jul 2018 23:52:34 +0000 (00:52 +0100)]
iris: Wrap userptr for creating bo

5 years agoiris: sync bugfixes from brw_bufmgr
Kenneth Graunke [Tue, 31 Jul 2018 22:34:44 +0000 (15:34 -0700)]
iris: sync bugfixes from brw_bufmgr

I wrote softpin support here first, then debugged and landed it in brw;
some of those fixes need to get brought back.

5 years agoiris: comment everything
Kenneth Graunke [Tue, 31 Jul 2018 06:49:34 +0000 (23:49 -0700)]
iris: comment everything

1. Write the code
2. Add comments
3. PROFIT (or just avoid cost of explaining or relearning things...)

5 years agoiris: add minor comments
Kenneth Graunke [Tue, 31 Jul 2018 05:59:52 +0000 (22:59 -0700)]
iris: add minor comments

5 years agoiris: fix some hangs around null framebuffers
Dave Airlie [Tue, 31 Jul 2018 00:33:35 +0000 (10:33 +1000)]
iris: fix some hangs around null framebuffers

This fixes some cases in fbo-none* and framebuffer_no_attachments.

I'm not sure this is correct otherwise, the tests don't all pass yet

No idea if this is in any way the correct answer

5 years agoiris: Set resource modifier on handle
Chris Wilson [Sat, 28 Jul 2018 20:10:17 +0000 (21:10 +0100)]
iris: Set resource modifier on handle

Required for gdm_bo_create_with_modifiers

5 years agoiris: we don't support textureGatherOffsets, need it lowered
Kenneth Graunke [Sat, 28 Jul 2018 03:57:55 +0000 (20:57 -0700)]
iris: we don't support textureGatherOffsets, need it lowered

5 years agoiris: cube arrays are cubes too
Kenneth Graunke [Sat, 28 Jul 2018 03:25:21 +0000 (20:25 -0700)]
iris: cube arrays are cubes too

5 years agoiris: fix sample mask
Kenneth Graunke [Fri, 27 Jul 2018 23:02:09 +0000 (16:02 -0700)]
iris: fix sample mask

0xffffffff does not mean 1, it means enable as many as there actually
are.  we don't get set_sample_mask() calls until some masking is
actually applied...i.e. it doesn't get updated based on # of samples
in the FBO changing.

5 years agoiris: drop pipe_shader_state
Kenneth Graunke [Fri, 27 Jul 2018 05:32:08 +0000 (22:32 -0700)]
iris: drop pipe_shader_state

looking at the freedreno code, this is totally unnecessary!  we can just
store the NIR and be happy, and not have any vestiges of TGSI.

plus we can reuse this structure for compute shaders, without needing a
pipe_compute_state base.

5 years agoiris: fix GS output component limit
Kenneth Graunke [Thu, 26 Jul 2018 08:11:11 +0000 (01:11 -0700)]
iris: fix GS output component limit

this is total, so should be 1024, not 128

5 years agoiris: Avoid croaking when trying to create FBO surfaces with bad formats
Kenneth Graunke [Thu, 26 Jul 2018 08:06:27 +0000 (01:06 -0700)]
iris: Avoid croaking when trying to create FBO surfaces with bad formats

create_surface happens before st_validate_attachment, which actually
does the "hey, this is a render target now, is that OK?" check

Fixes asserts in ./bin/arb_texture_view-rendering-formats, allowing the
rest of the tests to run.

5 years agoiris: enable texture gather
Kenneth Graunke [Thu, 26 Jul 2018 06:33:16 +0000 (23:33 -0700)]
iris: enable texture gather

5 years agoiris: BIG OL' HACK for UBO updates
Kenneth Graunke [Wed, 25 Jul 2018 22:09:50 +0000 (15:09 -0700)]
iris: BIG OL' HACK for UBO updates

We need to re-push data when UBO changes.  This will need to be replaced
with a usage history based flushing system later.

5 years agoiris: update a todo comment
Kenneth Graunke [Wed, 25 Jul 2018 21:39:02 +0000 (14:39 -0700)]
iris: update a todo comment

5 years agoiris: Don't reserve new binding table section unless things are dirty
Kenneth Graunke [Wed, 25 Jul 2018 05:14:37 +0000 (22:14 -0700)]
iris: Don't reserve new binding table section unless things are dirty

5 years agoiris: implement texture/memory barriers
Kenneth Graunke [Wed, 25 Jul 2018 04:15:13 +0000 (21:15 -0700)]
iris: implement texture/memory barriers

5 years agoiris: drop unused bo parameter
Kenneth Graunke [Wed, 25 Jul 2018 04:03:52 +0000 (21:03 -0700)]
iris: drop unused bo parameter

5 years agoiris: update bindings when changing programs
Kenneth Graunke [Wed, 25 Jul 2018 03:57:10 +0000 (20:57 -0700)]
iris: update bindings when changing programs

the binding table layout depends on program info.

not known to fix anything yet.

5 years agoiris: fix for disabling ssbos
Kenneth Graunke [Wed, 25 Jul 2018 03:57:02 +0000 (20:57 -0700)]
iris: fix for disabling ssbos

5 years agoiris: fix SSBO indexing
Kenneth Graunke [Wed, 25 Jul 2018 00:44:09 +0000 (17:44 -0700)]
iris: fix SSBO indexing

st/nir offsets SSBO indexes by MaxABOs.  This is not what we want,
as it bloats the binding tables.  We'll need to adjust it to use
info->num_abos as the offset and buffer base instead.  For now,
just use the inefficient format to get us rolling.  We can add a
PIPE_CAP later.

5 years agoiris: enable SSBOs
Kenneth Graunke [Wed, 25 Jul 2018 00:03:48 +0000 (17:03 -0700)]
iris: enable SSBOs

5 years agoiris: fix TBO alignment to match 965
Kenneth Graunke [Wed, 25 Jul 2018 00:02:25 +0000 (17:02 -0700)]
iris: fix TBO alignment to match 965

5 years agoiris: unbind compiled shaders if none are present
Kenneth Graunke [Tue, 24 Jul 2018 23:20:02 +0000 (16:20 -0700)]
iris: unbind compiled shaders if none are present

avoids the case where you have a stale compiled shader bound, but no
uncompiled shader bound, which is not just boats, but an entire marina

5 years agoiris: shorten loop
Kenneth Graunke [Tue, 24 Jul 2018 23:11:37 +0000 (16:11 -0700)]
iris: shorten loop

num_ubos doesn't include Tim's magic UBO for regular uniforms, so +1

5 years agoiris: emit binding table for atomic counters and SSBOs
Kenneth Graunke [Tue, 24 Jul 2018 23:03:32 +0000 (16:03 -0700)]
iris: emit binding table for atomic counters and SSBOs

5 years agoiris: implement set_shader_buffers
Kenneth Graunke [Tue, 24 Jul 2018 22:54:00 +0000 (15:54 -0700)]
iris: implement set_shader_buffers

for SSBOs/ABOs.  We just stream out SURFACE_STATE for now...since it's
a set_* API...and the buffer offset may change...not sure where else
we'd do it.

5 years agoiris: export get_shader_info
Kenneth Graunke [Tue, 24 Jul 2018 22:04:39 +0000 (15:04 -0700)]
iris: export get_shader_info

5 years agoiris: fix msaa flipping filters
Kenneth Graunke [Tue, 24 Jul 2018 21:52:50 +0000 (14:52 -0700)]
iris: fix msaa flipping filters

5 years agoiris: expose more things that we already support
Kenneth Graunke [Tue, 24 Jul 2018 21:49:13 +0000 (14:49 -0700)]
iris: expose more things that we already support

5 years agoiris: fix blorp filters
Kenneth Graunke [Tue, 24 Jul 2018 21:31:07 +0000 (14:31 -0700)]
iris: fix blorp filters

we have to switch to blorp enums after the rebase, but also we were
probably doing it wrong for MSAA before this.

5 years agoiris: hack around samples confusion
Kenneth Graunke [Tue, 24 Jul 2018 17:59:10 +0000 (10:59 -0700)]
iris: hack around samples confusion

5 years agoiris: point sprite enables
Kenneth Graunke [Mon, 23 Jul 2018 22:29:00 +0000 (15:29 -0700)]
iris: point sprite enables

5 years agoiris: reemit blend state for alpha test function changes
Kenneth Graunke [Sun, 22 Jul 2018 03:47:08 +0000 (20:47 -0700)]
iris: reemit blend state for alpha test function changes

fixes bin/fbo-alphatest-formats GL_EXT_texture_snorm

5 years agoiris: fix Z24
Kenneth Graunke [Sun, 22 Jul 2018 03:12:15 +0000 (20:12 -0700)]
iris: fix Z24

This was backwards.

thanks to Jason Ekstrand for realizing that I was seeing the wrong bits.

5 years agoiris: fix EmitNoIndirect
Kenneth Graunke [Fri, 20 Jul 2018 08:18:57 +0000 (01:18 -0700)]
iris: fix EmitNoIndirect

we were using pipe stages, which are ordered dumbly for historical
reasons.  we want gl_shader_stage here.  this got us the wrong options

5 years agoiris: assert about passthrough shaders to make this easier to detect
Kenneth Graunke [Fri, 20 Jul 2018 07:47:40 +0000 (00:47 -0700)]
iris: assert about passthrough shaders to make this easier to detect

otherwise it just silently fails and looks like some obscure problem

5 years agoiris: fill out MAX_PATCH_VERTICES
Kenneth Graunke [Thu, 19 Jul 2018 04:08:32 +0000 (21:08 -0700)]
iris: fill out MAX_PATCH_VERTICES

5 years agoiris: fix SGVS when there are no valid vertex elements
Kenneth Graunke [Wed, 18 Jul 2018 23:27:07 +0000 (16:27 -0700)]
iris: fix SGVS when there are no valid vertex elements

tessellation nop.shader_test now passes

5 years agoiris: vertex ID, instance ID
Kenneth Graunke [Wed, 18 Jul 2018 16:23:24 +0000 (09:23 -0700)]
iris: vertex ID, instance ID

5 years agoiris: don't emit SO_BUFFERS and SO_DECL_LIST unless streamout is enabled
Kenneth Graunke [Wed, 18 Jul 2018 16:02:35 +0000 (09:02 -0700)]
iris: don't emit SO_BUFFERS and SO_DECL_LIST unless streamout is enabled

Otherwise on the first draw, if XFB isn't enabled, we get a pile of
MI_NOOPS where SO_BUFFERS should be

5 years agoiris: compile a TCS...don't bother with passthrough yet
Kenneth Graunke [Tue, 17 Jul 2018 21:21:42 +0000 (14:21 -0700)]
iris: compile a TCS...don't bother with passthrough yet

5 years agoiris: TES program key inputs
Kenneth Graunke [Tue, 17 Jul 2018 21:01:58 +0000 (14:01 -0700)]
iris: TES program key inputs

5 years agoiris: fix texture buffer stride
Kenneth Graunke [Tue, 17 Jul 2018 15:59:25 +0000 (08:59 -0700)]
iris: fix texture buffer stride

5 years agoiris: fix sampler views of TBOs
Kenneth Graunke [Tue, 17 Jul 2018 07:17:55 +0000 (00:17 -0700)]
iris: fix sampler views of TBOs

we can't read levels/layers, they're invalid for PIPE_BUFFER

5 years agoiris: fix crash
Kenneth Graunke [Mon, 16 Jul 2018 23:45:22 +0000 (16:45 -0700)]
iris: fix crash

5 years agoiris: record FS NOS
Kenneth Graunke [Mon, 16 Jul 2018 23:41:23 +0000 (16:41 -0700)]
iris: record FS NOS

5 years agoiris: NOS mechanics
Kenneth Graunke [Mon, 16 Jul 2018 23:21:22 +0000 (16:21 -0700)]
iris: NOS mechanics

5 years agoiris: bind state helper function
Kenneth Graunke [Mon, 16 Jul 2018 23:25:02 +0000 (16:25 -0700)]
iris: bind state helper function

5 years agoiris: s/hwcso/state/g
Kenneth Graunke [Mon, 16 Jul 2018 23:21:41 +0000 (16:21 -0700)]
iris: s/hwcso/state/g