Lines Matching refs:i915
180 struct i915_context *i915 = i915_context(pipe); in i915_bind_blend_state() local
182 if (i915->blend == blend) in i915_bind_blend_state()
185 i915->blend = (struct i915_blend_state*)blend; in i915_bind_blend_state()
187 i915->dirty |= I915_NEW_BLEND; in i915_bind_blend_state()
199 struct i915_context *i915 = i915_context(pipe); in i915_set_blend_color() local
204 i915->blend_color = *blend_color; in i915_set_blend_color()
206 i915->dirty |= I915_NEW_BLEND; in i915_set_blend_color()
212 struct i915_context *i915 = i915_context(pipe); in i915_set_stencil_ref() local
214 i915->stencil_ref = *stencil_ref; in i915_set_stencil_ref()
216 i915->dirty |= I915_NEW_DEPTH_STENCIL; in i915_set_stencil_ref()
301 struct i915_context *i915 = i915_context(pipe); in i915_bind_vertex_sampler_states() local
304 assert(start + num <= ARRAY_SIZE(i915->vertex_samplers)); in i915_bind_vertex_sampler_states()
307 if (num == i915->num_vertex_samplers && in i915_bind_vertex_sampler_states()
308 !memcmp(i915->vertex_samplers + start, samplers, in i915_bind_vertex_sampler_states()
313 i915->vertex_samplers[i + start] = samplers[i]; in i915_bind_vertex_sampler_states()
317 unsigned j = MAX2(i915->num_vertex_samplers, start + num); in i915_bind_vertex_sampler_states()
318 while (j > 0 && i915->vertex_samplers[j - 1] == NULL) in i915_bind_vertex_sampler_states()
320 i915->num_vertex_samplers = j; in i915_bind_vertex_sampler_states()
323 draw_set_samplers(i915->draw, in i915_bind_vertex_sampler_states()
325 i915->vertex_samplers, in i915_bind_vertex_sampler_states()
326 i915->num_vertex_samplers); in i915_bind_vertex_sampler_states()
336 struct i915_context *i915 = i915_context(pipe); in i915_bind_fragment_sampler_states() local
340 if (num == i915->num_samplers && in i915_bind_fragment_sampler_states()
341 !memcmp(i915->fragment_sampler + start, samplers, in i915_bind_fragment_sampler_states()
346 i915->fragment_sampler[i + start] = samplers[i]; in i915_bind_fragment_sampler_states()
350 unsigned j = MAX2(i915->num_samplers, start + num); in i915_bind_fragment_sampler_states()
351 while (j > 0 && i915->fragment_sampler[j - 1] == NULL) in i915_bind_fragment_sampler_states()
353 i915->num_samplers = j; in i915_bind_fragment_sampler_states()
356 i915->dirty |= I915_NEW_SAMPLER; in i915_bind_fragment_sampler_states()
390 i915_prepare_vertex_sampling(struct i915_context *i915) in i915_prepare_vertex_sampling() argument
392 struct i915_winsys *iws = i915->iws; in i915_prepare_vertex_sampling()
397 unsigned num = i915->num_vertex_sampler_views; in i915_prepare_vertex_sampling()
398 struct pipe_sampler_view **views = i915->vertex_sampler_views; in i915_prepare_vertex_sampling()
415 pipe_resource_reference(&i915->mapped_vs_tex[i], tex); in i915_prepare_vertex_sampling()
417 i915->mapped_vs_tex_buffer[i] = i915_tex->buffer; in i915_prepare_vertex_sampling()
430 draw_set_mapped_texture(i915->draw, in i915_prepare_vertex_sampling()
438 i915->mapped_vs_tex[i] = NULL; in i915_prepare_vertex_sampling()
443 i915_cleanup_vertex_sampling(struct i915_context *i915) in i915_cleanup_vertex_sampling() argument
445 struct i915_winsys *iws = i915->iws; in i915_cleanup_vertex_sampling()
447 for (i = 0; i < ARRAY_SIZE(i915->mapped_vs_tex); i++) { in i915_cleanup_vertex_sampling()
448 if (i915->mapped_vs_tex_buffer[i]) { in i915_cleanup_vertex_sampling()
449 iws->buffer_unmap(iws, i915->mapped_vs_tex_buffer[i]); in i915_cleanup_vertex_sampling()
450 pipe_resource_reference(&i915->mapped_vs_tex[i], NULL); in i915_cleanup_vertex_sampling()
553 struct i915_context *i915 = i915_context(pipe); in i915_bind_depth_stencil_state() local
555 if (i915->depth_stencil == depth_stencil) in i915_bind_depth_stencil_state()
558 i915->depth_stencil = (const struct i915_depth_stencil_state *)depth_stencil; in i915_bind_depth_stencil_state()
560 i915->dirty |= I915_NEW_DEPTH_STENCIL; in i915_bind_depth_stencil_state()
575 struct i915_context *i915 = i915_context(pipe); in i915_set_scissor_states() local
577 memcpy( &i915->scissor, scissor, sizeof(*scissor) ); in i915_set_scissor_states()
578 i915->dirty |= I915_NEW_SCISSOR; in i915_set_scissor_states()
593 struct i915_context *i915 = i915_context(pipe); in i915_create_fs_state() local
598 ifs->draw_data = draw_create_fragment_shader(i915->draw, templ); in i915_create_fs_state()
604 i915_translate_fragment_program(i915, ifs); in i915_create_fs_state()
612 struct i915_context *i915 = i915_context(pipe); in i915_bind_fs_state() local
614 if (i915->fs == shader) in i915_bind_fs_state()
617 i915->fs = (struct i915_fragment_shader*) shader; in i915_bind_fs_state()
619 draw_bind_fragment_shader(i915->draw, (i915->fs ? i915->fs->draw_data : NULL)); in i915_bind_fs_state()
621 i915->dirty |= I915_NEW_FS; in i915_bind_fs_state()
648 struct i915_context *i915 = i915_context(pipe); in i915_create_vs_state() local
651 return draw_create_vertex_shader(i915->draw, templ); in i915_create_vs_state()
656 struct i915_context *i915 = i915_context(pipe); in i915_bind_vs_state() local
658 if (i915->vs == shader) in i915_bind_vs_state()
661 i915->vs = shader; in i915_bind_vs_state()
664 draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader); in i915_bind_vs_state()
666 i915->dirty |= I915_NEW_VS; in i915_bind_vs_state()
671 struct i915_context *i915 = i915_context(pipe); in i915_delete_vs_state() local
674 draw_delete_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader); in i915_delete_vs_state()
681 struct i915_context *i915 = i915_context(pipe); in i915_set_constant_buffer() local
699 struct pipe_resource *old_buf = i915->constants[shader]; in i915_set_constant_buffer()
701 unsigned old_num = i915->current.num_user_constants[shader]; in i915_set_constant_buffer()
718 diff = i915->current.num_user_constants[shader] != 0; in i915_set_constant_buffer()
721 pipe_resource_reference(&i915->constants[shader], buf); in i915_set_constant_buffer()
722 i915->current.num_user_constants[shader] = new_num; in i915_set_constant_buffer()
725 i915->dirty |= shader == PIPE_SHADER_VERTEX ? I915_NEW_VS_CONSTANTS : I915_NEW_FS_CONSTANTS; in i915_set_constant_buffer()
737 struct i915_context *i915 = i915_context(pipe); in i915_set_fragment_sampler_views() local
743 if (num == i915->num_fragment_sampler_views && in i915_set_fragment_sampler_views()
744 !memcmp(i915->fragment_sampler_views, views, num * sizeof(struct pipe_sampler_view *))) in i915_set_fragment_sampler_views()
752 pipe_sampler_view_release(pipe, &i915->fragment_sampler_views[i]); in i915_set_fragment_sampler_views()
753 pipe_sampler_view_reference(&i915->fragment_sampler_views[i], in i915_set_fragment_sampler_views()
757 for (i = num; i < i915->num_fragment_sampler_views; i++) in i915_set_fragment_sampler_views()
758 pipe_sampler_view_release(pipe, &i915->fragment_sampler_views[i]); in i915_set_fragment_sampler_views()
760 i915->num_fragment_sampler_views = num; in i915_set_fragment_sampler_views()
762 i915->dirty |= I915_NEW_SAMPLER_VIEW; in i915_set_fragment_sampler_views()
770 struct i915_context *i915 = i915_context(pipe); in i915_set_vertex_sampler_views() local
773 assert(num <= ARRAY_SIZE(i915->vertex_sampler_views)); in i915_set_vertex_sampler_views()
776 if (num == i915->num_vertex_sampler_views && in i915_set_vertex_sampler_views()
777 !memcmp(i915->vertex_sampler_views, views, num * sizeof(struct pipe_sampler_view *))) { in i915_set_vertex_sampler_views()
781 for (i = 0; i < ARRAY_SIZE(i915->vertex_sampler_views); i++) { in i915_set_vertex_sampler_views()
784 pipe_sampler_view_reference(&i915->vertex_sampler_views[i], view); in i915_set_vertex_sampler_views()
787 i915->num_vertex_sampler_views = num; in i915_set_vertex_sampler_views()
789 draw_set_sampler_views(i915->draw, in i915_set_vertex_sampler_views()
791 i915->vertex_sampler_views, in i915_set_vertex_sampler_views()
792 i915->num_vertex_sampler_views); in i915_set_vertex_sampler_views()
866 struct i915_context *i915 = i915_context(pipe); in i915_set_framebuffer_state() local
869 i915->framebuffer.width = fb->width; in i915_set_framebuffer_state()
870 i915->framebuffer.height = fb->height; in i915_set_framebuffer_state()
871 i915->framebuffer.nr_cbufs = fb->nr_cbufs; in i915_set_framebuffer_state()
873 pipe_surface_reference(&i915->framebuffer.cbufs[i], in i915_set_framebuffer_state()
876 pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf); in i915_set_framebuffer_state()
878 i915->dirty |= I915_NEW_FRAMEBUFFER; in i915_set_framebuffer_state()
886 struct i915_context *i915 = i915_context(pipe); in i915_set_clip_state() local
888 i915->clip = *clip; in i915_set_clip_state()
890 draw_set_clip_state(i915->draw, clip); in i915_set_clip_state()
892 i915->dirty |= I915_NEW_CLIP; in i915_set_clip_state()
905 struct i915_context *i915 = i915_context(pipe); in i915_set_viewport_states() local
907 i915->viewport = *viewport; /* struct copy */ in i915_set_viewport_states()
910 draw_set_viewport_states(i915->draw, start_slot, num_viewports, in i915_set_viewport_states()
911 &i915->viewport); in i915_set_viewport_states()
913 i915->dirty |= I915_NEW_VIEWPORT; in i915_set_viewport_states()
987 struct i915_context *i915 = i915_context(pipe); in i915_bind_rasterizer_state() local
989 if (i915->rasterizer == raster) in i915_bind_rasterizer_state()
992 i915->rasterizer = (struct i915_rasterizer_state *)raster; in i915_bind_rasterizer_state()
995 draw_set_rasterizer_state(i915->draw, in i915_bind_rasterizer_state()
996 (i915->rasterizer ? &(i915->rasterizer->templ) : NULL), in i915_bind_rasterizer_state()
999 i915->dirty |= I915_NEW_RASTERIZER; in i915_bind_rasterizer_state()
1012 struct i915_context *i915 = i915_context(pipe); in i915_set_vertex_buffers() local
1013 struct draw_context *draw = i915->draw; in i915_set_vertex_buffers()
1015 util_set_vertex_buffers_count(i915->vertex_buffers, in i915_set_vertex_buffers()
1016 &i915->nr_vertex_buffers, in i915_set_vertex_buffers()
1042 struct i915_context *i915 = i915_context(pipe); in i915_bind_vertex_elements_state() local
1045 if (i915->velems == velems) in i915_bind_vertex_elements_state()
1048 i915->velems = velems; in i915_bind_vertex_elements_state()
1052 draw_set_vertex_elements(i915->draw, in i915_bind_vertex_elements_state()
1070 i915_init_state_functions( struct i915_context *i915 ) in i915_init_state_functions() argument
1072 i915->base.create_blend_state = i915_create_blend_state; in i915_init_state_functions()
1073 i915->base.bind_blend_state = i915_bind_blend_state; in i915_init_state_functions()
1074 i915->base.delete_blend_state = i915_delete_blend_state; in i915_init_state_functions()
1076 i915->base.create_sampler_state = i915_create_sampler_state; in i915_init_state_functions()
1077 i915->base.bind_sampler_states = i915_bind_sampler_states; in i915_init_state_functions()
1078 i915->base.delete_sampler_state = i915_delete_sampler_state; in i915_init_state_functions()
1080 i915->base.create_depth_stencil_alpha_state = i915_create_depth_stencil_state; in i915_init_state_functions()
1081 i915->base.bind_depth_stencil_alpha_state = i915_bind_depth_stencil_state; in i915_init_state_functions()
1082 i915->base.delete_depth_stencil_alpha_state = i915_delete_depth_stencil_state; in i915_init_state_functions()
1084 i915->base.create_rasterizer_state = i915_create_rasterizer_state; in i915_init_state_functions()
1085 i915->base.bind_rasterizer_state = i915_bind_rasterizer_state; in i915_init_state_functions()
1086 i915->base.delete_rasterizer_state = i915_delete_rasterizer_state; in i915_init_state_functions()
1087 i915->base.create_fs_state = i915_create_fs_state; in i915_init_state_functions()
1088 i915->base.bind_fs_state = i915_bind_fs_state; in i915_init_state_functions()
1089 i915->base.delete_fs_state = i915_delete_fs_state; in i915_init_state_functions()
1090 i915->base.create_vs_state = i915_create_vs_state; in i915_init_state_functions()
1091 i915->base.bind_vs_state = i915_bind_vs_state; in i915_init_state_functions()
1092 i915->base.delete_vs_state = i915_delete_vs_state; in i915_init_state_functions()
1093 i915->base.create_vertex_elements_state = i915_create_vertex_elements_state; in i915_init_state_functions()
1094 i915->base.bind_vertex_elements_state = i915_bind_vertex_elements_state; in i915_init_state_functions()
1095 i915->base.delete_vertex_elements_state = i915_delete_vertex_elements_state; in i915_init_state_functions()
1097 i915->base.set_blend_color = i915_set_blend_color; in i915_init_state_functions()
1098 i915->base.set_stencil_ref = i915_set_stencil_ref; in i915_init_state_functions()
1099 i915->base.set_clip_state = i915_set_clip_state; in i915_init_state_functions()
1100 i915->base.set_sample_mask = i915_set_sample_mask; in i915_init_state_functions()
1101 i915->base.set_constant_buffer = i915_set_constant_buffer; in i915_init_state_functions()
1102 i915->base.set_framebuffer_state = i915_set_framebuffer_state; in i915_init_state_functions()
1104 i915->base.set_polygon_stipple = i915_set_polygon_stipple; in i915_init_state_functions()
1105 i915->base.set_scissor_states = i915_set_scissor_states; in i915_init_state_functions()
1106 i915->base.set_sampler_views = i915_set_sampler_views; in i915_init_state_functions()
1107 i915->base.create_sampler_view = i915_create_sampler_view; in i915_init_state_functions()
1108 i915->base.sampler_view_destroy = i915_sampler_view_destroy; in i915_init_state_functions()
1109 i915->base.set_viewport_states = i915_set_viewport_states; in i915_init_state_functions()
1110 i915->base.set_vertex_buffers = i915_set_vertex_buffers; in i915_init_state_functions()