Debian Codegraph @

src/i965_structs.h

raw
1 #ifndef _I965_STRUCTS_H_
2 #define _I965_STRUCTS_H_
3
4 struct i965_vfe_state {
5 struct {
6 unsigned int per_thread_scratch_space: 4;
7 unsigned int pad3: 3;
8 unsigned int extend_vfe_state_present: 1;
9 unsigned int pad2: 2;
10 unsigned int scratch_base: 22;
11 } vfe0;
12
13 struct {
14 unsigned int debug_counter_control: 2;
15 unsigned int children_present: 1;
16 unsigned int vfe_mode: 4;
17 unsigned int pad2: 2;
18 unsigned int num_urb_entries: 7;
19 unsigned int urb_entry_alloc_size: 9;
20 unsigned int max_threads: 7;
21 } vfe1;
22
23 struct {
24 unsigned int pad4: 4;
25 unsigned int interface_descriptor_base: 28;
26 } vfe2;
27 };
28
29 struct i965_vfe_state_ex {
30 struct {
31 unsigned int pad: 8;
32 unsigned int obj_id: 24;
33 } vfex0;
34
35 union {
36 struct {
37 unsigned int residual_grf_offset: 5;
38 unsigned int pad0: 3;
39 unsigned int weight_grf_offset: 5;
40 unsigned int pad1: 3;
41 unsigned int residual_data_offset: 8;
42 unsigned int sub_field_present_flag: 2;
43 unsigned int residual_data_fix_offset_flag: 1;
44 unsigned int pad2: 5;
45 } avc;
46
47 unsigned int vc1;
48 } vfex1;
49
50 struct {
51 unsigned int remap_index_0: 4;
52 unsigned int remap_index_1: 4;
53 unsigned int remap_index_2: 4;
54 unsigned int remap_index_3: 4;
55 unsigned int remap_index_4: 4;
56 unsigned int remap_index_5: 4;
57 unsigned int remap_index_6: 4;
58 unsigned int remap_index_7: 4;
59 } remap_table0;
60
61 struct {
62 unsigned int remap_index_8: 4;
63 unsigned int remap_index_9: 4;
64 unsigned int remap_index_10: 4;
65 unsigned int remap_index_11: 4;
66 unsigned int remap_index_12: 4;
67 unsigned int remap_index_13: 4;
68 unsigned int remap_index_14: 4;
69 unsigned int remap_index_15: 4;
70 } remap_table1;
71
72 struct {
73 unsigned int mask: 8;
74 unsigned int pad: 22;
75 unsigned int type: 1;
76 unsigned int enable: 1;
77 } scoreboard0;
78
79 struct {
80 int delta_x0: 4;
81 int delta_y0: 4;
82 int delta_x1: 4;
83 int delta_y1: 4;
84 int delta_x2: 4;
85 int delta_y2: 4;
86 int delta_x3: 4;
87 int delta_y3: 4;
88 } scoreboard1;
89
90 struct {
91 int delta_x4: 4;
92 int delta_y4: 4;
93 int delta_x5: 4;
94 int delta_y5: 4;
95 int delta_x6: 4;
96 int delta_y6: 4;
97 int delta_x7: 4;
98 int delta_y7: 4;
99 } scoreboard2;
100
101 unsigned int pad;
102 };
103
104 struct i965_vld_state {
105 struct {
106 unsigned int pad6: 6;
107 unsigned int scan_order: 1;
108 unsigned int intra_vlc_format: 1;
109 unsigned int quantizer_scale_type: 1;
110 unsigned int concealment_motion_vector: 1;
111 unsigned int frame_predict_frame_dct: 1;
112 unsigned int top_field_first: 1;
113 unsigned int picture_structure: 2;
114 unsigned int intra_dc_precision: 2;
115 unsigned int f_code_0_0: 4;
116 unsigned int f_code_0_1: 4;
117 unsigned int f_code_1_0: 4;
118 unsigned int f_code_1_1: 4;
119 } vld0;
120
121 struct {
122 unsigned int pad2: 9;
123 unsigned int picture_coding_type: 2;
124 unsigned int pad: 21;
125 } vld1;
126
127 struct {
128 unsigned int index_0: 4;
129 unsigned int index_1: 4;
130 unsigned int index_2: 4;
131 unsigned int index_3: 4;
132 unsigned int index_4: 4;
133 unsigned int index_5: 4;
134 unsigned int index_6: 4;
135 unsigned int index_7: 4;
136 } desc_remap_table0;
137
138 struct {
139 unsigned int index_8: 4;
140 unsigned int index_9: 4;
141 unsigned int index_10: 4;
142 unsigned int index_11: 4;
143 unsigned int index_12: 4;
144 unsigned int index_13: 4;
145 unsigned int index_14: 4;
146 unsigned int index_15: 4;
147 } desc_remap_table1;
148 };
149
150 struct i965_interface_descriptor {
151 struct {
152 unsigned int grf_reg_blocks: 4;
153 unsigned int pad: 2;
154 unsigned int kernel_start_pointer: 26;
155 } desc0;
156
157 struct {
158 unsigned int pad: 7;
159 unsigned int software_exception: 1;
160 unsigned int pad2: 3;
161 unsigned int maskstack_exception: 1;
162 unsigned int pad3: 1;
163 unsigned int illegal_opcode_exception: 1;
164 unsigned int pad4: 2;
165 unsigned int floating_point_mode: 1;
166 unsigned int thread_priority: 1;
167 unsigned int single_program_flow: 1;
168 unsigned int pad5: 1;
169 unsigned int const_urb_entry_read_offset: 6;
170 unsigned int const_urb_entry_read_len: 6;
171 } desc1;
172
173 struct {
174 unsigned int pad: 2;
175 unsigned int sampler_count: 3;
176 unsigned int sampler_state_pointer: 27;
177 } desc2;
178
179 struct {
180 unsigned int binding_table_entry_count: 5;
181 unsigned int binding_table_pointer: 27;
182 } desc3;
183 };
184
185 struct i965_surface_state {
186 struct {
187 unsigned int cube_pos_z: 1;
188 unsigned int cube_neg_z: 1;
189 unsigned int cube_pos_y: 1;
190 unsigned int cube_neg_y: 1;
191 unsigned int cube_pos_x: 1;
192 unsigned int cube_neg_x: 1;
193 unsigned int pad: 2;
194 unsigned int render_cache_read_mode: 1;
195 unsigned int cube_map_corner_mode: 1;
196 unsigned int mipmap_layout_mode: 1;
197 unsigned int vert_line_stride_ofs: 1;
198 unsigned int vert_line_stride: 1;
199 unsigned int color_blend: 1;
200 unsigned int writedisable_blue: 1;
201 unsigned int writedisable_green: 1;
202 unsigned int writedisable_red: 1;
203 unsigned int writedisable_alpha: 1;
204 unsigned int surface_format: 9;
205 unsigned int data_return_format: 1;
206 unsigned int pad0: 1;
207 unsigned int surface_type: 3;
208 } ss0;
209
210 struct {
211 unsigned int base_addr;
212 } ss1;
213
214 struct {
215 unsigned int render_target_rotation: 2;
216 unsigned int mip_count: 4;
217 unsigned int width: 13;
218 unsigned int height: 13;
219 } ss2;
220
221 struct {
222 unsigned int tile_walk: 1;
223 unsigned int tiled_surface: 1;
224 unsigned int pad: 1;
225 unsigned int pitch: 18;
226 unsigned int depth: 11;
227 } ss3;
228
229 struct {
230 unsigned int pad: 19;
231 unsigned int min_array_elt: 9;
232 unsigned int min_lod: 4;
233 } ss4;
234
235 struct {
236 unsigned int pad: 20;
237 unsigned int y_offset: 4;
238 unsigned int pad2: 1;
239 unsigned int x_offset: 7;
240 } ss5;
241 };
242
243 struct thread0 {
244 unsigned int pad0: 1;
245 unsigned int grf_reg_count: 3;
246 unsigned int pad1: 2;
247 unsigned int kernel_start_pointer: 26;
248 };
249
250 struct thread1 {
251 unsigned int ext_halt_exception_enable: 1;
252 unsigned int sw_exception_enable: 1;
253 unsigned int mask_stack_exception_enable: 1;
254 unsigned int timeout_exception_enable: 1;
255 unsigned int illegal_op_exception_enable: 1;
256 unsigned int pad0: 3;
257 unsigned int depth_coef_urb_read_offset: 6; /* WM only */
258 unsigned int pad1: 2;
259 unsigned int floating_point_mode: 1;
260 unsigned int thread_priority: 1;
261 unsigned int binding_table_entry_count: 8;
262 unsigned int pad3: 5;
263 unsigned int single_program_flow: 1;
264 };
265
266 struct thread2 {
267 unsigned int per_thread_scratch_space: 4;
268 unsigned int pad0: 6;
269 unsigned int scratch_space_base_pointer: 22;
270 };
271
272
273 struct thread3 {
274 unsigned int dispatch_grf_start_reg: 4;
275 unsigned int urb_entry_read_offset: 6;
276 unsigned int pad0: 1;
277 unsigned int urb_entry_read_length: 6;
278 unsigned int pad1: 1;
279 unsigned int const_urb_entry_read_offset: 6;
280 unsigned int pad2: 1;
281 unsigned int const_urb_entry_read_length: 6;
282 unsigned int pad3: 1;
283 };
284
285 struct i965_vs_unit_state {
286 struct thread0 thread0;
287 struct thread1 thread1;
288 struct thread2 thread2;
289 struct thread3 thread3;
290
291 struct {
292 unsigned int pad0: 10;
293 unsigned int stats_enable: 1;
294 unsigned int nr_urb_entries: 7;
295 unsigned int pad1: 1;
296 unsigned int urb_entry_allocation_size: 5;
297 unsigned int pad2: 1;
298 unsigned int max_threads: 4;
299 unsigned int pad3: 3;
300 } thread4;
301
302 struct {
303 unsigned int sampler_count: 3;
304 unsigned int pad0: 2;
305 unsigned int sampler_state_pointer: 27;
306 } vs5;
307
308 struct {
309 unsigned int vs_enable: 1;
310 unsigned int vert_cache_disable: 1;
311 unsigned int pad0: 30;
312 } vs6;
313 };
314
315 struct i965_gs_unit_state {
316 struct thread0 thread0;
317 struct thread1 thread1;
318 struct thread2 thread2;
319 struct thread3 thread3;
320
321 struct {
322 unsigned int pad0: 10;
323 unsigned int stats_enable: 1;
324 unsigned int nr_urb_entries: 7;
325 unsigned int pad1: 1;
326 unsigned int urb_entry_allocation_size: 5;
327 unsigned int pad2: 1;
328 unsigned int max_threads: 1;
329 unsigned int pad3: 6;
330 } thread4;
331
332 struct {
333 unsigned int sampler_count: 3;
334 unsigned int pad0: 2;
335 unsigned int sampler_state_pointer: 27;
336 } gs5;
337
338
339 struct {
340 unsigned int max_vp_index: 4;
341 unsigned int pad0: 26;
342 unsigned int reorder_enable: 1;
343 unsigned int pad1: 1;
344 } gs6;
345 };
346
347 struct i965_clip_unit_state {
348 struct thread0 thread0;
349 struct thread1 thread1;
350 struct thread2 thread2;
351 struct thread3 thread3;
352
353 struct {
354 unsigned int pad0: 9;
355 unsigned int gs_output_stats: 1; /* not always */
356 unsigned int stats_enable: 1;
357 unsigned int nr_urb_entries: 7;
358 unsigned int pad1: 1;
359 unsigned int urb_entry_allocation_size: 5;
360 unsigned int pad2: 1;
361 unsigned int max_threads: 6; /* may be less */
362 unsigned int pad3: 1;
363 } thread4;
364
365 struct {
366 unsigned int pad0: 13;
367 unsigned int clip_mode: 3;
368 unsigned int userclip_enable_flags: 8;
369 unsigned int userclip_must_clip: 1;
370 unsigned int pad1: 1;
371 unsigned int guard_band_enable: 1;
372 unsigned int viewport_z_clip_enable: 1;
373 unsigned int viewport_xy_clip_enable: 1;
374 unsigned int vertex_position_space: 1;
375 unsigned int api_mode: 1;
376 unsigned int pad2: 1;
377 } clip5;
378
379 struct {
380 unsigned int pad0: 5;
381 unsigned int clipper_viewport_state_ptr: 27;
382 } clip6;
383
384
385 float viewport_xmin;
386 float viewport_xmax;
387 float viewport_ymin;
388 float viewport_ymax;
389 };
390
391 struct i965_sf_unit_state {
392 struct thread0 thread0;
393 struct {
394 unsigned int pad0: 7;
395 unsigned int sw_exception_enable: 1;
396 unsigned int pad1: 3;
397 unsigned int mask_stack_exception_enable: 1;
398 unsigned int pad2: 1;
399 unsigned int illegal_op_exception_enable: 1;
400 unsigned int pad3: 2;
401 unsigned int floating_point_mode: 1;
402 unsigned int thread_priority: 1;
403 unsigned int binding_table_entry_count: 8;
404 unsigned int pad4: 5;
405 unsigned int single_program_flow: 1;
406 } sf1;
407
408 struct thread2 thread2;
409 struct thread3 thread3;
410
411 struct {
412 unsigned int pad0: 10;
413 unsigned int stats_enable: 1;
414 unsigned int nr_urb_entries: 7;
415 unsigned int pad1: 1;
416 unsigned int urb_entry_allocation_size: 5;
417 unsigned int pad2: 1;
418 unsigned int max_threads: 6;
419 unsigned int pad3: 1;
420 } thread4;
421
422 struct {
423 unsigned int front_winding: 1;
424 unsigned int viewport_transform: 1;
425 unsigned int pad0: 3;
426 unsigned int sf_viewport_state_offset: 27;
427 } sf5;
428
429 struct {
430 unsigned int pad0: 9;
431 unsigned int dest_org_vbias: 4;
432 unsigned int dest_org_hbias: 4;
433 unsigned int scissor: 1;
434 unsigned int disable_2x2_trifilter: 1;
435 unsigned int disable_zero_pix_trifilter: 1;
436 unsigned int point_rast_rule: 2;
437 unsigned int line_endcap_aa_region_width: 2;
438 unsigned int line_width: 4;
439 unsigned int fast_scissor_disable: 1;
440 unsigned int cull_mode: 2;
441 unsigned int aa_enable: 1;
442 } sf6;
443
444 struct {
445 unsigned int point_size: 11;
446 unsigned int use_point_size_state: 1;
447 unsigned int subpixel_precision: 1;
448 unsigned int sprite_point: 1;
449 unsigned int pad0: 11;
450 unsigned int trifan_pv: 2;
451 unsigned int linestrip_pv: 2;
452 unsigned int tristrip_pv: 2;
453 unsigned int line_last_pixel_enable: 1;
454 } sf7;
455 };
456
457 struct i965_sampler_state {
458 struct {
459 unsigned int shadow_function: 3;
460 unsigned int lod_bias: 11;
461 unsigned int min_filter: 3;
462 unsigned int mag_filter: 3;
463 unsigned int mip_filter: 2;
464 unsigned int base_level: 5;
465 unsigned int pad: 1;
466 unsigned int lod_preclamp: 1;
467 unsigned int border_color_mode: 1;
468 unsigned int pad0: 1;
469 unsigned int disable: 1;
470 } ss0;
471
472 struct {
473 unsigned int r_wrap_mode: 3;
474 unsigned int t_wrap_mode: 3;
475 unsigned int s_wrap_mode: 3;
476 unsigned int pad: 3;
477 unsigned int max_lod: 10;
478 unsigned int min_lod: 10;
479 } ss1;
480
481
482 struct {
483 unsigned int pad: 5;
484 unsigned int border_color_pointer: 27;
485 } ss2;
486
487 struct {
488 unsigned int pad: 19;
489 unsigned int max_aniso: 3;
490 unsigned int chroma_key_mode: 1;
491 unsigned int chroma_key_index: 2;
492 unsigned int chroma_key_enable: 1;
493 unsigned int monochrome_filter_width: 3;
494 unsigned int monochrome_filter_height: 3;
495 } ss3;
496 };
497
498 struct i965_wm_unit_state {
499 struct thread0 thread0;
500 struct thread1 thread1;
501 struct thread2 thread2;
502 struct thread3 thread3;
503
504 struct {
505 unsigned int stats_enable: 1;
506 unsigned int pad0: 1;
507 unsigned int sampler_count: 3;
508 unsigned int sampler_state_pointer: 27;
509 } wm4;
510
511 struct {
512 unsigned int enable_8_pix: 1;
513 unsigned int enable_16_pix: 1;
514 unsigned int enable_32_pix: 1;
515 unsigned int pad0: 7;
516 unsigned int legacy_global_depth_bias: 1;
517 unsigned int line_stipple: 1;
518 unsigned int depth_offset: 1;
519 unsigned int polygon_stipple: 1;
520 unsigned int line_aa_region_width: 2;
521 unsigned int line_endcap_aa_region_width: 2;
522 unsigned int early_depth_test: 1;
523 unsigned int thread_dispatch_enable: 1;
524 unsigned int program_uses_depth: 1;
525 unsigned int program_computes_depth: 1;
526 unsigned int program_uses_killpixel: 1;
527 unsigned int legacy_line_rast: 1;
528 unsigned int transposed_urb_read: 1;
529 unsigned int max_threads: 7;
530 } wm5;
531
532 float global_depth_offset_constant;
533 float global_depth_offset_scale;
534 };
535
536 struct i965_cc_viewport {
537 float min_depth;
538 float max_depth;
539 };
540
541 struct i965_cc_unit_state {
542 struct {
543 unsigned int pad0: 3;
544 unsigned int bf_stencil_pass_depth_pass_op: 3;
545 unsigned int bf_stencil_pass_depth_fail_op: 3;
546 unsigned int bf_stencil_fail_op: 3;
547 unsigned int bf_stencil_func: 3;
548 unsigned int bf_stencil_enable: 1;
549 unsigned int pad1: 2;
550 unsigned int stencil_write_enable: 1;
551 unsigned int stencil_pass_depth_pass_op: 3;
552 unsigned int stencil_pass_depth_fail_op: 3;
553 unsigned int stencil_fail_op: 3;
554 unsigned int stencil_func: 3;
555 unsigned int stencil_enable: 1;
556 } cc0;
557
558
559 struct {
560 unsigned int bf_stencil_ref: 8;
561 unsigned int stencil_write_mask: 8;
562 unsigned int stencil_test_mask: 8;
563 unsigned int stencil_ref: 8;
564 } cc1;
565
566
567 struct {
568 unsigned int logicop_enable: 1;
569 unsigned int pad0: 10;
570 unsigned int depth_write_enable: 1;
571 unsigned int depth_test_function: 3;
572 unsigned int depth_test: 1;
573 unsigned int bf_stencil_write_mask: 8;
574 unsigned int bf_stencil_test_mask: 8;
575 } cc2;
576
577
578 struct {
579 unsigned int pad0: 8;
580 unsigned int alpha_test_func: 3;
581 unsigned int alpha_test: 1;
582 unsigned int blend_enable: 1;
583 unsigned int ia_blend_enable: 1;
584 unsigned int pad1: 1;
585 unsigned int alpha_test_format: 1;
586 unsigned int pad2: 16;
587 } cc3;
588
589 struct {
590 unsigned int pad0: 5;
591 unsigned int cc_viewport_state_offset: 27;
592 } cc4;
593
594 struct {
595 unsigned int pad0: 2;
596 unsigned int ia_dest_blend_factor: 5;
597 unsigned int ia_src_blend_factor: 5;
598 unsigned int ia_blend_function: 3;
599 unsigned int statistics_enable: 1;
600 unsigned int logicop_func: 4;
601 unsigned int pad1: 11;
602 unsigned int dither_enable: 1;
603 } cc5;
604
605 struct {
606 unsigned int clamp_post_alpha_blend: 1;
607 unsigned int clamp_pre_alpha_blend: 1;
608 unsigned int clamp_range: 2;
609 unsigned int pad0: 11;
610 unsigned int y_dither_offset: 2;
611 unsigned int x_dither_offset: 2;
612 unsigned int dest_blend_factor: 5;
613 unsigned int src_blend_factor: 5;
614 unsigned int blend_function: 3;
615 } cc6;
616
617 struct {
618 union {
619 float f;
620 unsigned char ub[4];
621 } alpha_ref;
622 } cc7;
623 };
624
625 struct i965_sampler_8x8 {
626 struct {
627 unsigned int pad0: 16;
628 unsigned int chroma_key_index: 2;
629 unsigned int chroma_key_enable: 1;
630 unsigned int pad1: 8;
631 unsigned int ief_filter_size: 1;
632 unsigned int ief_filter_type: 1;
633 unsigned int ief_bypass: 1;
634 unsigned int pad2: 1;
635 unsigned int avs_filter_type: 1;
636 } dw0;
637
638 struct {
639 unsigned int pad0: 5;
640 unsigned int sampler_8x8_state_pointer: 27;
641 } dw1;
642
643 struct {
644 unsigned int weak_edge_threshold: 4;
645 unsigned int strong_edge_threshold: 4;
646 unsigned int global_noise_estimation: 8;
647 unsigned int pad0: 16;
648 } dw2;
649
650 struct {
651 unsigned int r3x_coefficient: 5;
652 unsigned int pad0: 1;
653 unsigned int r3c_coefficient: 5;
654 unsigned int pad1: 3;
655 unsigned int gain_factor: 6;
656 unsigned int non_edge_weight: 3;
657 unsigned int pad2: 1;
658 unsigned int regular_weight: 3;
659 unsigned int pad3: 1;
660 unsigned int strong_edge_weight: 3;
661 unsigned int pad4: 1;
662 } dw3;
663
664 struct {
665 unsigned int pad0: 2;
666 unsigned int mr_boost: 1;
667 unsigned int mr_threshold: 4;
668 unsigned int steepness_boost: 1;
669 unsigned int steepness_threshold: 4;
670 unsigned int pad1: 2;
671 unsigned int r5x_coefficient: 5;
672 unsigned int pad2: 1;
673 unsigned int r5cx_coefficient: 5;
674 unsigned int pad3: 1;
675 unsigned int r5c_coefficient: 5;
676 unsigned int pad4: 1;
677 } dw4;
678
679 struct {
680 unsigned int pwl1_point_1: 8;
681 unsigned int pwl1_point_2: 8;
682 unsigned int pwl1_point_3: 8;
683 unsigned int pwl1_point_4: 8;
684 } dw5;
685
686 struct {
687 unsigned int pwl1_point_5: 8;
688 unsigned int pwl1_point_6: 8;
689 unsigned int pwl1_r3_bias_0: 8;
690 unsigned int pwl1_r3_bias_1: 8;
691 } dw6;
692
693 struct {
694 unsigned int pwl1_r3_bias_2: 8;
695 unsigned int pwl1_r3_bias_3: 8;
696 unsigned int pwl1_r3_bias_4: 8;
697 unsigned int pwl1_r3_bias_5: 8;
698 } dw7;
699
700 struct {
701 unsigned int pwl1_r3_bias_6: 8;
702 unsigned int pwl1_r5_bias_0: 8;
703 unsigned int pwl1_r5_bias_1: 8;
704 unsigned int pwl1_r5_bias_2: 8;
705 } dw8;
706
707 struct {
708 unsigned int pwl1_r5_bias_3: 8;
709 unsigned int pwl1_r5_bias_4: 8;
710 unsigned int pwl1_r5_bias_5: 8;
711 unsigned int pwl1_r5_bias_6: 8;
712 } dw9;
713
714 struct {
715 int pwl1_r3_slope_0: 8;
716 int pwl1_r3_slope_1: 8;
717 int pwl1_r3_slope_2: 8;
718 int pwl1_r3_slope_3: 8;
719 } dw10;
720
721 struct {
722 int pwl1_r3_slope_4: 8;
723 int pwl1_r3_slope_5: 8;
724 int pwl1_r3_slope_6: 8;
725 int pwl1_r5_slope_0: 8;
726 } dw11;
727
728 struct {
729 int pwl1_r5_slope_1: 8;
730 int pwl1_r5_slope_2: 8;
731 int pwl1_r5_slope_3: 8;
732 int pwl1_r5_slope_4: 8;
733 } dw12;
734
735 struct {
736 int pwl1_r5_slope_5: 8;
737 int pwl1_r5_slope_6: 8;
738 unsigned int limiter_boost: 4;
739 unsigned int pad0: 4;
740 unsigned int minimum_limiter: 4;
741 unsigned int maximum_limiter: 4;
742 } dw13;
743
744 struct {
745 unsigned int pad0: 8;
746 unsigned int clip_limiter: 10;
747 unsigned int pad1: 14;
748 } dw14;
749
750 unsigned int dw15; /* Just a pad */
751 };
752
753 struct i965_sampler_8x8_coefficient {
754 struct {
755 int table_0x_filter_c0: 8;
756 int table_0x_filter_c1: 8;
757 int table_0x_filter_c2: 8;
758 int table_0x_filter_c3: 8;
759 } dw0;
760
761 struct {
762 int table_0x_filter_c4: 8;
763 int table_0x_filter_c5: 8;
764 int table_0x_filter_c6: 8;
765 int table_0x_filter_c7: 8;
766 } dw1;
767
768 struct {
769 int table_0y_filter_c0: 8;
770 int table_0y_filter_c1: 8;
771 int table_0y_filter_c2: 8;
772 int table_0y_filter_c3: 8;
773 } dw2;
774
775 struct {
776 int table_0y_filter_c4: 8;
777 int table_0y_filter_c5: 8;
778 int table_0y_filter_c6: 8;
779 int table_0y_filter_c7: 8;
780 } dw3;
781
782 struct {
783 int table_1x_filter_c0: 8;
784 int table_1x_filter_c1: 8;
785 int table_1x_filter_c2: 8;
786 int table_1x_filter_c3: 8;
787 } dw4;
788
789 struct {
790 int table_1x_filter_c4: 8;
791 int table_1x_filter_c5: 8;
792 int table_1x_filter_c6: 8;
793 int table_1x_filter_c7: 8;
794 } dw5;
795
796 struct {
797 int table_1y_filter_c0: 8;
798 int table_1y_filter_c1: 8;
799 int table_1y_filter_c2: 8;
800 int table_1y_filter_c3: 8;
801 } dw6;
802
803 struct {
804 int table_1y_filter_c4: 8;
805 int table_1y_filter_c5: 8;
806 int table_1y_filter_c6: 8;
807 int table_1y_filter_c7: 8;
808 } dw7;
809 };
810
811 struct i965_sampler_8x8_state {
812 struct i965_sampler_8x8_coefficient coefficients[17];
813
814 struct {
815 unsigned int transition_area_with_8_pixels: 3;
816 unsigned int pad0: 1;
817 unsigned int transition_area_with_4_pixels: 3;
818 unsigned int pad1: 1;
819 unsigned int max_derivative_8_pixels: 8;
820 unsigned int max_derivative_4_pixels: 8;
821 unsigned int default_sharpness_level: 8;
822 } dw136;
823
824 union {
825 /* Ironlake, Sandybridge, Ivybridge (Gen5+) */
826 struct {
827 unsigned int pad0: 21;
828 unsigned int bypass_y_adaptive_filtering: 1;
829 unsigned int bypass_x_adaptive_filtering: 1;
830 unsigned int pad1: 9;
831 } ilk;
832
833 /* Haswell (Gen7.5+) */
834 struct {
835 unsigned int rgb_adaptive: 1;
836 unsigned int adaptive_filter_for_all_channel: 1;
837 unsigned int pad0: 19;
838 unsigned int bypass_y_adaptive_filtering: 1;
839 unsigned int bypass_x_adaptive_filtering: 1;
840 unsigned int pad1: 9;
841 } hsw;
842 } dw137;
843 };
844
845 struct i965_surface_state2 {
846 struct {
847 unsigned int surface_base_address;
848 } ss0;
849
850 struct {
851 unsigned int cbcr_pixel_offset_v_direction: 2;
852 unsigned int pad0: 4;
853 unsigned int width: 13;
854 unsigned int height: 13;
855 } ss1;
856
857 struct {
858 unsigned int tile_walk: 1;
859 unsigned int tiled_surface: 1;
860 unsigned int half_pitch_for_chroma: 1;
861 unsigned int pitch: 17;
862 unsigned int pad0: 2;
863 unsigned int surface_object_control_data: 4;
864 unsigned int pad1: 1;
865 unsigned int interleave_chroma: 1;
866 unsigned int surface_format: 4;
867 } ss2;
868
869 struct {
870 unsigned int y_offset_for_cb: 13;
871 unsigned int pad0: 3;
872 unsigned int x_offset_for_cb: 13;
873 unsigned int pad1: 3;
874 } ss3;
875
876 struct {
877 unsigned int y_offset_for_cr: 13;
878 unsigned int pad0: 3;
879 unsigned int x_offset_for_cr: 13;
880 unsigned int pad1: 3;
881 } ss4;
882 };
883
884 struct i965_sampler_dndi {
885 struct {
886 unsigned int denoise_asd_threshold: 8;
887 unsigned int denoise_history_delta: 8;
888 unsigned int denoise_maximum_history: 8;
889 unsigned int denoise_stad_threshold: 8;
890 } dw0;
891
892 struct {
893 unsigned int denoise_threshold_for_sum_of_complexity_measure: 8;
894 unsigned int denoise_moving_pixel_threshold: 5;
895 unsigned int stmm_c2: 3;
896 unsigned int low_temporal_difference_threshold: 6;
897 unsigned int pad0: 2;
898 unsigned int temporal_difference_threshold: 6;
899 unsigned int pad1: 2;
900 } dw1;
901
902 struct {
903 unsigned int block_noise_estimate_noise_threshold: 8;
904 unsigned int block_noise_estimate_edge_threshold: 8;
905 unsigned int denoise_edge_threshold: 8;
906 unsigned int good_neighbor_threshold: 8;
907 } dw2;
908
909 struct {
910 unsigned int maximum_stmm: 8;
911 unsigned int multipler_for_vecm: 6;
912 unsigned int pad0: 2;
913 unsigned int blending_constant_across_time_for_small_values_of_stmm: 8;
914 unsigned int blending_constant_across_time_for_large_values_of_stmm: 7;
915 unsigned int stmm_blending_constant_select: 1;
916 } dw3;
917
918 struct {
919 unsigned int sdi_delta: 8;
920 unsigned int sdi_threshold: 8;
921 unsigned int stmm_output_shift: 4;
922 unsigned int stmm_shift_up: 2;
923 unsigned int stmm_shift_down: 2;
924 unsigned int minimum_stmm: 8;
925 } dw4;
926
927 struct {
928 unsigned int fmd_temporal_difference_threshold: 8;
929 unsigned int sdi_fallback_mode_2_constant: 8;
930 unsigned int sdi_fallback_mode_1_t2_constant: 8;
931 unsigned int sdi_fallback_mode_1_t1_constant: 8;
932 } dw5;
933
934 struct {
935 unsigned int dn_enable: 1;
936 unsigned int di_enable: 1;
937 unsigned int di_partial: 1;
938 unsigned int dndi_top_first: 1;
939 unsigned int dndi_stream_id: 1;
940 unsigned int dndi_first_frame: 1;
941 unsigned int progressive_dn: 1;
942 unsigned int pad0: 1;
943 unsigned int fmd_tear_threshold: 6;
944 unsigned int pad1: 2;
945 unsigned int fmd2_vertical_difference_threshold: 8;
946 unsigned int fmd1_vertical_difference_threshold: 8;
947 } dw6;
948
949 struct {
950 unsigned int pad0: 8;
951 unsigned int fmd_for_1st_field_of_current_frame: 2;
952 unsigned int pad1: 6;
953 unsigned int fmd_for_2nd_field_of_previous_frame: 2;
954 unsigned int vdi_walker_enable: 1;
955 unsigned int pad2: 4;
956 unsigned int column_width_minus1: 9;
957 } dw7;
958 };
959
960 struct gen8_interface_descriptor_data {
961 struct {
962 unsigned int pad0: 6;
963 unsigned int kernel_start_pointer: 26;
964 } desc0;
965
966 struct {
967 unsigned int kernel_start_pointer_high: 16;
968 unsigned int pad0: 16;
969 } desc1;
970
971 struct {
972 unsigned int pad0: 7;
973 unsigned int software_exception_enable: 1;
974 unsigned int pad1: 3;
975 unsigned int maskstack_exception_enable: 1;
976 unsigned int pad2: 1;
977 unsigned int illegal_opcode_exception_enable: 1;
978 unsigned int pad3: 2;
979 unsigned int floating_point_mode: 1;
980 unsigned int thread_priority: 1;
981 unsigned int single_program_flow: 1;
982 unsigned int denorm_mode: 1;
983 unsigned int pad4: 12;
984 } desc2;
985
986 struct {
987 unsigned int pad0: 2;
988 unsigned int sampler_count: 3;
989 unsigned int sampler_state_pointer: 27;
990 } desc3;
991
992 struct {
993 unsigned int binding_table_entry_count: 5;
994 unsigned int binding_table_pointer: 11;
995 unsigned int pad0: 16;
996 } desc4;
997
998 struct {
999 unsigned int constant_urb_entry_read_offset: 16;
1000 unsigned int constant_urb_entry_read_length: 16;
1001 } desc5;
1002
1003 struct {
1004 unsigned int num_threads_in_tg: 10;
1005 unsigned int pad0: 5;
1006 unsigned int global_barrier_enable: 1;
1007 unsigned int shared_local_memory_size: 5;
1008 unsigned int barrier_enable: 1;
1009 unsigned int rounding_mode: 2;
1010 unsigned int pad1: 8;
1011 } desc6;
1012
1013 struct {
1014 unsigned int cross_thread_constant_data_read_length: 8;
1015 unsigned int pad0: 24;
1016 } desc7;
1017 };
1018
1019 struct gen8_surface_state {
1020 struct {
1021 unsigned int cube_pos_z: 1;
1022 unsigned int cube_neg_z: 1;
1023 unsigned int cube_pos_y: 1;
1024 unsigned int cube_neg_y: 1;
1025 unsigned int cube_pos_x: 1;
1026 unsigned int cube_neg_x: 1;
1027 unsigned int media_boundary_pixel_mode: 2;
1028 unsigned int render_cache_read_write: 1;
1029 unsigned int sampler_l2bypass_disable: 1;
1030 unsigned int vert_line_stride_ofs: 1;
1031 unsigned int vert_line_stride: 1;
1032 unsigned int tile_walk: 1;
1033 unsigned int tiled_surface: 1;
1034 unsigned int horizontal_alignment: 2;
1035 /* Field 16 */
1036 unsigned int vertical_alignment: 2;
1037 unsigned int surface_format: 9; /**< BRW_SURFACEFORMAT_x */
1038 unsigned int pad0: 1;
1039 unsigned int is_array: 1;
1040 unsigned int surface_type: 3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
1041 } ss0;
1042
1043 struct {
1044 unsigned int surface_qpitch: 15;
1045 unsigned int pad0: 4;
1046 unsigned int base_mip_level: 5;
1047 unsigned int surface_mocs: 7;
1048 unsigned int pad1: 1;
1049 } ss1;
1050
1051 struct {
1052 unsigned int width: 14;
1053 unsigned int pad0: 2;
1054 unsigned int height: 14;
1055 unsigned int pad1: 2;
1056 } ss2;
1057
1058 struct {
1059 unsigned int pitch: 18;
1060 unsigned int pad: 3;
1061 unsigned int depth: 11;
1062 } ss3;
1063
1064 struct {
1065 unsigned int multisample_position_palette_index: 3;
1066 unsigned int num_multisamples: 3;
1067 unsigned int multisampled_surface_storage_format: 1;
1068 unsigned int render_target_view_extent: 11;
1069 unsigned int min_array_elt: 11;
1070 unsigned int rotation: 2;
1071 unsigned int force_ncmp_reduce_type: 1;
1072 } ss4;
1073
1074 struct {
1075 unsigned int mip_count: 4;
1076 unsigned int min_lod: 4;
1077 unsigned int pad0: 4;
1078 unsigned int pad1: 2;
1079 unsigned int coherence_type: 1;
1080 unsigned int pad2: 3;
1081 unsigned int pad3: 2;
1082 unsigned int ewa_disable_cube: 1;
1083 unsigned int y_offset: 3;
1084 unsigned int pad4: 1;
1085 unsigned int x_offset: 7;
1086 } ss5;
1087
1088 struct {
1089 unsigned int y_offset_uv_plane: 14;
1090 unsigned int pad0: 2;
1091 unsigned int x_offset_uv_plane: 14;
1092 unsigned int pad1: 1;
1093 unsigned int separate_uv_plane: 1;
1094 } ss6;
1095
1096 struct {
1097 unsigned int resource_min_lod: 12;
1098 unsigned int pad0: 4;
1099 unsigned int shader_chanel_select_a: 3;
1100 unsigned int shader_chanel_select_b: 3;
1101 unsigned int shader_chanel_select_g: 3;
1102 unsigned int shader_chanel_select_r: 3;
1103 unsigned int alpha_clear_color: 1;
1104 unsigned int blue_clear_color: 1;
1105 unsigned int green_clear_color: 1;
1106 unsigned int red_clear_color: 1;
1107 } ss7;
1108 struct {
1109 unsigned int base_addr;
1110 } ss8;
1111
1112 struct {
1113 unsigned int base_addr_high: 16;
1114 unsigned int pad0: 16;
1115 } ss9;
1116
1117 struct {
1118 unsigned int pad0: 12;
1119 unsigned int aux_base_addr: 20;
1120 } ss10;
1121
1122 union {
1123 struct {
1124 unsigned int y_offset_v_plane: 14;
1125 unsigned int pad0: 2;
1126 unsigned int x_offset_v_plane: 14;
1127 unsigned int pad1: 2;
1128 } planar;
1129 struct {
1130 unsigned int aux_base_addr_high: 16;
1131 unsigned int pad2: 16;
1132 } aux_buffer;
1133 } ss11;
1134
1135 struct {
1136 unsigned int hier_depth_clear;
1137 } ss12;
1138
1139 struct {
1140 unsigned int pad0;
1141 } ss13;
1142
1143 struct {
1144 unsigned int pad0;
1145 } ss14;
1146
1147 struct {
1148 unsigned int pad0;
1149 } ss15;
1150 };
1151
1152 struct gen8_surface_state2 {
1153 struct {
1154 unsigned int pad0;
1155 } ss0;
1156
1157 struct {
1158 unsigned int cbcr_pixel_offset_v_direction: 2;
1159 unsigned int picture_structure: 2;
1160 unsigned int width: 14;
1161 unsigned int height: 14;
1162 } ss1;
1163
1164 struct {
1165 unsigned int tile_walk: 1;
1166 unsigned int tiled_surface: 1;
1167 unsigned int half_pitch_for_chroma: 1;
1168 unsigned int pitch: 18;
1169 unsigned int address_ctrl: 1; /* clamp or mirror mode */
1170 unsigned int pad0: 4;
1171 unsigned int interleave_chroma: 1;
1172 unsigned int surface_format: 5;
1173 } ss2;
1174
1175 struct {
1176 unsigned int y_offset_for_cb: 14;
1177 unsigned int pad0: 2;
1178 unsigned int x_offset_for_cb: 14;
1179 unsigned int pad1: 2;
1180 } ss3;
1181
1182 struct {
1183 unsigned int y_offset_for_cr: 15;
1184 unsigned int pad0: 1;
1185 unsigned int x_offset_for_cr: 14;
1186 unsigned int pad1: 2;
1187 } ss4;
1188
1189 struct {
1190 unsigned int surface_object_mocs: 7;
1191 unsigned int pad0: 11;
1192 unsigned int pad1: 2;
1193 unsigned int pad2: 10;
1194 unsigned int vert_line_stride_offset: 1;
1195 unsigned int vert_line_stride: 1;
1196 } ss5;
1197
1198 struct {
1199 unsigned int base_addr;
1200 } ss6;
1201
1202 struct {
1203 unsigned int base_addr_high: 16;
1204 unsigned int pad0: 16;
1205 } ss7;
1206 };
1207
1208 struct gen9_surface_state2 {
1209 struct {
1210 unsigned int pad0: 16;
1211 unsigned int y_offset: 4;
1212 unsigned int x_offset: 7;
1213 unsigned int pad1: 3;
1214 unsigned int rotation: 2;
1215 } ss0;
1216
1217 struct {
1218 unsigned int cbcr_pixel_offset_v_direction: 2;
1219 unsigned int picture_structure: 2;
1220 unsigned int width: 14;
1221 unsigned int height: 14;
1222 } ss1;
1223
1224 struct {
1225 unsigned int tile_walk: 1;
1226 unsigned int tiled_surface: 1;
1227 unsigned int half_pitch_for_chroma: 1;
1228 unsigned int pitch: 18;
1229 unsigned int address_ctrl: 1; /* clamp or mirror mode */
1230 unsigned int memory_compression_enable: 1;
1231 unsigned int memory_compression_mode: 1;
1232 unsigned int cbcr_pixel_offset_v_direction_msb: 1;
1233 unsigned int cbcr_pixel_offset_u_direction: 1;
1234 unsigned int interleave_chroma: 1;
1235 unsigned int surface_format: 5;
1236 } ss2;
1237
1238 struct {
1239 unsigned int y_offset_for_cb: 14;
1240 unsigned int pad0: 2;
1241 unsigned int x_offset_for_cb: 14;
1242 unsigned int pad1: 2;
1243 } ss3;
1244
1245 struct {
1246 unsigned int y_offset_for_cr: 15;
1247 unsigned int pad0: 1;
1248 unsigned int x_offset_for_cr: 14;
1249 unsigned int pad1: 2;
1250 } ss4;
1251
1252 struct {
1253 unsigned int surface_object_mocs: 7;
1254 unsigned int pad0: 11;
1255 unsigned int tr_mode: 2;
1256 unsigned int pad1: 10;
1257 unsigned int vert_line_stride_offset: 1;
1258 unsigned int vert_line_stride: 1;
1259 } ss5;
1260
1261 struct {
1262 unsigned int base_addr;
1263 } ss6;
1264
1265 struct {
1266 unsigned int base_addr_high: 16;
1267 unsigned int pad0: 16;
1268 } ss7;
1269 };
1270
1271 struct gen9_surface_state {
1272 struct {
1273 unsigned int pad0: 6;
1274 unsigned int media_boundary_pixel_mode: 2;
1275 unsigned int render_cache_read_write: 1;
1276 unsigned int sampler_l2bypass_disable: 1;
1277 unsigned int vert_line_stride_ofs: 1;
1278 unsigned int vert_line_stride: 1;
1279 unsigned int tile_walk: 1;
1280 unsigned int tiled_surface: 1;
1281 unsigned int horizontal_alignment: 2;
1282 /* Field 16 */
1283 unsigned int vertical_alignment: 2;
1284 unsigned int surface_format: 9; /**< BRW_SURFACEFORMAT_x */
1285 unsigned int astc_enable: 1;
1286 unsigned int is_array: 1;
1287 unsigned int surface_type: 3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
1288 } ss0;
1289
1290 struct {
1291 unsigned int surface_qpitch: 15;
1292 unsigned int pad0: 4;
1293 unsigned int base_mip_level: 5;
1294 unsigned int surface_mocs: 7;
1295 unsigned int pad1: 1;
1296 } ss1;
1297
1298 struct {
1299 unsigned int width: 14;
1300 unsigned int pad0: 2;
1301 unsigned int height: 14;
1302 unsigned int pad1: 2;
1303 } ss2;
1304
1305 struct {
1306 unsigned int pitch: 18;
1307 unsigned int pad: 3;
1308 unsigned int depth: 11;
1309 } ss3;
1310
1311 struct {
1312 unsigned int multisample_position_palette_index: 3;
1313 unsigned int num_multisamples: 3;
1314 unsigned int multisampled_surface_storage_format: 1;
1315 unsigned int render_target_view_extent: 11;
1316 unsigned int min_array_elt: 11;
1317 unsigned int rotation: 2;
1318 unsigned int force_ncmp_reduce_type: 1;
1319 } ss4;
1320
1321 struct {
1322 unsigned int mip_count: 4;
1323 unsigned int min_lod: 4;
1324 unsigned int miptail_start_lod: 4;
1325 unsigned int pad0: 2;
1326 unsigned int coherence_type: 1;
1327 unsigned int pad1: 3;
1328 unsigned int tr_mode: 2;
1329 unsigned int ewa_disable_cube: 1;
1330 unsigned int y_offset: 3;
1331 unsigned int pad2: 1;
1332 unsigned int x_offset: 7;
1333 } ss5;
1334
1335 struct {
1336 unsigned int y_offset_uv_plane: 14;
1337 unsigned int pad0: 2;
1338 unsigned int x_offset_uv_plane: 14;
1339 unsigned int pad1: 1;
1340 unsigned int separate_uv_plane: 1;
1341 } ss6;
1342
1343 struct {
1344 unsigned int resource_min_lod: 12;
1345 unsigned int pad0: 4;
1346 unsigned int shader_chanel_select_a: 3;
1347 unsigned int shader_chanel_select_b: 3;
1348 unsigned int shader_chanel_select_g: 3;
1349 unsigned int shader_chanel_select_r: 3;
1350 unsigned int pad1: 2;
1351 unsigned int memory_compression_enable: 1;
1352 unsigned int memory_compression_mode: 1;
1353 } ss7;
1354
1355 struct {
1356 unsigned int base_addr;
1357 } ss8;
1358
1359 struct {
1360 unsigned int base_addr_high;
1361 } ss9;
1362
1363 struct {
1364 unsigned int quilt_width: 5;
1365 unsigned int quilt_height: 5;
1366 unsigned int pad0: 6;
1367 unsigned int pad1: 16;
1368 } ss10;
1369
1370 struct {
1371 unsigned int y_offset_v_plane: 14;
1372 unsigned int pad0: 2;
1373 unsigned int x_offset_v_plane: 14;
1374 unsigned int pad1: 2;
1375 } ss11;
1376
1377 struct {
1378 unsigned int pad0;
1379 } ss12;
1380
1381 struct {
1382 unsigned int pad0;
1383 } ss13;
1384
1385 struct {
1386 unsigned int pad0;
1387 } ss14;
1388
1389 struct {
1390 unsigned int pad0;
1391 } ss15;
1392 };
1393
1394 struct gen8_sampler_state {
1395 struct {
1396 unsigned int aniso_algorithm: 1;
1397 unsigned int lod_bias: 13;
1398 unsigned int min_filter: 3;
1399 unsigned int mag_filter: 3;
1400 unsigned int mip_filter: 2;
1401 unsigned int base_level: 5;
1402 unsigned int lod_preclamp: 2;
1403 unsigned int default_color_mode: 1;
1404 unsigned int pad0: 1;
1405 unsigned int disable: 1;
1406 } ss0;
1407
1408 struct {
1409 unsigned int cube_control_mode: 1;
1410 unsigned int shadow_function: 3;
1411 unsigned int chroma_key_mode: 1;
1412 unsigned int chroma_key_index: 2;
1413 unsigned int chroma_key_enable: 1;
1414 unsigned int max_lod: 12;
1415 unsigned int min_lod: 12;
1416 } ss1;
1417
1418 struct {
1419 unsigned int lod_clamp_mag_mode: 1; /* MIPNONE or MIPFILTER */
1420 unsigned int flex_filter_vert_align: 1;
1421 unsigned int flex_filter_hort_align: 1;
1422 unsigned int flex_filter_coff_size: 1; /* coff8 or coff 16 */
1423 unsigned int flex_filter_mode: 1;
1424 unsigned int pad0: 1;
1425 unsigned int indirect_state_pointer: 18; /* point to the SAMPLE_INDIRECT_STATE */
1426 union {
1427 unsigned char nonsep_filter_footer_highmask;
1428 struct {
1429 unsigned char pad1: 2;
1430 unsigned char sep_filter_height: 2;
1431 unsigned char sep_filter_width: 2;
1432 unsigned char sep_filter_coff_size: 2;
1433 } sep_filter;
1434 } ss2_byte3;
1435 } ss2;
1436
1437 struct {
1438 unsigned int r_wrap_mode: 3;
1439 unsigned int t_wrap_mode: 3;
1440 unsigned int s_wrap_mode: 3;
1441 unsigned int pad0: 1;
1442 unsigned int non_normalized_coord: 1;
1443 unsigned int trilinear_quality: 2;
1444 unsigned int address_round: 6;
1445 unsigned int max_aniso: 3;
1446 unsigned int pad1: 2;
1447 unsigned int nonsep_filter_foot_lowmask: 8;
1448 } ss3;
1449 };
1450
1451 struct gen8_global_blend_state {
1452 unsigned int pad0: 19;
1453 unsigned int ydither_offset: 2;
1454 unsigned int xdither_offset: 2;
1455 unsigned int color_dither_enable: 1;
1456 unsigned int alpha_test_func: 3;
1457 unsigned int alpha_test_enable: 1;
1458 unsigned int alpha_to_coverage_dither: 1;
1459 unsigned int alpha_to_one: 1;
1460 unsigned int ia_blend_enable: 1;
1461 unsigned int alpha_to_coverage: 1;
1462 };
1463
1464 struct gen8_blend_state_rt {
1465 struct {
1466 unsigned int blue_write_dis: 1;
1467 unsigned int green_write_dis: 1;
1468 unsigned int red_write_dis: 1;
1469 unsigned int alpha_write_dis: 1;
1470 unsigned int pad0: 1;
1471 unsigned int alpha_blend_func: 3;
1472 unsigned int ia_dest_blend_factor: 5;
1473 unsigned int ia_src_blend_factor: 5;
1474 unsigned int color_blend_func: 3;
1475 unsigned int dest_blend_factor: 5;
1476 unsigned int src_blend_factor: 5;
1477 unsigned int colorbuf_blend: 1;
1478 } blend0;
1479
1480 struct {
1481 unsigned int post_blend_clamp_enable: 1;
1482 unsigned int pre_blend_clamp_enable: 1;
1483 unsigned int clamp_range: 2;
1484 unsigned int pre_blend_src_clamp: 1;
1485 unsigned int pad0: 22;
1486 unsigned int logic_op_func: 4;
1487 unsigned int logic_op_enable: 1;
1488 } blend1;
1489 };
1490
1491 /* TODO: Add the sampler_8x8 for Gen8+.
1492 * AVS/Convolve is 256DWs.
1493 * MinMaxfilter/Erode/Dilate: 8DWs*/
1494
1495
1496 struct gen6_blend_state {
1497 struct {
1498 unsigned int dest_blend_factor: 5;
1499 unsigned int source_blend_factor: 5;
1500 unsigned int pad3: 1;
1501 unsigned int blend_func: 3;
1502 unsigned int pad2: 1;
1503 unsigned int ia_dest_blend_factor: 5;
1504 unsigned int ia_source_blend_factor: 5;
1505 unsigned int pad1: 1;
1506 unsigned int ia_blend_func: 3;
1507 unsigned int pad0: 1;
1508 unsigned int ia_blend_enable: 1;
1509 unsigned int blend_enable: 1;
1510 } blend0;
1511
1512 struct {
1513 unsigned int post_blend_clamp_enable: 1;
1514 unsigned int pre_blend_clamp_enable: 1;
1515 unsigned int clamp_range: 2;
1516 unsigned int pad0: 4;
1517 unsigned int x_dither_offset: 2;
1518 unsigned int y_dither_offset: 2;
1519 unsigned int dither_enable: 1;
1520 unsigned int alpha_test_func: 3;
1521 unsigned int alpha_test_enable: 1;
1522 unsigned int pad1: 1;
1523 unsigned int logic_op_func: 4;
1524 unsigned int logic_op_enable: 1;
1525 unsigned int pad2: 1;
1526 unsigned int write_disable_b: 1;
1527 unsigned int write_disable_g: 1;
1528 unsigned int write_disable_r: 1;
1529 unsigned int write_disable_a: 1;
1530 unsigned int pad3: 1;
1531 unsigned int alpha_to_coverage_dither: 1;
1532 unsigned int alpha_to_one: 1;
1533 unsigned int alpha_to_coverage: 1;
1534 } blend1;
1535 };
1536
1537 struct gen6_color_calc_state {
1538 struct {
1539 unsigned int alpha_test_format: 1;
1540 unsigned int pad0: 14;
1541 unsigned int round_disable: 1;
1542 unsigned int bf_stencil_ref: 8;
1543 unsigned int stencil_ref: 8;
1544 } cc0;
1545
1546 union {
1547 float alpha_ref_f;
1548 struct {
1549 unsigned int ui: 8;
1550 unsigned int pad0: 24;
1551 } alpha_ref_fi;
1552 } cc1;
1553
1554 float constant_r;
1555 float constant_g;
1556 float constant_b;
1557 float constant_a;
1558 };
1559
1560 struct gen6_depth_stencil_state {
1561 struct {
1562 unsigned int pad0: 3;
1563 unsigned int bf_stencil_pass_depth_pass_op: 3;
1564 unsigned int bf_stencil_pass_depth_fail_op: 3;
1565 unsigned int bf_stencil_fail_op: 3;
1566 unsigned int bf_stencil_func: 3;
1567 unsigned int bf_stencil_enable: 1;
1568 unsigned int pad1: 2;
1569 unsigned int stencil_write_enable: 1;
1570 unsigned int stencil_pass_depth_pass_op: 3;
1571 unsigned int stencil_pass_depth_fail_op: 3;
1572 unsigned int stencil_fail_op: 3;
1573 unsigned int stencil_func: 3;
1574 unsigned int stencil_enable: 1;
1575 } ds0;
1576
1577 struct {
1578 unsigned int bf_stencil_write_mask: 8;
1579 unsigned int bf_stencil_test_mask: 8;
1580 unsigned int stencil_write_mask: 8;
1581 unsigned int stencil_test_mask: 8;
1582 } ds1;
1583
1584 struct {
1585 unsigned int pad0: 26;
1586 unsigned int depth_write_enable: 1;
1587 unsigned int depth_test_func: 3;
1588 unsigned int pad1: 1;
1589 unsigned int depth_test_enable: 1;
1590 } ds2;
1591 };
1592
1593 struct gen6_interface_descriptor_data {
1594 struct {
1595 unsigned int pad0: 6;
1596 unsigned int kernel_start_pointer: 26;
1597 } desc0;
1598
1599 struct {
1600 unsigned int pad0: 7;
1601 unsigned int software_exception_enable: 1;
1602 unsigned int pad1: 3;
1603 unsigned int maskstack_exception_enable: 1;
1604 unsigned int pad2: 1;
1605 unsigned int illegal_opcode_exception_enable: 1;
1606 unsigned int pad3: 2;
1607 unsigned int floating_point_mode: 1;
1608 unsigned int thread_priority: 1;
1609 unsigned int single_program_flow: 1;
1610 unsigned int pad4: 13;
1611 } desc1;
1612
1613 struct {
1614 unsigned int pad0: 2;
1615 unsigned int sampler_count: 3;
1616 unsigned int sampler_state_pointer: 27;
1617 } desc2;
1618
1619 struct {
1620 unsigned int binding_table_entry_count: 5;
1621 unsigned int binding_table_pointer: 27;
1622 } desc3;
1623
1624 struct {
1625 unsigned int constant_urb_entry_read_offset: 16;
1626 unsigned int constant_urb_entry_read_length: 16;
1627 } desc4;
1628
1629 union {
1630 struct {
1631 unsigned int num_threads: 8;
1632 unsigned int barrier_return_byte: 8;
1633 unsigned int shared_local_memory_size: 5;
1634 unsigned int barrier_enable: 1;
1635 unsigned int rounding_mode: 2;
1636 unsigned int barrier_return_grf_offset: 8;
1637 } gen7;
1638
1639 struct {
1640 unsigned int barrier_id: 4;
1641 unsigned int pad0: 28;
1642 } gen6;
1643 } desc5;
1644
1645 struct {
1646 unsigned int cross_thread_constant_data_read_length: 8;
1647 unsigned int pad0: 24;
1648 } desc6;
1649
1650 struct {
1651 unsigned int pad0;
1652 } desc7;
1653 };
1654
1655 struct gen7_surface_state {
1656 struct {
1657 unsigned int cube_pos_z: 1;
1658 unsigned int cube_neg_z: 1;
1659 unsigned int cube_pos_y: 1;
1660 unsigned int cube_neg_y: 1;
1661 unsigned int cube_pos_x: 1;
1662 unsigned int cube_neg_x: 1;
1663 unsigned int pad2: 2;
1664 unsigned int render_cache_read_write: 1;
1665 unsigned int pad1: 1;
1666 unsigned int surface_array_spacing: 1;
1667 unsigned int vert_line_stride_ofs: 1;
1668 unsigned int vert_line_stride: 1;
1669 unsigned int tile_walk: 1;
1670 unsigned int tiled_surface: 1;
1671 unsigned int horizontal_alignment: 1;
1672 unsigned int vertical_alignment: 2;
1673 unsigned int surface_format: 9; /**< BRW_SURFACEFORMAT_x */
1674 unsigned int pad0: 1;
1675 unsigned int is_array: 1;
1676 unsigned int surface_type: 3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
1677 } ss0;
1678
1679 struct {
1680 unsigned int base_addr;
1681 } ss1;
1682
1683 struct {
1684 unsigned int width: 14;
1685 unsigned int pad1: 2;
1686 unsigned int height: 14;
1687 unsigned int pad0: 2;
1688 } ss2;
1689
1690 struct {
1691 unsigned int pitch: 18;
1692 unsigned int pad: 3;
1693 unsigned int depth: 11;
1694 } ss3;
1695
1696 struct {
1697 unsigned int multisample_position_palette_index: 3;
1698 unsigned int num_multisamples: 3;
1699 unsigned int multisampled_surface_storage_format: 1;
1700 unsigned int render_target_view_extent: 11;
1701 unsigned int min_array_elt: 11;
1702 unsigned int rotation: 2;
1703 unsigned int pad0: 1;
1704 } ss4;
1705
1706 struct {
1707 unsigned int mip_count: 4;
1708 unsigned int min_lod: 4;
1709 unsigned int pad1: 12;
1710 unsigned int y_offset: 4;
1711 unsigned int pad0: 1;
1712 unsigned int x_offset: 7;
1713 } ss5;
1714
1715 struct {
1716 unsigned int pad; /* Multisample Control Surface stuff */
1717 } ss6;
1718
1719 struct {
1720 unsigned int resource_min_lod: 12;
1721 unsigned int pad0: 4;
1722 unsigned int shader_chanel_select_a: 3;
1723 unsigned int shader_chanel_select_b: 3;
1724 unsigned int shader_chanel_select_g: 3;
1725 unsigned int shader_chanel_select_r: 3;
1726 unsigned int alpha_clear_color: 1;
1727 unsigned int blue_clear_color: 1;
1728 unsigned int green_clear_color: 1;
1729 unsigned int red_clear_color: 1;
1730 } ss7;
1731 };
1732
1733 struct gen7_sampler_state {
1734 struct {
1735 unsigned int aniso_algorithm: 1;
1736 unsigned int lod_bias: 13;
1737 unsigned int min_filter: 3;
1738 unsigned int mag_filter: 3;
1739 unsigned int mip_filter: 2;
1740 unsigned int base_level: 5;
1741 unsigned int pad1: 1;
1742 unsigned int lod_preclamp: 1;
1743 unsigned int default_color_mode: 1;
1744 unsigned int pad0: 1;
1745 unsigned int disable: 1;
1746 } ss0;
1747
1748 struct {
1749 unsigned int cube_control_mode: 1;
1750 unsigned int shadow_function: 3;
1751 unsigned int pad: 4;
1752 unsigned int max_lod: 12;
1753 unsigned int min_lod: 12;
1754 } ss1;
1755
1756 struct {
1757 unsigned int pad: 5;
1758 unsigned int default_color_pointer: 27;
1759 } ss2;
1760
1761 struct {
1762 unsigned int r_wrap_mode: 3;
1763 unsigned int t_wrap_mode: 3;
1764 unsigned int s_wrap_mode: 3;
1765 unsigned int pad: 1;
1766 unsigned int non_normalized_coord: 1;
1767 unsigned int trilinear_quality: 2;
1768 unsigned int address_round: 6;
1769 unsigned int max_aniso: 3;
1770 unsigned int chroma_key_mode: 1;
1771 unsigned int chroma_key_index: 2;
1772 unsigned int chroma_key_enable: 1;
1773 unsigned int pad0: 6;
1774 } ss3;
1775 };
1776
1777 struct gen7_surface_state2 {
1778 struct {
1779 unsigned int surface_base_address;
1780 } ss0;
1781
1782 struct {
1783 unsigned int cbcr_pixel_offset_v_direction: 2;
1784 unsigned int picture_structure: 2;
1785 unsigned int width: 14;
1786 unsigned int height: 14;
1787 } ss1;
1788
1789 struct {
1790 unsigned int tile_walk: 1;
1791 unsigned int tiled_surface: 1;
1792 unsigned int half_pitch_for_chroma: 1;
1793 unsigned int pitch: 18;
1794 unsigned int pad0: 1;
1795 unsigned int surface_object_control_data: 4;
1796 unsigned int pad1: 1;
1797 unsigned int interleave_chroma: 1;
1798 unsigned int surface_format: 4;
1799 } ss2;
1800
1801 struct {
1802 unsigned int y_offset_for_cb: 15;
1803 unsigned int pad0: 1;
1804 unsigned int x_offset_for_cb: 14;
1805 unsigned int pad1: 2;
1806 } ss3;
1807
1808 struct {
1809 unsigned int y_offset_for_cr: 15;
1810 unsigned int pad0: 1;
1811 unsigned int x_offset_for_cr: 14;
1812 unsigned int pad1: 2;
1813 } ss4;
1814
1815 struct {
1816 unsigned int pad0;
1817 } ss5;
1818
1819 struct {
1820 unsigned int pad0;
1821 } ss6;
1822
1823 struct {
1824 unsigned int pad0;
1825 } ss7;
1826 };
1827
1828 struct gen7_sampler_8x8 {
1829 struct {
1830 unsigned int global_noise_estimation: 8;
1831 unsigned int pad0: 8;
1832 unsigned int chroma_key_index: 2;
1833 unsigned int chroma_key_enable: 1;
1834 unsigned int pad1: 10;
1835 unsigned int ief_bypass: 1;
1836 unsigned int pad2: 1;
1837 unsigned int disable_8x8_filter: 1;
1838 } dw0;
1839
1840 struct {
1841 unsigned int pad0: 5;
1842 unsigned int sampler_8x8_state_pointer: 27;
1843 } dw1;
1844
1845 struct {
1846 unsigned int weak_edge_threshold: 6;
1847 unsigned int pad0: 2;
1848 unsigned int strong_edge_threshold: 6;
1849 unsigned int pad1: 2;
1850 unsigned int r5x_coefficient: 5;
1851 unsigned int r5cx_coefficient: 5;
1852 unsigned int r5c_coefficient: 5;
1853 unsigned int pad2: 1;
1854 } dw2;
1855
1856 struct {
1857 unsigned int r3x_coefficient: 5;
1858 unsigned int pad0: 1;
1859 unsigned int r3c_coefficient: 5;
1860 unsigned int pad1: 3;
1861 unsigned int gain_factor: 6;
1862 unsigned int non_edge_weight: 3;
1863 unsigned int pad2: 1;
1864 unsigned int regular_weight: 3;
1865 unsigned int pad3: 1;
1866 unsigned int strong_edge_weight: 3;
1867 unsigned int ief4_smooth_enable: 1;
1868 } dw3;
1869 };
1870
1871 /* This can also be used for BDW+ */
1872 struct gen7_sampler_dndi {
1873 struct {
1874 unsigned int denoise_asd_threshold: 8;
1875 unsigned int dnmh_delt: 4;
1876 unsigned int vdi_walker_y_stride: 2;
1877 unsigned int vdi_walker_frame_sharing_enable: 1;
1878 unsigned int pad0: 1;
1879 unsigned int denoise_maximum_history: 8;
1880 unsigned int denoise_stad_threshold: 8;
1881 } dw0;
1882
1883 struct {
1884 unsigned int denoise_threshold_for_sum_of_complexity_measure: 8;
1885 unsigned int denoise_moving_pixel_threshold: 5;
1886 unsigned int stmm_c2: 3;
1887 unsigned int low_temporal_difference_threshold: 6;
1888 unsigned int pad0: 2;
1889 unsigned int temporal_difference_threshold: 6;
1890 unsigned int pad1: 2;
1891 } dw1;
1892
1893 struct {
1894 unsigned int block_noise_estimate_noise_threshold: 8;
1895 unsigned int bne_edge_th: 4;
1896 unsigned int pad0: 2;
1897 unsigned int smooth_mv_th: 2;
1898 unsigned int sad_tight_th: 4;
1899 unsigned int cat_slope_minus1: 4;
1900 unsigned int good_neighbor_th: 6;
1901 unsigned int pad1: 2;
1902 } dw2;
1903
1904 struct {
1905 unsigned int maximum_stmm: 8;
1906 unsigned int multipler_for_vecm: 6;
1907 unsigned int pad0: 2;
1908 unsigned int blending_constant_across_time_for_small_values_of_stmm: 8;
1909 unsigned int blending_constant_across_time_for_large_values_of_stmm: 7;
1910 unsigned int stmm_blending_constant_select: 1;
1911 } dw3;
1912
1913 struct {
1914 unsigned int sdi_delta: 8;
1915 unsigned int sdi_threshold: 8;
1916 unsigned int stmm_output_shift: 4;
1917 unsigned int stmm_shift_up: 2;
1918 unsigned int stmm_shift_down: 2;
1919 unsigned int minimum_stmm: 8;
1920 } dw4;
1921
1922 struct {
1923 unsigned int fmd_temporal_difference_threshold: 8;
1924 unsigned int sdi_fallback_mode_2_constant: 8;
1925 unsigned int sdi_fallback_mode_1_t2_constant: 8;
1926 unsigned int sdi_fallback_mode_1_t1_constant: 8;
1927 } dw5;
1928
1929 struct {
1930 unsigned int dn_enable: 1;
1931 unsigned int di_enable: 1;
1932 unsigned int di_partial: 1;
1933 unsigned int dndi_top_first: 1;
1934 unsigned int dndi_stream_id: 1;
1935 unsigned int dndi_first_frame: 1;
1936 unsigned int progressive_dn: 1;
1937 unsigned int mcdi_enable: 1;
1938 unsigned int fmd_tear_threshold: 6;
1939 unsigned int cat_th1: 2;
1940 unsigned int fmd2_vertical_difference_threshold: 8;
1941 unsigned int fmd1_vertical_difference_threshold: 8;
1942 } dw6;
1943
1944 struct {
1945 unsigned int sad_tha: 4;
1946 unsigned int sad_thb: 4;
1947 unsigned int fmd_for_1st_field_of_current_frame: 2;
1948 unsigned int mc_pixel_consistency_th: 6;
1949 unsigned int fmd_for_2nd_field_of_previous_frame: 2;
1950 unsigned int vdi_walker_enable: 1;
1951 unsigned int neighborpixel_th: 4;
1952 unsigned int column_width_minus1: 9;
1953 } dw7;
1954 };
1955
1956 struct gen8_sampler_8x8_avs_coefficients {
1957 struct {
1958 unsigned int table_0x_filter_c0: 8;
1959 unsigned int table_0y_filter_c0: 8;
1960 unsigned int table_0x_filter_c1: 8;
1961 unsigned int table_0y_filter_c1: 8;
1962 } dw0;
1963
1964 struct {
1965 unsigned int table_0x_filter_c2: 8;
1966 unsigned int table_0y_filter_c2: 8;
1967 unsigned int table_0x_filter_c3: 8;
1968 unsigned int table_0y_filter_c3: 8;
1969 } dw1;
1970
1971 struct {
1972 unsigned int table_0x_filter_c4: 8;
1973 unsigned int table_0y_filter_c4: 8;
1974 unsigned int table_0x_filter_c5: 8;
1975 unsigned int table_0y_filter_c5: 8;
1976 } dw2;
1977
1978 struct {
1979 unsigned int table_0x_filter_c6: 8;
1980 unsigned int table_0y_filter_c6: 8;
1981 unsigned int table_0x_filter_c7: 8;
1982 unsigned int table_0y_filter_c7: 8;
1983 } dw3;
1984
1985 struct {
1986 unsigned int pad0: 16;
1987 unsigned int table_1x_filter_c2: 8;
1988 unsigned int table_1x_filter_c3: 8;
1989 } dw4;
1990
1991 struct {
1992 unsigned int table_1x_filter_c4: 8;
1993 unsigned int table_1x_filter_c5: 8;
1994 unsigned int pad0: 16;
1995 } dw5;
1996
1997 struct {
1998 unsigned int pad0: 16;
1999 unsigned int table_1y_filter_c2: 8;
2000 unsigned int table_1y_filter_c3: 8;
2001 } dw6;
2002
2003 struct {
2004 unsigned int table_1y_filter_c4: 8;
2005 unsigned int table_1y_filter_c5: 8;
2006 unsigned int pad0: 16;
2007 } dw7;
2008 };
2009
2010 struct gen8_sampler_8x8_avs {
2011 struct {
2012 unsigned int gain_factor: 6;
2013 unsigned int weak_edge_threshold: 6;
2014 unsigned int strong_edge_threshold: 6;
2015 unsigned int r3x_coefficient: 5;
2016 unsigned int r3c_coefficient: 5;
2017 unsigned int chroma_key_index: 2;
2018 unsigned int chroma_key_enable: 1;
2019 unsigned int pad1: 1;
2020 } dw0;
2021
2022 struct {
2023 unsigned int pad0;
2024 } dw1;
2025
2026 struct {
2027 unsigned int global_noise_estimation: 8;
2028 unsigned int non_edge_weight: 3;
2029 unsigned int regular_weight: 3;
2030 unsigned int strong_edge_weight: 3;
2031 unsigned int r5x_coefficient: 5;
2032 unsigned int r5cx_coefficient: 5;
2033 unsigned int r5c_coefficient: 5;
2034 } dw2;
2035
2036 struct {
2037 unsigned int sin_alpha: 8; /* S0.7 */
2038 unsigned int cos_alpha: 8; /* S0.7 */
2039 unsigned int sat_max: 6;
2040 unsigned int hue_max: 6;
2041 unsigned int enable_8tap_filter: 2;
2042 unsigned int ief4_smooth_enable: 1;
2043 unsigned int skin_ief_enable: 1;
2044 } dw3;
2045
2046 struct {
2047 unsigned int s3u: 11; /* S2.8 */
2048 unsigned int pad0: 1;
2049 unsigned int diamond_margin: 3;
2050 unsigned int vy_std_enable: 1;
2051 unsigned int umid: 8;
2052 unsigned int vmid: 8;
2053 } dw4;
2054
2055 struct {
2056 unsigned int diamond_dv: 7;
2057 unsigned int diamond_th: 6;
2058 unsigned int diamond_alpha: 8;
2059 unsigned int hs_margin: 3;
2060 unsigned int diamond_du: 7;
2061 unsigned int skin_detailfilter: 1;
2062 } dw5;
2063
2064 struct {
2065 unsigned int y_point1: 8;
2066 unsigned int y_point2: 8;
2067 unsigned int y_point3: 8;
2068 unsigned int y_point4: 8;
2069 } dw6;
2070
2071 struct {
2072 unsigned int inv_margin_vyl: 16;
2073 unsigned int pad0: 16;
2074 } dw7;
2075
2076 struct {
2077 unsigned int inv_margin_vyu: 16;
2078 unsigned int p0l: 8;
2079 unsigned int p1l: 8;
2080 } dw8;
2081
2082 struct {
2083 unsigned int p2l: 8;
2084 unsigned int p3l: 8;
2085 unsigned int b0l: 8;
2086 unsigned int b1l: 8;
2087 } dw9;
2088
2089 struct {
2090 unsigned int b2l: 8;
2091 unsigned int b3l: 8;
2092 unsigned int s0l: 11;
2093 unsigned int y_slope2: 5;
2094 } dw10;
2095
2096 struct {
2097 unsigned int s1l: 11;
2098 unsigned int s2l: 11;
2099 unsigned int pad0: 10;
2100 } dw11;
2101
2102 struct {
2103 unsigned int s3l: 11;
2104 unsigned int p0u: 8;
2105 unsigned int p1u: 8;
2106 unsigned int y_slope1: 5;
2107 } dw12;
2108
2109 struct {
2110 unsigned int p2u: 8;
2111 unsigned int p3u: 8;
2112 unsigned int b0u: 8;
2113 unsigned int b1u: 8;
2114 } dw13;
2115
2116 struct {
2117 unsigned int b2u: 8;
2118 unsigned int b3u: 8;
2119 unsigned int s0u: 11;
2120 unsigned int pad0: 5;
2121 } dw14;
2122
2123 struct {
2124 unsigned int s1u: 11;
2125 unsigned int s2u: 11;
2126 unsigned int pad0: 10;
2127 } dw15;
2128
2129 /* DW16-DW151 */
2130 struct gen8_sampler_8x8_avs_coefficients coefficients[17];
2131
2132 struct {
2133 unsigned int transition_area_with_8_pixels: 3;
2134 unsigned int pad0: 1;
2135 unsigned int transition_area_with_4_pixels: 3;
2136 unsigned int pad1: 1;
2137 unsigned int max_derivative_8_pixels: 8;
2138 unsigned int max_derivative_4_pixels: 8;
2139 unsigned int default_sharpness_level: 8;
2140 } dw152;
2141
2142 struct {
2143 unsigned int rgb_adaptive: 1;
2144 unsigned int adaptive_filter_for_all_channel: 1;
2145 unsigned int pad0: 19;
2146 unsigned int bypass_y_adaptive_filtering: 1;
2147 unsigned int bypass_x_adaptive_filtering: 1;
2148 unsigned int pad1: 9;
2149 } dw153;
2150
2151 unsigned int reserved[6];
2152
2153 /* DW160-DW279 */
2154 struct gen8_sampler_8x8_avs_coefficients coefficients1[15];
2155 };
2156
2157 struct gen9_sampler_8x8_avs {
2158 struct {
2159 unsigned int gain_factor: 6;
2160 unsigned int weak_edge_threshold: 6;
2161 unsigned int strong_edge_threshold: 6;
2162 unsigned int r3x_coefficient: 5;
2163 unsigned int r3c_coefficient: 5;
2164 unsigned int pad1: 4;
2165 } dw0;
2166
2167 struct {
2168 unsigned int pad0;
2169 } dw1;
2170
2171 struct {
2172 unsigned int global_noise_estimation: 8;
2173 unsigned int non_edge_weight: 3;
2174 unsigned int regular_weight: 3;
2175 unsigned int strong_edge_weight: 3;
2176 unsigned int r5x_coefficient: 5;
2177 unsigned int r5cx_coefficient: 5;
2178 unsigned int r5c_coefficient: 5;
2179 } dw2;
2180
2181 struct {
2182 unsigned int sin_alpha: 8; /* S0.7 */
2183 unsigned int cos_alpha: 8; /* S0.7 */
2184 unsigned int sat_max: 6;
2185 unsigned int hue_max: 6;
2186 unsigned int enable_8tap_adaptive_filter: 2;
2187 unsigned int ief4_smooth_enable: 1;
2188 unsigned int skin_ief_enable: 1;
2189 } dw3;
2190
2191 struct {
2192 unsigned int s3u: 11; /* S2.8 */
2193 unsigned int shuffle_output_write_back: 1;
2194 unsigned int diamond_margin: 3;
2195 unsigned int vy_std_enable: 1;
2196 unsigned int umid: 8;
2197 unsigned int vmid: 8;
2198 } dw4;
2199
2200 struct {
2201 unsigned int diamond_dv: 7;
2202 unsigned int diamond_th: 6;
2203 unsigned int diamond_alpha: 8;
2204 unsigned int hs_margin: 3;
2205 unsigned int diamond_du: 7;
2206 unsigned int skin_detailfilter: 1;
2207 } dw5;
2208
2209 struct {
2210 unsigned int y_point1: 8;
2211 unsigned int y_point2: 8;
2212 unsigned int y_point3: 8;
2213 unsigned int y_point4: 8;
2214 } dw6;
2215
2216 struct {
2217 unsigned int inv_margin_vyl: 16;
2218 unsigned int pad0: 16;
2219 } dw7;
2220
2221 struct {
2222 unsigned int inv_margin_vyu: 16;
2223 unsigned int p0l: 8;
2224 unsigned int p1l: 8;
2225 } dw8;
2226
2227 struct {
2228 unsigned int p2l: 8;
2229 unsigned int p3l: 8;
2230 unsigned int b0l: 8;
2231 unsigned int b1l: 8;
2232 } dw9;
2233
2234 struct {
2235 unsigned int b2l: 8;
2236 unsigned int b3l: 8;
2237 unsigned int s0l: 11;
2238 unsigned int y_slope2: 5;
2239 } dw10;
2240
2241 struct {
2242 unsigned int s1l: 11;
2243 unsigned int s2l: 11;
2244 unsigned int pad0: 10;
2245 } dw11;
2246
2247 struct {
2248 unsigned int s3l: 11;
2249 unsigned int p0u: 8;
2250 unsigned int p1u: 8;
2251 unsigned int y_slope1: 5;
2252 } dw12;
2253
2254 struct {
2255 unsigned int p2u: 8;
2256 unsigned int p3u: 8;
2257 unsigned int b0u: 8;
2258 unsigned int b1u: 8;
2259 } dw13;
2260
2261 struct {
2262 unsigned int b2u: 8;
2263 unsigned int b3u: 8;
2264 unsigned int s0u: 11;
2265 unsigned int pad0: 5;
2266 } dw14;
2267
2268 struct {
2269 unsigned int s1u: 11;
2270 unsigned int s2u: 11;
2271 unsigned int pad0: 10;
2272 } dw15;
2273
2274 /* DW16-DW151 for 17 coeff tabls */
2275 struct gen8_sampler_8x8_avs_coefficients coefficients[17];
2276
2277 struct {
2278 unsigned int transition_area_with_8_pixels: 3;
2279 unsigned int pad0: 1;
2280 unsigned int transition_area_with_4_pixels: 3;
2281 unsigned int pad1: 1;
2282 unsigned int max_derivative_8_pixels: 8;
2283 unsigned int max_derivative_4_pixels: 8;
2284 unsigned int default_sharpness_level: 8;
2285 } dw152;
2286
2287 struct {
2288 unsigned int rgb_adaptive: 1;
2289 unsigned int adaptive_filter_for_all_channel: 1;
2290 unsigned int pad0: 19;
2291 unsigned int bypass_y_adaptive_filtering: 1;
2292 unsigned int bypass_x_adaptive_filtering: 1;
2293 unsigned int pad1: 9;
2294 } dw153;
2295
2296 unsigned int reserved1[6];
2297
2298 /* 160-279 for 17..31 avs_coeff */
2299 struct gen8_sampler_8x8_avs_coefficients extra_coefficients[15];
2300
2301 // 280 - 511 (padding to align it to 512 dwords)
2302 unsigned int reserved2[232];
2303 };
2304
2305 #define SURFACE_STATE_PADDED_SIZE_0_GEN7 ALIGN(sizeof(struct gen7_surface_state), 32)
2306 #define SURFACE_STATE_PADDED_SIZE_1_GEN7 ALIGN(sizeof(struct gen7_surface_state2), 32)
2307 #define SURFACE_STATE_PADDED_SIZE_GEN7 MAX(SURFACE_STATE_PADDED_SIZE_0_GEN7, SURFACE_STATE_PADDED_SIZE_1_GEN7)
2308
2309 #define SURFACE_STATE_PADDED_SIZE_0_GEN6 ALIGN(sizeof(struct i965_surface_state), 32)
2310 #define SURFACE_STATE_PADDED_SIZE_1_GEN6 ALIGN(sizeof(struct i965_surface_state2), 32)
2311 #define SURFACE_STATE_PADDED_SIZE_GEN6 MAX(SURFACE_STATE_PADDED_SIZE_0_GEN6, SURFACE_STATE_PADDED_SIZE_1_GEN6)
2312
2313 #define SURFACE_STATE_PADDED_SIZE_0_GEN8 ALIGN(sizeof(struct gen8_surface_state), 32)
2314 #define SURFACE_STATE_PADDED_SIZE_1_GEN8 ALIGN(sizeof(struct gen8_surface_state2), 32)
2315 #define SURFACE_STATE_PADDED_SIZE_GEN8 MAX(SURFACE_STATE_PADDED_SIZE_0_GEN8, SURFACE_STATE_PADDED_SIZE_1_GEN8)
2316
2317 #define SURFACE_STATE_PADDED_SIZE_0_GEN9 ALIGN(sizeof(struct gen9_surface_state), 32)
2318 #define SURFACE_STATE_PADDED_SIZE_1_GEN9 ALIGN(sizeof(struct gen9_surface_state2), 32)
2319 #define SURFACE_STATE_PADDED_SIZE_GEN9 MAX(SURFACE_STATE_PADDED_SIZE_0_GEN9, SURFACE_STATE_PADDED_SIZE_1_GEN9)
2320
2321 #endif /* _I965_STRUCTS_H_ */