continue;
supported_irs =
screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUPPORTED_IRS);
- if (!(supported_irs & (1 << PIPE_SHADER_IR_TGSI)))
+ if (!(supported_irs & ((1 << PIPE_SHADER_IR_TGSI) |
+ (1 << PIPE_SHADER_IR_NIR))))
continue;
}
int compute_supported_irs =
screen->get_shader_param(screen, PIPE_SHADER_COMPUTE,
PIPE_SHADER_CAP_SUPPORTED_IRS);
- if (compute_supported_irs & (1 << PIPE_SHADER_IR_TGSI)) {
+ if (compute_supported_irs & ((1 << PIPE_SHADER_IR_TGSI) |
+ (1 << PIPE_SHADER_IR_NIR))) {
+ enum pipe_shader_ir ir =
+ (compute_supported_irs & PIPE_SHADER_IR_NIR) ?
+ PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI;
uint64_t grid_size[3], block_size[3];
uint64_t max_local_size, max_threads_per_block;
- screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI,
+ screen->get_compute_param(screen, ir,
PIPE_COMPUTE_CAP_MAX_GRID_SIZE, grid_size);
- screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI,
+ screen->get_compute_param(screen, ir,
PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE, block_size);
- screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI,
+ screen->get_compute_param(screen, ir,
PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK,
&max_threads_per_block);
- screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI,
+ screen->get_compute_param(screen, ir,
PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE,
&max_local_size);
if (extensions->ARB_compute_shader) {
uint64_t max_variable_threads_per_block = 0;
- screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI,
+ screen->get_compute_param(screen, ir,
PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK,
&max_variable_threads_per_block);