mesa/src
Caio Marcelo de Oliveira Filho 65e8761474 intel/nir: Combine store_derefs to improve code from SPIR-V
Due to lack of write mask in SPIR-V store, generators may produce
multiple stores to the same vector but using different array derefs.
Use the combining store pass to clean this up.  For example,

    layout(binding = 3) buffer block {
        vec4 v;
    };

    void main() {
        v.x = 11;
        v.y = 22;
    }

after going to SPIR-V and NIR, ends up with in two store_derefs to
v[0] and v[1]

    vec2 32 ssa_4 = deref_struct &ssa_3->field0 (ssbo vec4) /* &((block *)ssa_2)->field0 */
    vec2 32 ssa_6 = deref_array &(*ssa_4)[0] (ssbo float) /* &((block *)ssa_2)->field0[0] */
    intrinsic store_deref (ssa_6, ssa_7) (1, 0) /* wrmask=x */ /* access=0 */
    vec1 32 ssa_13 = load_const (0x00000001 /* 0.000000 */)
    vec2 32 ssa_14 = deref_array &(*ssa_4)[1] (ssbo float) /* &((block *)ssa_2)->field0[1] */
    intrinsic store_deref (ssa_14, ssa_15) (1, 0) /* wrmask=x */ /* access=0 */

producing two different sends instructions in skl.  The combining pass
transform the snippet above into

    vec2 32 ssa_4 = deref_struct &ssa_3->field0 (ssbo vec4) /* &((block *)ssa_2)->field0 */
    vec4 32 ssa_18 = vec4 ssa_7, ssa_15, ssa_16, ssa_17
    intrinsic store_deref (ssa_4, ssa_18) (3, 0) /* wrmask=xy */ /* access=0 */

producing a single sends instruction.

v2: Move this from spirv_to_nir into the general optimization pass for
    intel compiler.  (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-03-13 08:39:16 -07:00
..
amd ac: use the raw tbuffer version for 16-bit SSBO loads 2019-03-13 14:16:14 +01:00
broadcom v3d: Fix leak of the mem_ctx after the DAG refactor. 2019-03-12 16:15:40 -07:00
compiler nir: Add a pass to combine store_derefs to same vector 2019-03-13 08:39:16 -07:00
egl egl: fix libdrm-less builds 2019-03-05 13:04:06 +00:00
freedreno turnip: preliminary support for Wayland WSI 2019-03-11 10:02:13 -07:00
gallium panfrost: Set bo->gem_handle when creating a linear BO 2019-03-13 07:35:39 +01:00
gbm gbm: drop duplicate #defines 2019-02-14 11:20:00 +00:00
getopt
glx glx: add support for GLX_ARB_create_context_no_error (v3) 2019-03-12 19:12:21 -04:00
gtest meson: hide warnings from external project gtest 2018-10-31 18:20:25 +00:00
hgl hgl/meson: drop unused include directory 2019-03-08 18:00:19 +00:00
imgui imgui: update memory editor 2019-02-26 12:49:07 +00:00
intel intel/nir: Combine store_derefs to improve code from SPIR-V 2019-03-13 08:39:16 -07:00
loader loader: use loader_open_device() to handle O_CLOEXEC 2019-02-26 11:07:23 +00:00
mapi autotools: don't build libGLES*.so with GLVND 2019-03-08 15:13:36 +00:00
mesa st/glsl_to_nir: fix incorrect arrary access 2019-03-12 14:47:21 +11:00
util util: Add a DAG datastructure. 2019-03-11 13:13:52 -07:00
vulkan wsi/x11: use WSI_FROM_HANDLE() instead of pointer casts 2019-03-11 10:49:36 +00:00
Makefile.am build: move imgui out of src/intel/tools to be reused 2019-02-21 18:06:05 +00:00
meson.build turnip: Add driver skeleton (v2) 2019-03-11 10:01:15 -07:00
SConscript scons: Remove gles option. 2018-10-19 16:50:26 +01:00