Jordan Justen
6441e906e8
iris: Set num_uniforms in bytes
...
Ref: brw_nir_lower_uniforms, type_size_scalar_bytes
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2019-02-21 10:26:09 -08:00
Kenneth Graunke
c29fd34259
iris: move images next to textures in binding table
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
5d1dadfc38
iris: bother with BTIs
2019-02-21 10:26:09 -08:00
Kenneth Graunke
26a54ae4b2
iris: lower storage image derefs
2019-02-21 10:26:09 -08:00
Kenneth Graunke
e97a24da89
iris: set the binding table size
...
we weren't doing mark_surface_used on images (i965 does it while
uploading the unnecessary image uniforms), so our binding tables were
too small...
2019-02-21 10:26:09 -08:00
Kenneth Graunke
30c370ed4b
iris: use 0 for TCS passthrough program string ID
...
the passthrough shader doesn't need a real program string ID - that's
basically used for ARB programs indicating total program source code
changes, or other pre-baked uniform changes, etc...none of which a
passthrough shader has...so we don't need a unique identifier to
distinguish them. We want to use a consistent value so we find
existing passthrough shaders in the cache.
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
58a6c99ebe
iris: silence const warning
...
not sure why this is labeled const, I'm pretty sure we are taking the
reference and owning this, so there's no particular reason we can't
change it. it certainly seems to be working for non-compute. and,
freedreno's ir3_shader.c seems to do this as well. still...gross :/
2019-02-21 10:26:08 -08:00
Kenneth Graunke
897f8d9232
iris: refactor program CSO stuff
2019-02-21 10:26:08 -08:00
Kenneth Graunke
42dccb1233
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.
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
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
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
541cb60e7e
iris: export get_shader_info
2019-02-21 10:26:07 -08:00
Kenneth Graunke
5bd861de8b
iris: assert about passthrough shaders to make this easier to detect
...
otherwise it just silently fails and looks like some obscure problem
2019-02-21 10:26:07 -08:00
Kenneth Graunke
ebb960c6d3
iris: compile a TCS...don't bother with passthrough yet
2019-02-21 10:26:07 -08:00
Kenneth Graunke
9aa8be3d8e
iris: TES program key inputs
2019-02-21 10:26:07 -08:00
Kenneth Graunke
6e7e49cc4f
iris: fix crash
2019-02-21 10:26:07 -08:00
Kenneth Graunke
841fc3e3ca
iris: record FS NOS
2019-02-21 10:26:07 -08:00
Kenneth Graunke
d223b316ad
iris: NOS mechanics
2019-02-21 10:26:07 -08:00
Kenneth Graunke
a6d480f892
iris: bind state helper function
2019-02-21 10:26:07 -08:00
Kenneth Graunke
48b826cdaf
iris: s/hwcso/state/g
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
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
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
adf0c20461
iris: geometry shader support
2019-02-21 10:26:07 -08:00
Kenneth Graunke
de08ac9b0f
iris: TES uniform fixes
...
not that we have a TES, but...
2019-02-21 10:26:07 -08:00
Kenneth Graunke
d416b81779
iris: shader dirty bits
2019-02-21 10:26:07 -08:00
Kenneth Graunke
f12b079c0e
iris: actually init num_viewports
...
fixes regressions
2019-02-21 10:26:07 -08:00
Kenneth Graunke
4a94628513
iris: fix num viewports to be based on programs
2019-02-21 10:26:07 -08:00
Kenneth Graunke
7c40cdc12f
iris: comment about reemitting and flushing
2019-02-21 10:26:06 -08:00
Kenneth Graunke
26cc609927
iris: better ubo handling
2019-02-21 10:26:06 -08:00
Kenneth Graunke
201a4d923c
iris: maybe slightly less boats uniforms
2019-02-21 10:26:06 -08:00
Kenneth Graunke
64a3f7423a
iris: uniforms for VS
2019-02-21 10:26:06 -08:00
Kenneth Graunke
60d708bb80
iris: copy over i965's cache tracking
...
needed to split out vtbl so I can pipe control without ice
2019-02-21 10:26:06 -08:00
Kenneth Graunke
35afa8c8f3
iris: better BT asserts
...
Probably nothing is working because texture upload isn't implemented
2019-02-21 10:26:05 -08:00
Kenneth Graunke
012154c20f
iris: TES stash
...
TODO: key setup
2019-02-21 10:26:05 -08:00
Kenneth Graunke
a50a3a8edf
iris: uniform bits...badly
2019-02-21 10:26:05 -08:00
Kenneth Graunke
538decc0de
iris: URB configs.
2019-02-21 10:26:05 -08:00
Kenneth Graunke
bba13b1501
iris: move key pop to state module
...
shader key population needs to read state
2019-02-21 10:26:05 -08:00
Kenneth Graunke
57c1b71418
iris: promote iris_program_cache_item to iris_compiled_shader
2019-02-21 10:26:05 -08:00
Kenneth Graunke
581459a9fe
iris: some shader bits
2019-02-21 10:26:05 -08:00
Kenneth Graunke
64f043570d
iris: lower io
2019-02-21 10:26:05 -08:00
Kenneth Graunke
695bd55d1a
iris: do the FS...asserts because we don't lower uniforms yet
2019-02-21 10:26:05 -08:00
Kenneth Graunke
6aa15cadf3
iris: import program cache code
2019-02-21 10:26:05 -08:00
Kenneth Graunke
4525dda75f
iris: reworks, FS compile pieces
2019-02-21 10:26:05 -08:00
Kenneth Graunke
c820f5a4bd
iris: some program code
2019-02-21 10:26:04 -08:00