Lines Matching refs:i

207     unsigned int i;  in stateblock_savedstates_set_all()  local
224 for (i = 0; i < MAX_TEXTURES; ++i) states->textureState[i] = 0x3ffff; in stateblock_savedstates_set_all()
225 for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3ffe; in stateblock_savedstates_set_all()
241 unsigned int i; in stateblock_savedstates_set_pixel() local
245 for (i = 0; i < ARRAY_SIZE(pixel_states_render); ++i) in stateblock_savedstates_set_pixel()
247 DWORD rs = pixel_states_render[i]; in stateblock_savedstates_set_pixel()
251 for (i = 0; i < ARRAY_SIZE(pixel_states_texture); ++i) in stateblock_savedstates_set_pixel()
252 texture_mask |= 1u << pixel_states_texture[i]; in stateblock_savedstates_set_pixel()
253 for (i = 0; i < MAX_TEXTURES; ++i) states->textureState[i] = texture_mask; in stateblock_savedstates_set_pixel()
254 for (i = 0; i < ARRAY_SIZE(pixel_states_sampler); ++i) in stateblock_savedstates_set_pixel()
255 sampler_mask |= 1u << pixel_states_sampler[i]; in stateblock_savedstates_set_pixel()
256 for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = sampler_mask; in stateblock_savedstates_set_pixel()
267 unsigned int i; in stateblock_savedstates_set_vertex() local
272 for (i = 0; i < ARRAY_SIZE(vertex_states_render); ++i) in stateblock_savedstates_set_vertex()
274 DWORD rs = vertex_states_render[i]; in stateblock_savedstates_set_vertex()
278 for (i = 0; i < ARRAY_SIZE(vertex_states_texture); ++i) in stateblock_savedstates_set_vertex()
279 texture_mask |= 1u << vertex_states_texture[i]; in stateblock_savedstates_set_vertex()
280 for (i = 0; i < MAX_TEXTURES; ++i) states->textureState[i] = texture_mask; in stateblock_savedstates_set_vertex()
281 for (i = 0; i < ARRAY_SIZE(vertex_states_sampler); ++i) in stateblock_savedstates_set_vertex()
282 sampler_mask |= 1u << vertex_states_sampler[i]; in stateblock_savedstates_set_vertex()
283 for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = sampler_mask; in stateblock_savedstates_set_vertex()
293 unsigned int i, j; in stateblock_init_contained_states() local
295 for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i) in stateblock_init_contained_states()
297 DWORD map = stateblock->changed.renderState[i]; in stateblock_init_contained_states()
302 … stateblock->contained_render_states[stateblock->num_contained_render_states] = (i << 5) | j; in stateblock_init_contained_states()
307 for (i = 0; i <= HIGHEST_TRANSFORMSTATE >> 5; ++i) in stateblock_init_contained_states()
309 DWORD map = stateblock->changed.transform[i]; in stateblock_init_contained_states()
314 … stateblock->contained_transform_states[stateblock->num_contained_transform_states] = (i << 5) | j; in stateblock_init_contained_states()
319 for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) in stateblock_init_contained_states()
321 if (stateblock->changed.vs_consts_f[i]) in stateblock_init_contained_states()
323 stateblock->contained_vs_consts_f[stateblock->num_contained_vs_consts_f] = i; in stateblock_init_contained_states()
328 for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) in stateblock_init_contained_states()
330 if (stateblock->changed.vertexShaderConstantsI & (1u << i)) in stateblock_init_contained_states()
332 stateblock->contained_vs_consts_i[stateblock->num_contained_vs_consts_i] = i; in stateblock_init_contained_states()
337 for (i = 0; i < WINED3D_MAX_CONSTS_B; ++i) in stateblock_init_contained_states()
339 if (stateblock->changed.vertexShaderConstantsB & (1u << i)) in stateblock_init_contained_states()
341 stateblock->contained_vs_consts_b[stateblock->num_contained_vs_consts_b] = i; in stateblock_init_contained_states()
346 for (i = 0; i < d3d_info->limits.ps_uniform_count; ++i) in stateblock_init_contained_states()
348 if (stateblock->changed.ps_consts_f[i]) in stateblock_init_contained_states()
350 stateblock->contained_ps_consts_f[stateblock->num_contained_ps_consts_f] = i; in stateblock_init_contained_states()
355 for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) in stateblock_init_contained_states()
357 if (stateblock->changed.pixelShaderConstantsI & (1u << i)) in stateblock_init_contained_states()
359 stateblock->contained_ps_consts_i[stateblock->num_contained_ps_consts_i] = i; in stateblock_init_contained_states()
364 for (i = 0; i < WINED3D_MAX_CONSTS_B; ++i) in stateblock_init_contained_states()
366 if (stateblock->changed.pixelShaderConstantsB & (1u << i)) in stateblock_init_contained_states()
368 stateblock->contained_ps_consts_b[stateblock->num_contained_ps_consts_b] = i; in stateblock_init_contained_states()
373 for (i = 0; i < MAX_TEXTURES; ++i) in stateblock_init_contained_states()
375 DWORD map = stateblock->changed.textureState[i]; in stateblock_init_contained_states()
381 stateblock->contained_tss_states[stateblock->num_contained_tss_states].stage = i; in stateblock_init_contained_states()
387 for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) in stateblock_init_contained_states()
389 DWORD map = stateblock->changed.samplerState[i]; in stateblock_init_contained_states()
395 … stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].stage = i; in stateblock_init_contained_states()
404 unsigned int i; in stateblock_init_lights() local
406 for (i = 0; i < LIGHTMAP_SIZE; ++i) in stateblock_init_lights()
410 LIST_FOR_EACH_ENTRY(src_light, &light_map[i], struct wined3d_light_info, entry) in stateblock_init_lights()
415 list_add_tail(&stateblock->state.light_map[i], &dst_light->entry); in stateblock_init_lights()
438 unsigned int i, j; in state_unbind_resources() local
446 for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) in state_unbind_resources()
448 if ((texture = state->textures[i])) in state_unbind_resources()
450 state->textures[i] = NULL; in state_unbind_resources()
455 for (i = 0; i < WINED3D_MAX_STREAM_OUTPUT_BUFFERS; ++i) in state_unbind_resources()
457 if ((buffer = state->stream_output[i].buffer)) in state_unbind_resources()
459 state->stream_output[i].buffer = NULL; in state_unbind_resources()
464 for (i = 0; i < MAX_STREAMS; ++i) in state_unbind_resources()
466 if ((buffer = state->streams[i].buffer)) in state_unbind_resources()
468 state->streams[i].buffer = NULL; in state_unbind_resources()
479 for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) in state_unbind_resources()
481 if ((shader = state->shader[i])) in state_unbind_resources()
483 state->shader[i] = NULL; in state_unbind_resources()
489 if ((buffer = state->cb[i][j])) in state_unbind_resources()
491 state->cb[i][j] = NULL; in state_unbind_resources()
498 if ((sampler = state->sampler[i][j])) in state_unbind_resources()
500 state->sampler[i][j] = NULL; in state_unbind_resources()
507 if ((srv = state->shader_resource_view[i][j])) in state_unbind_resources()
509 state->shader_resource_view[i][j] = NULL; in state_unbind_resources()
515 for (i = 0; i < WINED3D_PIPELINE_COUNT; ++i) in state_unbind_resources()
519 if ((uav = state->unordered_access_view[i][j])) in state_unbind_resources()
521 state->unordered_access_view[i][j] = NULL; in state_unbind_resources()
585 unsigned int light_count, i; in wined3d_state_enable_light() local
608 for (i = 0; i < light_count; ++i) in wined3d_state_enable_light()
610 if (state->lights[i]) in wined3d_state_enable_light()
613 state->lights[i] = light_info; in wined3d_state_enable_light()
614 light_info->glIndex = i; in wined3d_state_enable_light()
629 UINT i; in wined3d_state_record_lights() local
634 for (i = 0; i < LIGHTMAP_SIZE; ++i) in wined3d_state_record_lights()
637 LIST_FOR_EACH(e, &dst_state->light_map[i]) in wined3d_state_record_lights()
643 LIST_FOR_EACH(f, &src_state->light_map[i]) in wined3d_state_record_lights()
687 unsigned int i; in wined3d_stateblock_capture() local
709 for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i) in wined3d_stateblock_capture()
711 unsigned int idx = stateblock->contained_vs_consts_f[i]; in wined3d_stateblock_capture()
719 for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i) in wined3d_stateblock_capture()
721 unsigned int idx = stateblock->contained_vs_consts_i[i]; in wined3d_stateblock_capture()
729 for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i) in wined3d_stateblock_capture()
731 unsigned int idx = stateblock->contained_vs_consts_b[i]; in wined3d_stateblock_capture()
740 for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i) in wined3d_stateblock_capture()
742 unsigned int idx = stateblock->contained_ps_consts_f[i]; in wined3d_stateblock_capture()
750 for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i) in wined3d_stateblock_capture()
752 unsigned int idx = stateblock->contained_ps_consts_i[i]; in wined3d_stateblock_capture()
760 for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i) in wined3d_stateblock_capture()
762 unsigned int idx = stateblock->contained_ps_consts_b[i]; in wined3d_stateblock_capture()
770 for (i = 0; i < stateblock->num_contained_transform_states; ++i) in wined3d_stateblock_capture()
772 enum wined3d_transform_state transform = stateblock->contained_transform_states[i]; in wined3d_stateblock_capture()
835 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_capture()
839 if (stateblock->state.streams[i].stride != src_state->streams[i].stride in wined3d_stateblock_capture()
840 || stateblock->state.streams[i].buffer != src_state->streams[i].buffer) in wined3d_stateblock_capture()
843 i, src_state->streams[i].buffer, in wined3d_stateblock_capture()
844 src_state->streams[i].stride); in wined3d_stateblock_capture()
846 stateblock->state.streams[i].stride = src_state->streams[i].stride; in wined3d_stateblock_capture()
847 if (src_state->streams[i].buffer) in wined3d_stateblock_capture()
848 wined3d_buffer_incref(src_state->streams[i].buffer); in wined3d_stateblock_capture()
849 if (stateblock->state.streams[i].buffer) in wined3d_stateblock_capture()
850 wined3d_buffer_decref(stateblock->state.streams[i].buffer); in wined3d_stateblock_capture()
851 stateblock->state.streams[i].buffer = src_state->streams[i].buffer; in wined3d_stateblock_capture()
856 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_capture()
860 if (stateblock->state.streams[i].frequency != src_state->streams[i].frequency in wined3d_stateblock_capture()
861 || stateblock->state.streams[i].flags != src_state->streams[i].flags) in wined3d_stateblock_capture()
864 i, src_state->streams[i].frequency, src_state->streams[i].flags); in wined3d_stateblock_capture()
866 stateblock->state.streams[i].frequency = src_state->streams[i].frequency; in wined3d_stateblock_capture()
867 stateblock->state.streams[i].flags = src_state->streams[i].flags; in wined3d_stateblock_capture()
872 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_capture()
876 …if (memcmp(&stateblock->state.clip_planes[i], &src_state->clip_planes[i], sizeof(src_state->clip_p… in wined3d_stateblock_capture()
878 TRACE("Updating clipplane %u.\n", i); in wined3d_stateblock_capture()
879 stateblock->state.clip_planes[i] = src_state->clip_planes[i]; in wined3d_stateblock_capture()
884 for (i = 0; i < stateblock->num_contained_render_states; ++i) in wined3d_stateblock_capture()
886 enum wined3d_render_state rs = stateblock->contained_render_states[i]; in wined3d_stateblock_capture()
894 for (i = 0; i < stateblock->num_contained_tss_states; ++i) in wined3d_stateblock_capture()
896 DWORD stage = stateblock->contained_tss_states[i].stage; in wined3d_stateblock_capture()
897 DWORD state = stateblock->contained_tss_states[i].state; in wined3d_stateblock_capture()
907 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_capture()
912 i, src_state->textures[i], stateblock->state.textures[i]); in wined3d_stateblock_capture()
914 if (src_state->textures[i]) in wined3d_stateblock_capture()
915 wined3d_texture_incref(src_state->textures[i]); in wined3d_stateblock_capture()
916 if (stateblock->state.textures[i]) in wined3d_stateblock_capture()
917 wined3d_texture_decref(stateblock->state.textures[i]); in wined3d_stateblock_capture()
918 stateblock->state.textures[i] = src_state->textures[i]; in wined3d_stateblock_capture()
921 for (i = 0; i < stateblock->num_contained_sampler_states; ++i) in wined3d_stateblock_capture()
923 DWORD stage = stateblock->contained_sampler_states[i].stage; in wined3d_stateblock_capture()
924 DWORD state = stateblock->contained_sampler_states[i].state; in wined3d_stateblock_capture()
949 UINT i; in apply_lights() local
951 for (i = 0; i < LIGHTMAP_SIZE; ++i) in apply_lights()
955 LIST_FOR_EACH(e, &state->light_map[i]) in apply_lights()
968 unsigned int i; in wined3d_stateblock_apply() local
977 for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i) in wined3d_stateblock_apply()
979 wined3d_device_set_vs_consts_f(device, stateblock->contained_vs_consts_f[i], in wined3d_stateblock_apply()
980 1, &stateblock->state.vs_consts_f[stateblock->contained_vs_consts_f[i]]); in wined3d_stateblock_apply()
982 for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i) in wined3d_stateblock_apply()
984 wined3d_device_set_vs_consts_i(device, stateblock->contained_vs_consts_i[i], in wined3d_stateblock_apply()
985 1, &stateblock->state.vs_consts_i[stateblock->contained_vs_consts_i[i]]); in wined3d_stateblock_apply()
987 for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i) in wined3d_stateblock_apply()
989 wined3d_device_set_vs_consts_b(device, stateblock->contained_vs_consts_b[i], in wined3d_stateblock_apply()
990 1, &stateblock->state.vs_consts_b[stateblock->contained_vs_consts_b[i]]); in wined3d_stateblock_apply()
999 for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i) in wined3d_stateblock_apply()
1001 wined3d_device_set_ps_consts_f(device, stateblock->contained_ps_consts_f[i], in wined3d_stateblock_apply()
1002 1, &stateblock->state.ps_consts_f[stateblock->contained_ps_consts_f[i]]); in wined3d_stateblock_apply()
1004 for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i) in wined3d_stateblock_apply()
1006 wined3d_device_set_ps_consts_i(device, stateblock->contained_ps_consts_i[i], in wined3d_stateblock_apply()
1007 1, &stateblock->state.ps_consts_i[stateblock->contained_ps_consts_i[i]]); in wined3d_stateblock_apply()
1009 for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i) in wined3d_stateblock_apply()
1011 wined3d_device_set_ps_consts_b(device, stateblock->contained_ps_consts_b[i], in wined3d_stateblock_apply()
1012 1, &stateblock->state.ps_consts_b[stateblock->contained_ps_consts_b[i]]); in wined3d_stateblock_apply()
1016 for (i = 0; i < stateblock->num_contained_render_states; ++i) in wined3d_stateblock_apply()
1018 wined3d_device_set_render_state(device, stateblock->contained_render_states[i], in wined3d_stateblock_apply()
1019 stateblock->state.render_states[stateblock->contained_render_states[i]]); in wined3d_stateblock_apply()
1023 for (i = 0; i < stateblock->num_contained_tss_states; ++i) in wined3d_stateblock_apply()
1025 DWORD stage = stateblock->contained_tss_states[i].stage; in wined3d_stateblock_apply()
1026 DWORD state = stateblock->contained_tss_states[i].state; in wined3d_stateblock_apply()
1032 for (i = 0; i < stateblock->num_contained_sampler_states; ++i) in wined3d_stateblock_apply()
1034 DWORD stage = stateblock->contained_sampler_states[i].stage; in wined3d_stateblock_apply()
1035 DWORD state = stateblock->contained_sampler_states[i].state; in wined3d_stateblock_apply()
1043 for (i = 0; i < stateblock->num_contained_transform_states; ++i) in wined3d_stateblock_apply()
1045 wined3d_device_set_transform(device, stateblock->contained_transform_states[i], in wined3d_stateblock_apply()
1046 &stateblock->state.transforms[stateblock->contained_transform_states[i]]); in wined3d_stateblock_apply()
1069 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_apply()
1072 wined3d_device_set_stream_source(device, i, in wined3d_stateblock_apply()
1073 stateblock->state.streams[i].buffer, in wined3d_stateblock_apply()
1074 0, stateblock->state.streams[i].stride); in wined3d_stateblock_apply()
1078 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_apply()
1081 wined3d_device_set_stream_source_freq(device, i, in wined3d_stateblock_apply()
1082 stateblock->state.streams[i].frequency | stateblock->state.streams[i].flags); in wined3d_stateblock_apply()
1086 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_apply()
1092 … stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS; in wined3d_stateblock_apply()
1093 wined3d_device_set_texture(device, stage, stateblock->state.textures[i]); in wined3d_stateblock_apply()
1097 for (i = 0; map; map >>= 1, ++i) in wined3d_stateblock_apply()
1101 wined3d_device_set_clip_plane(device, i, &stateblock->state.clip_planes[i]); in wined3d_stateblock_apply()
1118 unsigned int i; in state_init_default() local
1130 for (i = 0; i < 256; ++i) in state_init_default()
1132 state->transforms[WINED3D_TS_WORLD_MATRIX(i)] = identity; in state_init_default()
1262 for (i = 0; i < MAX_RENDER_TARGETS; ++i) in state_init_default()
1263 state->render_states[WINED3D_RS_COLORWRITE(i)] = 0x0000000f; in state_init_default()
1266 for (i = 0; i < MAX_TEXTURES; ++i) in state_init_default()
1268 TRACE("Setting up default texture states for texture Stage %u.\n", i); in state_init_default()
1269 state->transforms[WINED3D_TS_TEXTURE0 + i] = identity; in state_init_default()
1270 … state->texture_states[i][WINED3D_TSS_COLOR_OP] = i ? WINED3D_TOP_DISABLE : WINED3D_TOP_MODULATE; in state_init_default()
1271 state->texture_states[i][WINED3D_TSS_COLOR_ARG1] = WINED3DTA_TEXTURE; in state_init_default()
1272 state->texture_states[i][WINED3D_TSS_COLOR_ARG2] = WINED3DTA_CURRENT; in state_init_default()
1273 …state->texture_states[i][WINED3D_TSS_ALPHA_OP] = i ? WINED3D_TOP_DISABLE : WINED3D_TOP_SELECT_ARG1; in state_init_default()
1274 state->texture_states[i][WINED3D_TSS_ALPHA_ARG1] = WINED3DTA_TEXTURE; in state_init_default()
1275 state->texture_states[i][WINED3D_TSS_ALPHA_ARG2] = WINED3DTA_CURRENT; in state_init_default()
1276 state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00] = 0; in state_init_default()
1277 state->texture_states[i][WINED3D_TSS_BUMPENV_MAT01] = 0; in state_init_default()
1278 state->texture_states[i][WINED3D_TSS_BUMPENV_MAT10] = 0; in state_init_default()
1279 state->texture_states[i][WINED3D_TSS_BUMPENV_MAT11] = 0; in state_init_default()
1280 state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX] = i; in state_init_default()
1281 state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE] = 0; in state_init_default()
1282 state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET] = 0; in state_init_default()
1283 state->texture_states[i][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS] = WINED3D_TTFF_DISABLE; in state_init_default()
1284 state->texture_states[i][WINED3D_TSS_COLOR_ARG0] = WINED3DTA_CURRENT; in state_init_default()
1285 state->texture_states[i][WINED3D_TSS_ALPHA_ARG0] = WINED3DTA_CURRENT; in state_init_default()
1286 state->texture_states[i][WINED3D_TSS_RESULT_ARG] = WINED3DTA_CURRENT; in state_init_default()
1289 for (i = 0 ; i < MAX_COMBINED_SAMPLERS; ++i) in state_init_default()
1291 TRACE("Setting up default samplers states for sampler %u.\n", i); in state_init_default()
1292 state->sampler_states[i][WINED3D_SAMP_ADDRESS_U] = WINED3D_TADDRESS_WRAP; in state_init_default()
1293 state->sampler_states[i][WINED3D_SAMP_ADDRESS_V] = WINED3D_TADDRESS_WRAP; in state_init_default()
1294 state->sampler_states[i][WINED3D_SAMP_ADDRESS_W] = WINED3D_TADDRESS_WRAP; in state_init_default()
1295 state->sampler_states[i][WINED3D_SAMP_BORDER_COLOR] = 0; in state_init_default()
1296 state->sampler_states[i][WINED3D_SAMP_MAG_FILTER] = WINED3D_TEXF_POINT; in state_init_default()
1297 state->sampler_states[i][WINED3D_SAMP_MIN_FILTER] = WINED3D_TEXF_POINT; in state_init_default()
1298 state->sampler_states[i][WINED3D_SAMP_MIP_FILTER] = WINED3D_TEXF_NONE; in state_init_default()
1299 state->sampler_states[i][WINED3D_SAMP_MIPMAP_LOD_BIAS] = 0; in state_init_default()
1300 state->sampler_states[i][WINED3D_SAMP_MAX_MIP_LEVEL] = 0; in state_init_default()
1301 state->sampler_states[i][WINED3D_SAMP_MAX_ANISOTROPY] = 1; in state_init_default()
1302 state->sampler_states[i][WINED3D_SAMP_SRGB_TEXTURE] = 0; in state_init_default()
1304 state->sampler_states[i][WINED3D_SAMP_ELEMENT_INDEX] = 0; in state_init_default()
1306 state->sampler_states[i][WINED3D_SAMP_DMAP_OFFSET] = 0; in state_init_default()
1314 unsigned int i; in state_init() local
1319 for (i = 0; i < LIGHTMAP_SIZE; i++) in state_init()
1321 list_init(&state->light_map[i]); in state_init()