params.src.view.swizzle = src_swizzle;
params.dst.view.swizzle = dst_swizzle;
- struct brw_blorp_blit_prog_key wm_prog_key;
- memset(&wm_prog_key, 0, sizeof(wm_prog_key));
+ struct brw_blorp_blit_prog_key wm_prog_key = {
+ .shader_type = BLORP_SHADER_TYPE_BLIT
+ };
/* Scaled blitting or not. */
wm_prog_key.blit_scaled =
brw_blorp_surface_info_init(batch->blorp, ¶ms.dst, dst_surf, dst_level,
dst_layer, ISL_FORMAT_UNSUPPORTED, true);
- struct brw_blorp_blit_prog_key wm_prog_key;
- memset(&wm_prog_key, 0, sizeof(wm_prog_key));
+ struct brw_blorp_blit_prog_key wm_prog_key = {
+ .shader_type = BLORP_SHADER_TYPE_BLIT
+ };
const struct isl_format_layout *src_fmtl =
isl_format_get_layout(params.src.surf.format);
struct brw_blorp_const_color_prog_key
{
+ enum blorp_shader_type shader_type; /* Must be BLORP_SHADER_TYPE_CLEAR */
bool use_simd16_replicated_data;
bool pad[3];
};
struct blorp_params *params,
bool use_replicated_data)
{
- struct brw_blorp_const_color_prog_key blorp_key;
- memset(&blorp_key, 0, sizeof(blorp_key));
- blorp_key.use_simd16_replicated_data = use_replicated_data;
+ const struct brw_blorp_const_color_prog_key blorp_key = {
+ .shader_type = BLORP_SHADER_TYPE_CLEAR,
+ .use_simd16_replicated_data = use_replicated_data,
+ };
if (blorp->lookup_shader(blorp, &blorp_key, sizeof(blorp_key),
¶ms->wm_prog_kernel, ¶ms->wm_prog_data))
void blorp_params_init(struct blorp_params *params);
+enum blorp_shader_type {
+ BLORP_SHADER_TYPE_BLIT,
+ BLORP_SHADER_TYPE_CLEAR,
+};
+
struct brw_blorp_blit_prog_key
{
+ enum blorp_shader_type shader_type; /* Must be BLORP_SHADER_TYPE_BLIT */
+
/* Number of samples per pixel that have been configured in the surface
* state for texturing from.
*/