Go to the source code of this file.
#define FILE_DEBUG_FLAG DEBUG_STATE |
Definition at line 37 of file i915_state_dynamic.c.
void i915_update_dynamic | ( | struct i915_context * | i915 | ) |
Definition at line 302 of file i915_state_dynamic.c.
References i915_tracked_state::dirty, i915_context::dirty, Elements, and i915_tracked_state::update.
00303 { 00304 int i; 00305 00306 for (i = 0; i < Elements(atoms); i++) 00307 if (i915->dirty & atoms[i]->dirty) 00308 atoms[i]->update( i915 ); 00309 }
static void set_dynamic_indirect | ( | struct i915_context * | i915, | |
unsigned | offset, | |||
const unsigned * | src, | |||
unsigned | dwords | |||
) | [static] |
Definition at line 50 of file i915_state_dynamic.c.
References i915_context::current, i915_state::dynamic, i915_context::hardware_dirty, and I915_HW_DYNAMIC.
00054 { 00055 unsigned i; 00056 00057 for (i = 0; i < dwords; i++) 00058 i915->current.dynamic[offset + i] = src[i]; 00059 00060 i915->hardware_dirty |= I915_HW_DYNAMIC; 00061 }
static void upload_BFO | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 95 of file i915_state_dynamic.c.
References i915_depth_stencil_state::bfo, i915_context::depth_stencil, I915_DYNAMIC_BFO_0, and set_dynamic_indirect().
00096 { 00097 set_dynamic_indirect( i915, 00098 I915_DYNAMIC_BFO_0, 00099 &(i915->depth_stencil->bfo[0]), 00100 2 ); 00101 }
static void upload_BLENDCOLOR | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 113 of file i915_state_dynamic.c.
References _3DSTATE_CONST_BLEND_COLOR_CMD, i915_context::blend_color, pipe_blend_color::color, I915_DYNAMIC_BC_0, pack_ui32_float4(), and set_dynamic_indirect().
00114 { 00115 unsigned bc[2]; 00116 00117 memset( bc, 0, sizeof(bc) ); 00118 00119 /* I915_NEW_BLEND {_COLOR} 00120 */ 00121 { 00122 const float *color = i915->blend_color.color; 00123 00124 bc[0] = _3DSTATE_CONST_BLEND_COLOR_CMD; 00125 bc[1] = pack_ui32_float4( color[0], 00126 color[1], 00127 color[2], 00128 color[3] ); 00129 } 00130 00131 set_dynamic_indirect( i915, 00132 I915_DYNAMIC_BC_0, 00133 bc, 00134 2 ); 00135 }
static void upload_DEPTHSCALE | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 168 of file i915_state_dynamic.c.
References i915_rasterizer_state::ds, I915_DYNAMIC_DEPTHSCALE_0, i915_context::rasterizer, set_dynamic_indirect(), and i915_rasterizer_state::u.
00169 { 00170 set_dynamic_indirect( i915, 00171 I915_DYNAMIC_DEPTHSCALE_0, 00172 &(i915->rasterizer->ds[0].u), 00173 2 ); 00174 }
static void upload_IAB | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 146 of file i915_state_dynamic.c.
References i915_context::blend, I915_DYNAMIC_IAB, i915_blend_state::iab, and set_dynamic_indirect().
00147 { 00148 unsigned iab = i915->blend->iab; 00149 00150 00151 set_dynamic_indirect( i915, 00152 I915_DYNAMIC_IAB, 00153 &iab, 00154 1 ); 00155 }
static void upload_MODES4 | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 67 of file i915_state_dynamic.c.
References i915_context::blend, i915_context::depth_stencil, I915_DYNAMIC_MODES4, i915_blend_state::modes4, set_dynamic_indirect(), and i915_depth_stencil_state::stencil_modes4.
00068 { 00069 unsigned modes4 = 0; 00070 00071 /* I915_NEW_STENCIL */ 00072 modes4 |= i915->depth_stencil->stencil_modes4; 00073 /* I915_NEW_BLEND */ 00074 modes4 |= i915->blend->modes4; 00075 00076 /* Always, so that we know when state is in-active: 00077 */ 00078 set_dynamic_indirect( i915, 00079 I915_DYNAMIC_MODES4, 00080 &modes4, 00081 1 ); 00082 }
static void upload_SCISSOR_ENABLE | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 244 of file i915_state_dynamic.c.
References I915_DYNAMIC_SC_ENA_0, i915_context::rasterizer, i915_rasterizer_state::sc, and set_dynamic_indirect().
00245 { 00246 set_dynamic_indirect( i915, 00247 I915_DYNAMIC_SC_ENA_0, 00248 &(i915->rasterizer->sc[0]), 00249 1 ); 00250 }
static void upload_SCISSOR_RECT | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 259 of file i915_state_dynamic.c.
References _3DSTATE_SCISSOR_RECT_0_CMD, I915_DYNAMIC_SC_RECT_0, pipe_scissor_state::maxx, pipe_scissor_state::maxy, pipe_scissor_state::minx, pipe_scissor_state::miny, i915_context::scissor, and set_dynamic_indirect().
00260 { 00261 unsigned x1 = i915->scissor.minx; 00262 unsigned y1 = i915->scissor.miny; 00263 unsigned x2 = i915->scissor.maxx; 00264 unsigned y2 = i915->scissor.maxy; 00265 unsigned sc[3]; 00266 00267 sc[0] = _3DSTATE_SCISSOR_RECT_0_CMD; 00268 sc[1] = (y1 << 16) | (x1 & 0xffff); 00269 sc[2] = (y2 << 16) | (x2 & 0xffff); 00270 00271 set_dynamic_indirect( i915, 00272 I915_DYNAMIC_SC_RECT_0, 00273 &sc[0], 00274 3 ); 00275 }
static void upload_STIPPLE | ( | struct i915_context * | i915 | ) | [static] |
Definition at line 195 of file i915_state_dynamic.c.
References _3DSTATE_STIPPLE, I915_DYNAMIC_STP_0, i915_context::poly_stipple, i915_context::rasterizer, set_dynamic_indirect(), i915_rasterizer_state::st, and pipe_poly_stipple::stipple.
00196 { 00197 unsigned st[2]; 00198 00199 st[0] = _3DSTATE_STIPPLE; 00200 st[1] = 0; 00201 00202 /* I915_NEW_RASTERIZER 00203 */ 00204 st[1] |= i915->rasterizer->st; 00205 00206 00207 /* I915_NEW_STIPPLE 00208 */ 00209 { 00210 const ubyte *mask = (const ubyte *)i915->poly_stipple.stipple; 00211 ubyte p[4]; 00212 00213 p[0] = mask[12] & 0xf; 00214 p[1] = mask[8] & 0xf; 00215 p[2] = mask[4] & 0xf; 00216 p[3] = mask[0] & 0xf; 00217 00218 /* Not sure what to do about fallbacks, so for now just dont: 00219 */ 00220 st[1] |= ((p[0] << 0) | 00221 (p[1] << 4) | 00222 (p[2] << 8) | 00223 (p[3] << 12)); 00224 } 00225 00226 00227 set_dynamic_indirect( i915, 00228 I915_DYNAMIC_STP_0, 00229 &st[0], 00230 2 ); 00231 }
struct i915_tracked_state* atoms[] [static] |
Initial value:
{ &i915_upload_MODES4, &i915_upload_BFO, &i915_upload_BLENDCOLOR, &i915_upload_IAB, &i915_upload_DEPTHSCALE, &i915_upload_STIPPLE, &i915_upload_SCISSOR_ENABLE, &i915_upload_SCISSOR_RECT }
Definition at line 288 of file i915_state_dynamic.c.