Go to the source code of this file.
Functions | |
static void | upload_vs_unit (struct brw_context *brw) |
Variables | |
struct brw_tracked_state | brw_vs_unit |
static void upload_vs_unit | ( | struct brw_context * | brw | ) | [static] |
Definition at line 40 of file brw_vs_state.c.
References align(), brw_cache_data(), BRW_DEBUG, BRW_FLOATING_POINT_NON_IEEE_754, BRW_VS_UNIT, brw_context::cache, brw_context::clip_start, thread3::const_urb_entry_read_length, thread3::const_urb_entry_read_offset, brw_vs_prog_data::curb_read_length, brw_context::curbe, DEBUG_SINGLE_THREAD, DEBUG_STATS, thread3::dispatch_grf_start_reg, thread1::floating_point_mode, thread0::grf_reg_count, thread0::kernel_start_pointer, MAX2, brw_vs_unit_state::max_threads, MIN2, brw_vs_unit_state::nr_urb_entries, brw_context::nr_vs_entries, brw_context::prog_data, brw_context::prog_gs_offset, brw_vs_unit_state::sampler_count, brw_context::state_gs_offset, brw_vs_unit_state::stats_enable, brw_vs_unit_state::thread0, brw_vs_unit_state::thread1, brw_vs_unit_state::thread3, brw_vs_unit_state::thread4, brw_vs_prog_data::total_grf, brw_context::urb, brw_vs_unit_state::urb_entry_allocation_size, thread3::urb_entry_read_length, thread3::urb_entry_read_offset, brw_vs_prog_data::urb_read_length, brw_context::vs, brw_vs_unit_state::vs5, brw_vs_unit_state::vs6, brw_vs_unit_state::vs_enable, brw_context::vs_start, and brw_context::vsize.
00041 { 00042 struct brw_vs_unit_state vs; 00043 00044 memset(&vs, 0, sizeof(vs)); 00045 00046 /* CACHE_NEW_VS_PROG */ 00047 vs.thread0.kernel_start_pointer = brw->vs.prog_gs_offset >> 6; 00048 vs.thread0.grf_reg_count = align(brw->vs.prog_data->total_grf, 16) / 16 - 1; 00049 vs.thread3.urb_entry_read_length = brw->vs.prog_data->urb_read_length; 00050 vs.thread3.const_urb_entry_read_length = brw->vs.prog_data->curb_read_length; 00051 vs.thread3.dispatch_grf_start_reg = 1; 00052 00053 00054 /* BRW_NEW_URB_FENCE */ 00055 vs.thread4.nr_urb_entries = brw->urb.nr_vs_entries; 00056 vs.thread4.urb_entry_allocation_size = brw->urb.vsize - 1; 00057 vs.thread4.max_threads = MIN2( 00058 MAX2(0, (brw->urb.nr_vs_entries - 6) / 2 - 1), 00059 15); 00060 00061 00062 00063 if (BRW_DEBUG & DEBUG_SINGLE_THREAD) 00064 vs.thread4.max_threads = 0; 00065 00066 /* BRW_NEW_CURBE_OFFSETS, _NEW_TRANSFORM */ 00067 if (0 /*brw->attribs.Clip->ClipPlanesEnabled*/) { 00068 /* Note that we read in the userclip planes as well, hence 00069 * clip_start: 00070 */ 00071 vs.thread3.const_urb_entry_read_offset = brw->curbe.clip_start * 2; 00072 } 00073 else { 00074 vs.thread3.const_urb_entry_read_offset = brw->curbe.vs_start * 2; 00075 } 00076 00077 vs.thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754; 00078 vs.thread3.urb_entry_read_offset = 0; 00079 00080 /* No samplers for ARB_vp programs: 00081 */ 00082 vs.vs5.sampler_count = 0; 00083 00084 if (BRW_DEBUG & DEBUG_STATS) 00085 vs.thread4.stats_enable = 1; 00086 00087 /* Vertex program always enabled: 00088 */ 00089 vs.vs6.vs_enable = 1; 00090 00091 brw->vs.state_gs_offset = brw_cache_data( &brw->cache[BRW_VS_UNIT], &vs ); 00092 }
struct brw_tracked_state brw_vs_unit |
Initial value:
{ .dirty = { .brw = ( 0x10 | 0x40000 | 0x10000 ), .cache = (1<<BRW_VS_PROG) }, .update = upload_vs_unit }
Definition at line 95 of file brw_vs_state.c.