-struct brw_blorp_prog_data
-{
- bool dispatch_8;
- bool dispatch_16;
-
- uint8_t first_curbe_grf_0;
- uint8_t first_curbe_grf_2;
-
- uint32_t ksp_offset_2;
-
- /**
- * True if the WM program should be run in MSDISPMODE_PERSAMPLE with more
- * than one sample per pixel.
- */
- bool persample_msaa_dispatch;
-
- /**
- * Mask of which FS inputs are marked flat by the shader source. This is
- * needed for setting up 3DSTATE_SF/SBE.
- */
- uint32_t flat_inputs;
- unsigned num_varying_inputs;
- uint64_t inputs_read;
+#define BLORP_CREATE_NIR_INPUT(shader, name, type) ({ \
+ nir_variable *input = nir_variable_create((shader), nir_var_shader_in, \
+ type, #name); \
+ if ((shader)->stage == MESA_SHADER_FRAGMENT) \
+ input->data.interpolation = INTERP_MODE_FLAT; \
+ input->data.location = VARYING_SLOT_VAR0 + \
+ offsetof(struct brw_blorp_wm_inputs, name) / (4 * sizeof(float)); \
+ input->data.location_frac = \
+ (offsetof(struct brw_blorp_wm_inputs, name) / sizeof(float)) % 4; \
+ input; \
+})
+
+struct blorp_vs_inputs {
+ uint32_t base_layer;
+ uint32_t _instance_id; /* Set in hardware by SGVS */
+ uint32_t pad[2];