iris: more sketchy SBE
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Jan 2018 20:30:30 +0000 (12:30 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 773ea358d42af42a535a4c73cde337ec8758ae99..bba8138320efce849727371a891a026f192aae3a 100644 (file)
@@ -2072,8 +2072,21 @@ iris_upload_render_state(struct iris_context *ice,
       // XXX: 3DSTATE_SBE, 3DSTATE_SBE_SWIZ
       // -> iris_raster_state (point sprite texture coordinate origin)
       // -> bunch of shader state...
+
       iris_emit_cmd(batch, GENX(3DSTATE_SBE), sbe) {
+         sbe.AttributeSwizzleEnable = true;
+         sbe.NumberofSFOutputAttributes = wm_prog_data->num_varying_inputs;
+         sbe.VertexURBEntryReadOffset = 1;
+         sbe.VertexURBEntryReadLength = 1;
+         sbe.ForceVertexURBEntryReadOffset = true;
+         sbe.ForceVertexURBEntryReadLength = true;
+         sbe.ConstantInterpolationEnable = wm_prog_data->flat_inputs;
+
+         for (int i = 0; i < 2; i++) {
+            sbe.AttributeActiveComponentFormat[i] = ACTIVE_COMPONENT_XYZW;
+         }
       }
+
       iris_emit_cmd(batch, GENX(3DSTATE_SBE_SWIZ), sbe) {
       }
    }