Lines Matching refs:instr
30 nir_intrinsic_base(const nir_intrinsic_instr *instr)
32 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
34 return (int)instr->const_index[info->index_map[NIR_INTRINSIC_BASE] - 1];
38 nir_intrinsic_set_base(nir_intrinsic_instr *instr, int val)
40 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
42 instr->const_index[info->index_map[NIR_INTRINSIC_BASE] - 1] = val;
46 nir_intrinsic_has_base(const nir_intrinsic_instr *instr)
48 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
54 nir_intrinsic_write_mask(const nir_intrinsic_instr *instr)
56 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
58 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_WRITE_MASK] - 1];
62 nir_intrinsic_set_write_mask(nir_intrinsic_instr *instr, unsigned val)
64 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
66 instr->const_index[info->index_map[NIR_INTRINSIC_WRITE_MASK] - 1] = val;
70 nir_intrinsic_has_write_mask(const nir_intrinsic_instr *instr)
72 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
78 nir_intrinsic_stream_id(const nir_intrinsic_instr *instr)
80 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
82 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_STREAM_ID] - 1];
86 nir_intrinsic_set_stream_id(nir_intrinsic_instr *instr, unsigned val)
88 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
90 instr->const_index[info->index_map[NIR_INTRINSIC_STREAM_ID] - 1] = val;
94 nir_intrinsic_has_stream_id(const nir_intrinsic_instr *instr)
96 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
102 nir_intrinsic_ucp_id(const nir_intrinsic_instr *instr)
104 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
106 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_UCP_ID] - 1];
110 nir_intrinsic_set_ucp_id(nir_intrinsic_instr *instr, unsigned val)
112 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
114 instr->const_index[info->index_map[NIR_INTRINSIC_UCP_ID] - 1] = val;
118 nir_intrinsic_has_ucp_id(const nir_intrinsic_instr *instr)
120 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
126 nir_intrinsic_range_base(const nir_intrinsic_instr *instr)
128 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
130 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_RANGE_BASE] - 1];
134 nir_intrinsic_set_range_base(nir_intrinsic_instr *instr, unsigned val)
136 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
138 instr->const_index[info->index_map[NIR_INTRINSIC_RANGE_BASE] - 1] = val;
142 nir_intrinsic_has_range_base(const nir_intrinsic_instr *instr)
144 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
150 nir_intrinsic_range(const nir_intrinsic_instr *instr)
152 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
154 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_RANGE] - 1];
158 nir_intrinsic_set_range(nir_intrinsic_instr *instr, unsigned val)
160 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
162 instr->const_index[info->index_map[NIR_INTRINSIC_RANGE] - 1] = val;
166 nir_intrinsic_has_range(const nir_intrinsic_instr *instr)
168 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
174 nir_intrinsic_desc_set(const nir_intrinsic_instr *instr)
176 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
178 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_DESC_SET] - 1];
182 nir_intrinsic_set_desc_set(nir_intrinsic_instr *instr, unsigned val)
184 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
186 instr->const_index[info->index_map[NIR_INTRINSIC_DESC_SET] - 1] = val;
190 nir_intrinsic_has_desc_set(const nir_intrinsic_instr *instr)
192 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
198 nir_intrinsic_binding(const nir_intrinsic_instr *instr)
200 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
202 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_BINDING] - 1];
206 nir_intrinsic_set_binding(nir_intrinsic_instr *instr, unsigned val)
208 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
210 instr->const_index[info->index_map[NIR_INTRINSIC_BINDING] - 1] = val;
214 nir_intrinsic_has_binding(const nir_intrinsic_instr *instr)
216 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
222 nir_intrinsic_component(const nir_intrinsic_instr *instr)
224 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
226 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_COMPONENT] - 1];
230 nir_intrinsic_set_component(nir_intrinsic_instr *instr, unsigned val)
232 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
234 instr->const_index[info->index_map[NIR_INTRINSIC_COMPONENT] - 1] = val;
238 nir_intrinsic_has_component(const nir_intrinsic_instr *instr)
240 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
246 nir_intrinsic_column(const nir_intrinsic_instr *instr)
248 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
250 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_COLUMN] - 1];
254 nir_intrinsic_set_column(nir_intrinsic_instr *instr, unsigned val)
256 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
258 instr->const_index[info->index_map[NIR_INTRINSIC_COLUMN] - 1] = val;
262 nir_intrinsic_has_column(const nir_intrinsic_instr *instr)
264 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
270 nir_intrinsic_interp_mode(const nir_intrinsic_instr *instr)
272 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
274 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_INTERP_MODE] - 1];
278 nir_intrinsic_set_interp_mode(nir_intrinsic_instr *instr, unsigned val)
280 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
282 instr->const_index[info->index_map[NIR_INTRINSIC_INTERP_MODE] - 1] = val;
286 nir_intrinsic_has_interp_mode(const nir_intrinsic_instr *instr)
288 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
294 nir_intrinsic_reduction_op(const nir_intrinsic_instr *instr)
296 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
298 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_REDUCTION_OP] - 1];
302 nir_intrinsic_set_reduction_op(nir_intrinsic_instr *instr, unsigned val)
304 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
306 instr->const_index[info->index_map[NIR_INTRINSIC_REDUCTION_OP] - 1] = val;
310 nir_intrinsic_has_reduction_op(const nir_intrinsic_instr *instr)
312 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
318 nir_intrinsic_cluster_size(const nir_intrinsic_instr *instr)
320 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
322 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_CLUSTER_SIZE] - 1];
326 nir_intrinsic_set_cluster_size(nir_intrinsic_instr *instr, unsigned val)
328 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
330 instr->const_index[info->index_map[NIR_INTRINSIC_CLUSTER_SIZE] - 1] = val;
334 nir_intrinsic_has_cluster_size(const nir_intrinsic_instr *instr)
336 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
342 nir_intrinsic_param_idx(const nir_intrinsic_instr *instr)
344 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
346 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_PARAM_IDX] - 1];
350 nir_intrinsic_set_param_idx(nir_intrinsic_instr *instr, unsigned val)
352 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
354 instr->const_index[info->index_map[NIR_INTRINSIC_PARAM_IDX] - 1] = val;
358 nir_intrinsic_has_param_idx(const nir_intrinsic_instr *instr)
360 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
366 nir_intrinsic_image_dim(const nir_intrinsic_instr *instr)
368 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
370 return (enum glsl_sampler_dim)instr->const_index[info->index_map[NIR_INTRINSIC_IMAGE_DIM] - 1];
374 nir_intrinsic_set_image_dim(nir_intrinsic_instr *instr, enum glsl_sampler_dim val)
376 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
378 instr->const_index[info->index_map[NIR_INTRINSIC_IMAGE_DIM] - 1] = val;
382 nir_intrinsic_has_image_dim(const nir_intrinsic_instr *instr)
384 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
390 nir_intrinsic_image_array(const nir_intrinsic_instr *instr)
392 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
394 return (bool)instr->const_index[info->index_map[NIR_INTRINSIC_IMAGE_ARRAY] - 1];
398 nir_intrinsic_set_image_array(nir_intrinsic_instr *instr, bool val)
400 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
402 instr->const_index[info->index_map[NIR_INTRINSIC_IMAGE_ARRAY] - 1] = val;
406 nir_intrinsic_has_image_array(const nir_intrinsic_instr *instr)
408 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
414 nir_intrinsic_format(const nir_intrinsic_instr *instr)
416 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
418 return (enum pipe_format)instr->const_index[info->index_map[NIR_INTRINSIC_FORMAT] - 1];
422 nir_intrinsic_set_format(nir_intrinsic_instr *instr, enum pipe_format val)
424 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
426 instr->const_index[info->index_map[NIR_INTRINSIC_FORMAT] - 1] = val;
430 nir_intrinsic_has_format(const nir_intrinsic_instr *instr)
432 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
438 nir_intrinsic_access(const nir_intrinsic_instr *instr)
440 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
442 return (enum gl_access_qualifier)instr->const_index[info->index_map[NIR_INTRINSIC_ACCESS] - 1];
446 nir_intrinsic_set_access(nir_intrinsic_instr *instr, enum gl_access_qualifier val)
448 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
450 instr->const_index[info->index_map[NIR_INTRINSIC_ACCESS] - 1] = val;
454 nir_intrinsic_has_access(const nir_intrinsic_instr *instr)
456 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
462 nir_intrinsic_call_idx(const nir_intrinsic_instr *instr)
464 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
466 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_CALL_IDX] - 1];
470 nir_intrinsic_set_call_idx(nir_intrinsic_instr *instr, unsigned val)
472 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
474 instr->const_index[info->index_map[NIR_INTRINSIC_CALL_IDX] - 1] = val;
478 nir_intrinsic_has_call_idx(const nir_intrinsic_instr *instr)
480 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
486 nir_intrinsic_stack_size(const nir_intrinsic_instr *instr)
488 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
490 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_STACK_SIZE] - 1];
494 nir_intrinsic_set_stack_size(nir_intrinsic_instr *instr, unsigned val)
496 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
498 instr->const_index[info->index_map[NIR_INTRINSIC_STACK_SIZE] - 1] = val;
502 nir_intrinsic_has_stack_size(const nir_intrinsic_instr *instr)
504 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
510 nir_intrinsic_align_mul(const nir_intrinsic_instr *instr)
512 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
514 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_ALIGN_MUL] - 1];
518 nir_intrinsic_set_align_mul(nir_intrinsic_instr *instr, unsigned val)
520 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
522 instr->const_index[info->index_map[NIR_INTRINSIC_ALIGN_MUL] - 1] = val;
526 nir_intrinsic_has_align_mul(const nir_intrinsic_instr *instr)
528 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
534 nir_intrinsic_align_offset(const nir_intrinsic_instr *instr)
536 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
538 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_ALIGN_OFFSET] - 1];
542 nir_intrinsic_set_align_offset(nir_intrinsic_instr *instr, unsigned val)
544 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
546 instr->const_index[info->index_map[NIR_INTRINSIC_ALIGN_OFFSET] - 1] = val;
550 nir_intrinsic_has_align_offset(const nir_intrinsic_instr *instr)
552 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
558 nir_intrinsic_desc_type(const nir_intrinsic_instr *instr)
560 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
562 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_DESC_TYPE] - 1];
566 nir_intrinsic_set_desc_type(nir_intrinsic_instr *instr, unsigned val)
568 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
570 instr->const_index[info->index_map[NIR_INTRINSIC_DESC_TYPE] - 1] = val;
574 nir_intrinsic_has_desc_type(const nir_intrinsic_instr *instr)
576 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
582 nir_intrinsic_src_type(const nir_intrinsic_instr *instr)
584 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
586 return (nir_alu_type)instr->const_index[info->index_map[NIR_INTRINSIC_SRC_TYPE] - 1];
590 nir_intrinsic_set_src_type(nir_intrinsic_instr *instr, nir_alu_type val)
592 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
594 instr->const_index[info->index_map[NIR_INTRINSIC_SRC_TYPE] - 1] = val;
598 nir_intrinsic_has_src_type(const nir_intrinsic_instr *instr)
600 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
606 nir_intrinsic_dest_type(const nir_intrinsic_instr *instr)
608 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
610 return (nir_alu_type)instr->const_index[info->index_map[NIR_INTRINSIC_DEST_TYPE] - 1];
614 nir_intrinsic_set_dest_type(nir_intrinsic_instr *instr, nir_alu_type val)
616 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
618 instr->const_index[info->index_map[NIR_INTRINSIC_DEST_TYPE] - 1] = val;
622 nir_intrinsic_has_dest_type(const nir_intrinsic_instr *instr)
624 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
630 nir_intrinsic_swizzle_mask(const nir_intrinsic_instr *instr)
632 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
634 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_SWIZZLE_MASK] - 1];
638 nir_intrinsic_set_swizzle_mask(nir_intrinsic_instr *instr, unsigned val)
640 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
642 instr->const_index[info->index_map[NIR_INTRINSIC_SWIZZLE_MASK] - 1] = val;
646 nir_intrinsic_has_swizzle_mask(const nir_intrinsic_instr *instr)
648 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
654 nir_intrinsic_is_swizzled(const nir_intrinsic_instr *instr)
656 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
658 return (bool)instr->const_index[info->index_map[NIR_INTRINSIC_IS_SWIZZLED] - 1];
662 nir_intrinsic_set_is_swizzled(nir_intrinsic_instr *instr, bool val)
664 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
666 instr->const_index[info->index_map[NIR_INTRINSIC_IS_SWIZZLED] - 1] = val;
670 nir_intrinsic_has_is_swizzled(const nir_intrinsic_instr *instr)
672 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
678 nir_intrinsic_slc_amd(const nir_intrinsic_instr *instr)
680 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
682 return (bool)instr->const_index[info->index_map[NIR_INTRINSIC_SLC_AMD] - 1];
686 nir_intrinsic_set_slc_amd(nir_intrinsic_instr *instr, bool val)
688 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
690 instr->const_index[info->index_map[NIR_INTRINSIC_SLC_AMD] - 1] = val;
694 nir_intrinsic_has_slc_amd(const nir_intrinsic_instr *instr)
696 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
702 nir_intrinsic_dst_access(const nir_intrinsic_instr *instr)
704 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
706 return (enum gl_access_qualifier)instr->const_index[info->index_map[NIR_INTRINSIC_DST_ACCESS] - 1];
710 nir_intrinsic_set_dst_access(nir_intrinsic_instr *instr, enum gl_access_qualifier val)
712 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
714 instr->const_index[info->index_map[NIR_INTRINSIC_DST_ACCESS] - 1] = val;
718 nir_intrinsic_has_dst_access(const nir_intrinsic_instr *instr)
720 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
726 nir_intrinsic_src_access(const nir_intrinsic_instr *instr)
728 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
730 return (enum gl_access_qualifier)instr->const_index[info->index_map[NIR_INTRINSIC_SRC_ACCESS] - 1];
734 nir_intrinsic_set_src_access(nir_intrinsic_instr *instr, enum gl_access_qualifier val)
736 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
738 instr->const_index[info->index_map[NIR_INTRINSIC_SRC_ACCESS] - 1] = val;
742 nir_intrinsic_has_src_access(const nir_intrinsic_instr *instr)
744 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
750 nir_intrinsic_driver_location(const nir_intrinsic_instr *instr)
752 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
754 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_DRIVER_LOCATION] - 1];
758 nir_intrinsic_set_driver_location(nir_intrinsic_instr *instr, unsigned val)
760 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
762 instr->const_index[info->index_map[NIR_INTRINSIC_DRIVER_LOCATION] - 1] = val;
766 nir_intrinsic_has_driver_location(const nir_intrinsic_instr *instr)
768 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
774 nir_intrinsic_memory_semantics(const nir_intrinsic_instr *instr)
776 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
778 return (nir_memory_semantics)instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_SEMANTICS] - 1];
782 nir_intrinsic_set_memory_semantics(nir_intrinsic_instr *instr, nir_memory_semantics val)
784 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
786 instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_SEMANTICS] - 1] = val;
790 nir_intrinsic_has_memory_semantics(const nir_intrinsic_instr *instr)
792 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
798 nir_intrinsic_memory_modes(const nir_intrinsic_instr *instr)
800 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
802 return (nir_variable_mode)instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_MODES] - 1];
806 nir_intrinsic_set_memory_modes(nir_intrinsic_instr *instr, nir_variable_mode val)
808 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
810 instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_MODES] - 1] = val;
814 nir_intrinsic_has_memory_modes(const nir_intrinsic_instr *instr)
816 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
822 nir_intrinsic_memory_scope(const nir_intrinsic_instr *instr)
824 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
826 return (nir_scope)instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_SCOPE] - 1];
830 nir_intrinsic_set_memory_scope(nir_intrinsic_instr *instr, nir_scope val)
832 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
834 instr->const_index[info->index_map[NIR_INTRINSIC_MEMORY_SCOPE] - 1] = val;
838 nir_intrinsic_has_memory_scope(const nir_intrinsic_instr *instr)
840 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
846 nir_intrinsic_execution_scope(const nir_intrinsic_instr *instr)
848 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
850 return (nir_scope)instr->const_index[info->index_map[NIR_INTRINSIC_EXECUTION_SCOPE] - 1];
854 nir_intrinsic_set_execution_scope(nir_intrinsic_instr *instr, nir_scope val)
856 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
858 instr->const_index[info->index_map[NIR_INTRINSIC_EXECUTION_SCOPE] - 1] = val;
862 nir_intrinsic_has_execution_scope(const nir_intrinsic_instr *instr)
864 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
870 nir_intrinsic_io_semantics(const nir_intrinsic_instr *instr)
872 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
875 STATIC_ASSERT(sizeof(instr->const_index[0]) == sizeof(res));
876 memcpy(&res, &instr->const_index[info->index_map[NIR_INTRINSIC_IO_SEMANTICS] - 1], sizeof(res));
881 nir_intrinsic_set_io_semantics(nir_intrinsic_instr *instr, struct nir_io_semantics val)
883 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
886 STATIC_ASSERT(sizeof(instr->const_index[0]) == sizeof(val));
887 memcpy(&instr->const_index[info->index_map[NIR_INTRINSIC_IO_SEMANTICS] - 1], &val, sizeof(val));
891 nir_intrinsic_has_io_semantics(const nir_intrinsic_instr *instr)
893 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
899 nir_intrinsic_rounding_mode(const nir_intrinsic_instr *instr)
901 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
903 return (nir_rounding_mode)instr->const_index[info->index_map[NIR_INTRINSIC_ROUNDING_MODE] - 1];
907 nir_intrinsic_set_rounding_mode(nir_intrinsic_instr *instr, nir_rounding_mode val)
909 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
911 instr->const_index[info->index_map[NIR_INTRINSIC_ROUNDING_MODE] - 1] = val;
915 nir_intrinsic_has_rounding_mode(const nir_intrinsic_instr *instr)
917 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
923 nir_intrinsic_saturate(const nir_intrinsic_instr *instr)
925 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
927 return (unsigned)instr->const_index[info->index_map[NIR_INTRINSIC_SATURATE] - 1];
931 nir_intrinsic_set_saturate(nir_intrinsic_instr *instr, unsigned val)
933 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
935 instr->const_index[info->index_map[NIR_INTRINSIC_SATURATE] - 1] = val;
939 nir_intrinsic_has_saturate(const nir_intrinsic_instr *instr)
941 const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];