Commit Graph

105 Commits

Author SHA1 Message Date
Kenneth Graunke
d3e8ff143d iris: add param domain defines 2019-02-21 10:26:09 -08:00
Kenneth Graunke
ed08f022f0 iris: Defer cbuf0 upload to draw time 2019-02-21 10:26:09 -08:00
Kenneth Graunke
2727a942a4 iris: partial set_query_active_state
used to avoid OQ during clears for example

fixes occlusion_query_meta_no_fragments
2019-02-21 10:26:09 -08:00
Kenneth Graunke
4d219b0eb3 iris: implement scratch space!
we borrow the approach from anv rather than i965, as it works better
with pre-baked state that needs to contain scratch BO addresses

fixes a bunch of varying packing tests
2019-02-21 10:26:09 -08:00
Kenneth Graunke
a9b32f2bbf iris: Fix texture buffer / image buffer sizes.
Also fix image buffers with offsets.
2019-02-21 10:26:09 -08:00
Kenneth Graunke
b3a40c27a2 iris: don't let render/compute contexts stomp each other's dirty bits
only clear what you process
2019-02-21 10:26:09 -08:00
Kenneth Graunke
06a993dac2 iris: rewrite grid surface handling
now we only upload a new grid when it's actually changed, which saves us
from having to emit a new binding table every time it changes.

this also moves a bunch of non-gen-specific stuff out of iris_state.c
2019-02-21 10:26:09 -08:00
Jordan Justen
b35c8f2182 iris/compute: Push subgroup-id
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2019-02-21 10:26:09 -08:00
Jordan Justen
622aaa290f iris: Add IRIS_DIRTY_CONSTANTS_CS
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2019-02-21 10:26:09 -08:00
Kenneth Graunke
9fc672428d iris: little bits of compute basics 2019-02-21 10:26:09 -08:00
Kenneth Graunke
0d9c5b4e7e iris: null for non-existent cbufs
prevents BTs from being shifted down incorrectly
2019-02-21 10:26:09 -08:00
Kenneth Graunke
a06f0fe517 iris: set image access correctly 2019-02-21 10:26:09 -08:00
Kenneth Graunke
f5b887da6c iris: implement set_shader_images hook 2019-02-21 10:26:09 -08:00
Kenneth Graunke
1d91eba7dc iris: glGet timestamps, more correct timestamps 2019-02-21 10:26:08 -08:00
Kenneth Graunke
d8875fe406 iris: primitives generated query support 2019-02-21 10:26:08 -08:00
Kenneth Graunke
cf261caad9 iris: results write 2019-02-21 10:26:08 -08:00
Kenneth Graunke
dd478913d5 iris: LRM/SRM/SDI hooks 2019-02-21 10:26:08 -08:00
Caio Marcelo de Oliveira Filho
54e23442e2 iris: Add support for TCS passthrough
If no TCS is provided, create a "passthrough" TCS that will take the
default values set in the API as constants and pass to the TES, along
with any other inputs it expects.  The code to create the NIR shader
is the same as in i965.

Tested with

    ./piglit run -t 'tess' quick_shader r

and fixed a dozen crashes from that list.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
5395658c61 iris: inherit the index buffer properly 2019-02-21 10:26:08 -08:00
Kenneth Graunke
2b956a093a iris: totally untested icelake support 2019-02-21 10:26:08 -08:00
Kenneth Graunke
eff081cdd9 iris: Support multiple binder BOs, update Surface State Base Address 2019-02-21 10:26:08 -08:00
Kenneth Graunke
5a2257bb2f iris: don't unconditionally emit 3DSTATE_VF / 3DSTATE_VF_TOPOLOGY
this was just laziness on my part
2019-02-21 10:26:08 -08:00
Kenneth Graunke
93c1921ce2 iris: proper cache tracking
this is copied from the i965 aux resolve stuff...minus the aux resolves
2019-02-21 10:26:08 -08:00
Kenneth Graunke
5e30b1083b iris: Move cache tracking to iris_resolve.c 2019-02-21 10:26:08 -08:00
Kenneth Graunke
1d33982e9b iris: track depth/stencil writes enabled 2019-02-21 10:26:08 -08:00
Kenneth Graunke
b75b52530a 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.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
410a555bfb iris: move iris_shader_state from ice->shaders.state to ice->state.shaders
it's more state related...
2019-02-21 10:26:08 -08:00
Kenneth Graunke
2bd7d6fa71 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
2019-02-21 10:26:08 -08:00
Kenneth Graunke
dfe1ee4f6f iris: comment everything
1. Write the code
2. Add comments
3. PROFIT (or just avoid cost of explaining or relearning things...)
2019-02-21 10:26:08 -08:00
Kenneth Graunke
387a414f2c iris: add minor comments 2019-02-21 10:26:08 -08:00
Dave Airlie
9d39e69219 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
2019-02-21 10:26:08 -08:00
Kenneth Graunke
870f2e8434 iris: implement texture/memory barriers 2019-02-21 10:26:07 -08:00
Kenneth Graunke
b7b061c4e2 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.
2019-02-21 10:26:07 -08:00
Kenneth Graunke
77b9219818 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
2019-02-21 10:26:07 -08:00
Kenneth Graunke
2d5f545464 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.
2019-02-21 10:26:07 -08:00
Kenneth Graunke
541cb60e7e iris: export get_shader_info 2019-02-21 10:26:07 -08:00
Kenneth Graunke
5520a54bc5 iris: vertex ID, instance ID 2019-02-21 10:26:07 -08:00
Kenneth Graunke
d223b316ad iris: NOS mechanics 2019-02-21 10:26:07 -08:00
Kenneth Graunke
b030671298 iris: fix CC_VIEWPORT
I was confusing depth bounds test with depth clamping
2019-02-21 10:26:07 -08:00
Kenneth Graunke
7b8c0f058e iris: actually pin the buffers 2019-02-21 10:26:07 -08:00
Kenneth Graunke
cef0b8b13b iris: streamout 2019-02-21 10:26:07 -08:00
Kenneth Graunke
5c00f5fdca iris: Implement 3DSTATE_SO_DECL_LIST 2019-02-21 10:26:07 -08:00
Kenneth Graunke
a3f77eceb4 iris: slab allocate transfers
apparently we need this for u_threaded_context
2019-02-21 10:26:07 -08:00
Kenneth Graunke
7f39f4843f iris: SBE change stash
not used yet, but want to flag it so I don't forget
2019-02-21 10:26:07 -08:00
Kenneth Graunke
8a080223e6 iris: just malloc one iris_genx_state instead of a bunch of oddball pieces
Things that are gen-specific can go in iris_genx_state.  Things that are
gen-agnostic can go directly in ice->state.
2019-02-21 10:26:07 -08:00
Kenneth Graunke
a7e0edffb6 iris: dead pointer 2019-02-21 10:26:07 -08:00
Kenneth Graunke
ccec5bab5b iris: implement border color, fix other sampler nonsense 2019-02-21 10:26:07 -08:00
Kenneth Graunke
1cea195a95 iris: state ref tuple 2019-02-21 10:26:07 -08:00
Kenneth Graunke
c0e80a8d0a iris: null surface for unbound textures
avoids crashes...may not be really right
2019-02-21 10:26:07 -08:00
Kenneth Graunke
72416a2d0d iris: clears 2019-02-21 10:26:07 -08:00