It can be enabled with RADV_PERFTEST=pswave32.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
RADV_PERFTEST_SHADER_BALLOT = 0x40,
RADV_PERFTEST_TC_COMPAT_CMASK = 0x80,
RADV_PERFTEST_CS_WAVE_32 = 0x100,
+ RADV_PERFTEST_PS_WAVE_32 = 0x200,
};
bool
/* Determine the number of threads per wave for all stages. */
device->cs_wave_size = 64;
+ device->ps_wave_size = 64;
if (device->rad_info.chip_class >= GFX10) {
if (device->instance->perftest_flags & RADV_PERFTEST_CS_WAVE_32)
device->cs_wave_size = 32;
+
+ /* For pixel shaders, wave64 is recommanded. */
+ if (device->instance->perftest_flags & RADV_PERFTEST_PS_WAVE_32)
+ device->ps_wave_size = 32;
}
radv_physical_device_init_mem_types(device);
{"shader_ballot", RADV_PERFTEST_SHADER_BALLOT},
{"tccompatcmask", RADV_PERFTEST_TC_COMPAT_CMASK},
{"cswave32", RADV_PERFTEST_CS_WAVE_32},
+ {"pswave32", RADV_PERFTEST_PS_WAVE_32},
{NULL, 0}
};
{
if (shaders[0]->info.stage == MESA_SHADER_COMPUTE)
return options->cs_wave_size;
+ else if (shaders[0]->info.stage == MESA_SHADER_FRAGMENT)
+ return options->ps_wave_size;
return 64;
}
ps->config.spi_ps_input_addr);
radeon_set_context_reg(ctx_cs, R_0286D8_SPI_PS_IN_CONTROL,
- S_0286D8_NUM_INTERP(ps->info.fs.num_interp));
+ S_0286D8_NUM_INTERP(ps->info.fs.num_interp) |
+ S_0286D8_PS_W32_EN(pipeline->device->physical_device->ps_wave_size == 32));
radeon_set_context_reg(ctx_cs, R_0286E0_SPI_BARYC_CNTL, pipeline->graphics.spi_baryc_cntl);
bool has_dcc_constant_encode;
/* Number of threads per wave. */
+ uint8_t ps_wave_size;
uint8_t cs_wave_size;
/* This is the drivers on-disk cache used as a fallback as opposed to
{
if (stage == MESA_SHADER_COMPUTE)
return pdevice->cs_wave_size;
-
+ else if (stage == MESA_SHADER_FRAGMENT)
+ return pdevice->ps_wave_size;
return 64;
}
options->tess_offchip_block_dw_size = device->tess_offchip_block_dw_size;
options->address32_hi = device->physical_device->rad_info.address32_hi;
options->cs_wave_size = device->physical_device->cs_wave_size;
+ options->ps_wave_size = device->physical_device->ps_wave_size;
if (options->supports_spill)
tm_options |= AC_TM_SUPPORTS_SPILL;
uint32_t tess_offchip_block_dw_size;
uint32_t address32_hi;
uint8_t cs_wave_size;
+ uint8_t ps_wave_size;
};
enum radv_ud_index {