URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c5555a862754a5b43fee2abf4fc34e888d22a06 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Wed Jul 22 23:37:27 2020 -0500
nir: Add a find_variable_with_[driver_]location helper We've hand-rolled this loop 10 places and those are just the ones I found easily. Reviewed-by: Eric Anholt <e...@anholt.net> Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc1363cc6039110f9dcd6a5c7cf8b8453042823b Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:55:27 2020 -0500 nir/gl_nir_linker: Call add_vars_with_modes once for GL_PROGRAM_INPUT Now that nir_foreach_variable_with_modes can handle multiple modes at one time, we can simplify things a bit and only walk the list once. Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=789ec95dcd18c155a9578b5d5f56cb0aab74c763 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:32:38 2020 -0500 nir/split_per_member_structs: Inline split_variables_in_list This lets us do one list walk instead of three. Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d70fff99c5bc3a721e20869e7f0be8024ffe5ecd Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 16:30:37 2020 -0500 nir: Use a single list for all shader variables Instead of having separate lists of variables, roughly sorted by mode, use a single list for all shader-level NIR variables. This makes a few list walks a bit longer here and there but list walks aren't a very common thing in NIR at all. On the other hand, it makes a lot of things like validation, printing, etc. way simpler. Also, there are a number of cases where we move variables from inputs/outputs to globals and this makes it way easier because we no longer have to move them between lists. We only have to deal with that if moving them from the shader to a nir_function_impl. Reviewed-by: Rob Clark <robdcl...@chromium.org> Reviewed-By: Mike Blumenkrantz <michael.blumenkra...@gmail.com> Reviewed-by: Vasily Khoruzhick <anars...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=473b0fc25dccc6e6ba1afd520adcd6fb5d618e36 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 12:15:27 2020 -0500 gallium/ttn: Use variable create/add helpers Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a41a84d362087094377002d474dd3a1fc463c3b7 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 12:09:28 2020 -0500 mesa/ptn: Use nir_variable_create Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5536e4a78e5d9a0028951ea13dc0bf818d4c5a1 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:57:21 2020 -0500 aco: Use nir_foreach_variable_with_modes to walk SSBOs Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a61be312e218231e2090ac6db4d7e1d5aca4c5d2 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 18:13:34 2020 -0500 panfrost: Use nir_foreach_variable_with_modes in pan_compile Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=94f0bae4de756fb92e60ef29aea98cd5c8099c6e Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 16:07:11 2020 -0500 panfrost/midgard: Make search_var take a nir_shader and mode Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=568022be753126d82e4e746f42481d8789f10947 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 18:21:56 2020 -0500 r600/sfn: Use nir_foreach_variable_with_modes in IO vectorization Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc51cec9c08b18055596a4823b272f62f928c062 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Wed Jul 22 11:26:14 2020 -0500 r600/sfn/lower_tex: Get rid of the lower_sampler vector We can get the result type information easily from nir_tex_instr itself by looking at dest_type. There's no reason to construct a vector and try to index into it. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=929673077c6ca9bde031d5f2e45e681e625c194b Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 16:04:40 2020 -0500 r600/sfn/lower_tess_io: Rework get_tcs_varying_offset Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4d812db10a40e298b12d25ae279fb0f8da1a80e Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 15:53:59 2020 -0500 freedreno/ir3_cmdline: Rework i/o variable fixup Reviewed-by: Rob Clark <robdcl...@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce6e59b3d342b0cdbc168aefcab24703b464c6d0 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 15:48:22 2020 -0500 lima/standalone: Rework i/o variable fixup Reviewed-by: Vasily Khoruzhick <anars...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=52dd84a12ec92f78ba7a0889843a9dbd5f98e749 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 15:16:02 2020 -0500 freedreno/ir3_lower_tess: Rework var list helpers They now take a nir_shader and a nir_variable_mode Reviewed-by: Rob Clark <robdcl...@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=77c41ce04bf9b218743477369394edb920592b97 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:54:19 2020 -0500 nir/gl_nir_linker: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie <airl...@redhat.com> Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c256cd900e71a44490ed8a248ebc0c7f1abc38c5 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 18:46:24 2020 -0500 nir/lower_variable_initializers: Restrict the modes we lower This is not a functional change because these are the only modes we handle. All others get silently ignored. Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d7e064623ea4db1e5e18e18b0bb958462054ed3 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:31:00 2020 -0500 nir/split_per_member_structs: Use nir_variable_with_modes_safe Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90cf4709d92d4c693530ddf317067f5b53798424 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:22:23 2020 -0500 nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0d5ef6139880c683642958394de7b9d72f09544 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:18:29 2020 -0500 nir/lower_two_sided_color: Use nir_variable_create Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb3994cfe7db48f5b8b42d6c480653a2d4a051a1 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 11:13:04 2020 -0500 nir/io_to_vector: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a77c674423a5c291b0aa9964590dd67ca40d36a Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 09:51:05 2020 -0500 nir/lower_io_to_temporaries: Use a separate list for new inputs Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd66005b23c5963749e0f6ce2962d1baa3d11ab9 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 17:34:42 2020 -0500 nir: Use a nir_shader and mode in lower_clip_cull_distance_arrays Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5d15c301e11d623f81a2d9181dadedb03e07c1f Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 17:31:04 2020 -0500 nir/lower_amul: Add a variable mode check This loop should only apply to UBOs and SSBOs because max_slot is never used for normal uniforms. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3be0be7d545334107977e850ce9ab51b0110a222 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 16:49:46 2020 -0500 nir: Split nir_index_vars into two functions We also very slightly change the semantics. It no longer is one index per list for global variables and is a single index over-all. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=86c93038148d237b959d070e16e4393418baf111 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 15:04:45 2020 -0500 nir/split_vars: Add mode checks to list walks Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f6c263cc376977dd8ac9adbcf37b43c46ca33f4 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 15:57:45 2020 -0500 st/nir: Rework fixup_varying_slots Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c3a30393d945d37d0acc457f129705ba89b4cf6 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 17:15:27 2020 -0500 nir/linking: Rework some internal helpers Instead of taking a variable list, take a nir_shader and mode. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=caab46c1e93d702c12a887cb0902d04eaddc0707 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 14:42:53 2020 -0500 nir: Take a shader and variable mode in nir_assign_io_var_locations Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=964c1c4b8779e3871ab41e65147f3afe64696e4f Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 14:51:04 2020 -0500 nir: Take a nir_shader and variable mode in assign_var_locations Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f6f7a34c5b26ea084ab30c9061b83ad0b8ab586 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 14:32:01 2020 -0500 nir: Add and use a nir_variable_list_for_mode helper We also add a new list iterator which takes a modes bitfield and automatically figures out which list to use. In the future, this iterator will work for multiple modes but today it assumes a single mode thanks to the behavior of nir_variable_list_for_mode. This also doesn't work for function_temp variables. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3e1c50067e0a1e219bc4d30333b953c6baa0c08 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Mon Jul 20 14:09:50 2020 -0500 nir: Add a nir_foreach_gl_uniform_variable helper for GL linking There are a bunch of cases where we really do want to walk the list that is nir->uniforms because we want all things declared "uniform" in the GLSL. Add a helper for this but restrict it to the GL linking code. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=feb32f898c6d36f3c81c3ce2d5a3f8ddd915e332 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Sat Jul 18 18:45:18 2020 -0500 nir: Add a nir_foreach_uniform_variable helper This one's a bit more complex because it filters off only those variables with mode == nir_var_uniform. As such, it's not exactly a drop-in replacement for nir_foreach_variable(var, &nir->uniforms). Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92dcda5ce9185125453ff376957cbf32e348edfe Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Wed May 20 10:18:14 2020 -0500 nir: Add a nir_foreach_function_temp_variable helper Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2956d53400fdabe7a52d7ca6154827fea160abf2 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Sat Jul 18 18:24:25 2020 -0500 nir: Add nir_foreach_shader_in/out_variable helpers Reviewed-by: Jose Maria Casanova Crespo <jmcasan...@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bf8572222044638866c8b5d9079a439ff39beb1 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Tue Jul 21 15:15:43 2020 -0500 nir/dead_variables: Respect the modes passed to remove_dead_vars For the most part, this doesn't actually matter today. We already only call remove_dead_vars on the lists that are specified in the modes. The only functional change here is for the uniform, mem_ubo, and mem_ssbo modes because they share a list. If nir_remove_dead_variables is called with a mode of nir_var_uniform, it will no longer remove UBOs or SSBOs, for instance. Reviewed-by: Gert Wollny <gert.wol...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5746af444606b77e30309d5b85bc116d64df2cf4 Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Wed May 20 10:09:05 2020 -0500 nir: Take a mode in remove_unused_io_vars Reviewed-by: Jose Maria Casanova Crespo <jmcasan...@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966> _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit