Kenneth Graunke
33701d5341
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
2019-02-21 10:26:08 -08:00
Kenneth Graunke
aba2cee711
iris: rename pipe to base
2019-02-21 10:26:08 -08:00
Kenneth Graunke
7705f62cb6
iris: don't emit SBE all the time
2019-02-21 10:26:08 -08:00
Kenneth Graunke
ea19d359cc
iris: Convert RGBX to RGBA for rendering.
...
Fixes a bunch of RGB bugs.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
7972599eab
iris: actually emit stencil packets
2019-02-21 10:26:08 -08:00
Kenneth Graunke
621cb43f41
iris: rename ring to engine
...
makes more sense these days. split from a patch by Chris Wilson
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
80c7096672
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.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
e990558152
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.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
c9f9a6f61b
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.
2019-02-21 10:26:08 -08:00
Kenneth Graunke
a7311ef068
iris: update a todo comment
2019-02-21 10:26:07 -08:00
Kenneth Graunke
b0e9c5797b
iris: fix for disabling ssbos
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
fd5ed7b46b
iris: shorten loop
...
num_ubos doesn't include Tim's magic UBO for regular uniforms, so +1
2019-02-21 10:26:07 -08:00
Kenneth Graunke
bf795b0244
iris: emit binding table for atomic counters and SSBOs
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
3aa1fcc65a
iris: hack around samples confusion
2019-02-21 10:26:07 -08:00
Kenneth Graunke
2c15f38a29
iris: point sprite enables
2019-02-21 10:26:07 -08:00
Kenneth Graunke
c60a4de1f5
iris: reemit blend state for alpha test function changes
...
fixes bin/fbo-alphatest-formats GL_EXT_texture_snorm
2019-02-21 10:26:07 -08:00
Kenneth Graunke
3e9e3121e5
iris: fix SGVS when there are no valid vertex elements
...
tessellation nop.shader_test now passes
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
a9083bdb71
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
2019-02-21 10:26:07 -08:00
Kenneth Graunke
fcee21da6b
iris: fix texture buffer stride
2019-02-21 10:26:07 -08:00
Kenneth Graunke
3c41d4cf3f
iris: fix sampler views of TBOs
...
we can't read levels/layers, they're invalid for PIPE_BUFFER
2019-02-21 10:26:07 -08:00
Kenneth Graunke
d223b316ad
iris: NOS mechanics
2019-02-21 10:26:07 -08:00
Kenneth Graunke
aeb6fc8782
iris: bits of multisample program key
2019-02-21 10:26:07 -08:00
Kenneth Graunke
44ba48eba7
iris: draw indirect support?
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
bc1b4db3b3
iris: fix sample mask for MSAA-off
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
5635abadef
iris: fix SO_DECL_LIST
2019-02-21 10:26:07 -08:00
Kenneth Graunke
dc3b927e97
iris: bother setting program_string_id...
...
not sure how useful this really is...
./bin/ext_transform_feedback-tessellation triangles flat_first
is hitting a case where we rebind the same VS program, but with
different streamout info...which isn't in the key...but is in the
cache...so we don't rebuild it...
2019-02-21 10:26:07 -08:00
Kenneth Graunke
9c1cefff52
iris: set even if no outputs
2019-02-21 10:26:07 -08:00
Kenneth Graunke
cef0b8b13b
iris: streamout
2019-02-21 10:26:07 -08:00
Kenneth Graunke
059c096eff
iris: SO buffers
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
f20fc950a7
iris: fix depth bounds clamp enables
...
fixes depthrange-clear among others
2019-02-21 10:26:07 -08:00
Kenneth Graunke
eb274a31bc
iris: fix clip flagging on fb changes
2019-02-21 10:26:07 -08:00
Kenneth Graunke
c0ab9c9890
iris: actually set cube bit properly
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
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
470fb01a7a
iris: fix GS dispatch mode
2019-02-21 10:26:07 -08:00
Kenneth Graunke
01483c7933
iris: fix 3DSTATE_VERTEX_ELEMENTS / VF_INSTANCING for 0 elements
2019-02-21 10:26:07 -08:00
Kenneth Graunke
4c9067ae1d
iris: don't emit garbage 3DSTATE_VERTEX_BUFFERS when there aren't any
2019-02-21 10:26:07 -08:00
Kenneth Graunke
d207f97840
iris: larger polygon offset
2019-02-21 10:26:07 -08:00
Kenneth Graunke
5188e54e97
iris: fix provoking vertex ordering
...
had this backwards
2019-02-21 10:26:07 -08:00