case nir_intrinsic_bindless_image_atomic_xor:
case nir_intrinsic_bindless_image_atomic_comp_swap: {
enum pipe_format format = image_intrin_format(instr);
- validate_assert(state, format == PIPE_FORMAT_COUNT ||
- format == PIPE_FORMAT_R32_UINT ||
- format == PIPE_FORMAT_R32_SINT);
- validate_assert(state, nir_dest_bit_size(instr->dest) == 32);
+ if (format != PIPE_FORMAT_COUNT) {
+ validate_assert(state, format == PIPE_FORMAT_R32_UINT ||
+ format == PIPE_FORMAT_R32_SINT ||
+ format == PIPE_FORMAT_R64_UINT ||
+ format == PIPE_FORMAT_R64_SINT);
+ validate_assert(state, nir_dest_bit_size(instr->dest) ==
+ util_format_get_blocksizebits(format));
+ }
break;
}
case nir_intrinsic_image_atomic_exchange:
case nir_intrinsic_bindless_image_atomic_exchange: {
enum pipe_format format = image_intrin_format(instr);
- validate_assert(state, format == PIPE_FORMAT_COUNT ||
- format == PIPE_FORMAT_R32_UINT ||
- format == PIPE_FORMAT_R32_SINT ||
- format == PIPE_FORMAT_R32_FLOAT);
- validate_assert(state, nir_dest_bit_size(instr->dest) == 32);
+ if (format != PIPE_FORMAT_COUNT) {
+ validate_assert(state, format == PIPE_FORMAT_R32_UINT ||
+ format == PIPE_FORMAT_R32_SINT ||
+ format == PIPE_FORMAT_R32_FLOAT ||
+ format == PIPE_FORMAT_R64_UINT ||
+ format == PIPE_FORMAT_R64_SINT);
+ validate_assert(state, nir_dest_bit_size(instr->dest) ==
+ util_format_get_blocksizebits(format));
+ }
break;
}