Home | History | Annotate | Download | only in i915

Lines Matching refs:i915

45 /* The i915 (and related graphics cores) do not support GL_CLAMP.  The
179 struct i915_context *i915 = i915_context(pipe);
181 if (i915->blend == blend)
184 i915->blend = (struct i915_blend_state*)blend;
186 i915->dirty |= I915_NEW_BLEND;
198 struct i915_context *i915 = i915_context(pipe);
203 i915->blend_color = *blend_color;
205 i915->dirty |= I915_NEW_BLEND;
211 struct i915_context *i915 = i915_context(pipe);
213 i915->stencil_ref = *stencil_ref;
215 i915->dirty |= I915_NEW_DEPTH_STENCIL;
297 struct i915_context *i915 = i915_context(pipe);
299 i915->saved_nr_samplers = num;
300 memcpy(&i915->saved_samplers, sampler, sizeof(void *) * num);
302 i915->saved_bind_sampler_states(pipe, num, sampler);
310 struct i915_context *i915 = i915_context(pipe);
313 assert(num_samplers <= Elements(i915->vertex_samplers));
316 if (num_samplers == i915->num_vertex_samplers &&
317 !memcmp(i915->vertex_samplers, samplers, num_samplers * sizeof(void *)))
321 i915->vertex_samplers[i] = samplers[i];
322 for (i = num_samplers; i < Elements(i915->vertex_samplers); ++i)
323 i915->vertex_samplers[i] = NULL;
325 i915->num_vertex_samplers = num_samplers;
327 draw_set_samplers(i915->draw,
329 i915->vertex_samplers,
330 i915->num_vertex_samplers);
338 struct i915_context *i915 = i915_context(pipe);
342 if (num == i915->num_samplers &&
343 !memcmp(i915->sampler, sampler, num * sizeof(void *)))
347 i915->sampler[i] = sampler[i];
349 i915->sampler[i] = NULL;
351 i915->num_samplers = num;
353 i915->dirty |= I915_NEW_SAMPLER;
367 i915_prepare_vertex_sampling(struct i915_context *i915)
369 struct i915_winsys *iws = i915->iws;
374 unsigned num = i915->num_vertex_sampler_views;
375 struct pipe_sampler_view **views = i915->vertex_sampler_views;
392 pipe_resource_reference(&i915->mapped_vs_tex[i], tex);
394 i915->mapped_vs_tex_buffer[i] = i915_tex->buffer;
408 draw_set_mapped_texture(i915->draw,
415 i915->mapped_vs_tex[i] = NULL;
420 i915_cleanup_vertex_sampling(struct i915_context *i915)
422 struct i915_winsys *iws = i915->iws;
424 for (i = 0; i < Elements(i915->mapped_vs_tex); i++) {
425 if (i915->mapped_vs_tex_buffer[i]) {
426 iws->buffer_unmap(iws, i915->mapped_vs_tex_buffer[i]);
427 pipe_resource_reference(&i915->mapped_vs_tex[i], NULL);
530 struct i915_context *i915 = i915_context(pipe);
532 if (i915->depth_stencil == depth_stencil)
535 i915->depth_stencil = (const struct i915_depth_stencil_state *)depth_stencil;
537 i915->dirty |= I915_NEW_DEPTH_STENCIL;
550 struct i915_context *i915 = i915_context(pipe);
552 memcpy( &i915->scissor, scissor, sizeof(*scissor) );
553 i915->dirty |= I915_NEW_SCISSOR;
568 struct i915_context *i915 = i915_context(pipe);
573 ifs->draw_data = draw_create_fragment_shader(i915->draw, templ);
578 /* The shader's compiled to i915 instructions here */
579 i915_translate_fragment_program(i915, ifs);
587 struct i915_context *i915 = i915_context(pipe);
589 if (i915->saved_fs == shader)
592 i915->saved_fs = shader;
594 i915->saved_bind_fs_state(pipe, shader);
600 struct i915_context *i915 = i915_context(pipe);
602 if (i915->fs == shader)
605 i915->fs = (struct i915_fragment_shader*) shader;
607 draw_bind_fragment_shader(i915->draw, (i915->fs ? i915->fs->draw_data : NULL));
609 i915->dirty |= I915_NEW_FS;
639 struct i915_context *i915 = i915_context(pipe);
642 return draw_create_vertex_shader(i915->draw, templ);
647 struct i915_context *i915 = i915_context(pipe);
649 if (i915->saved_vs == shader)
652 i915->saved_vs = shader;
655 draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader);
657 i915->dirty |= I915_NEW_VS;
662 struct i915_context *i915 = i915_context(pipe);
665 draw_delete_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader);
672 struct i915_context *i915 = i915_context(pipe);
690 struct pipe_resource *old_buf = i915->constants[shader];
692 unsigned old_num = i915->current.num_user_constants[shader];
709 diff = i915->current.num_user_constants[shader] != 0;
712 pipe_resource_reference(&i915->constants[shader], buf);
713 i915->current.num_user_constants[shader] = new_num;
716 i915->dirty |= shader == PIPE_SHADER_VERTEX ? I915_NEW_VS_CONSTANTS : I915_NEW_FS_CONSTANTS;
729 struct i915_context *i915 = i915_context(pipe);
733 pipe_sampler_view_reference(&i915->saved_sampler_views[i],
736 for (i = num; i < i915->saved_nr_sampler_views; i++)
737 pipe_sampler_view_reference(&i915->saved_sampler_views[i],
740 i915->saved_nr_sampler_views = num;
742 i915->saved_set_sampler_views(pipe, num, views);
749 struct i915_context *i915 = i915_context(pipe);
755 if (num == i915->num_fragment_sampler_views &&
756 !memcmp(i915->fragment_sampler_views, views, num * sizeof(struct pipe_sampler_view *)))
760 pipe_sampler_view_reference(&i915->fragment_sampler_views[i],
763 for (i = num; i < i915->num_fragment_sampler_views; i++)
764 pipe_sampler_view_reference(&i915->fragment_sampler_views[i],
767 i915->num_fragment_sampler_views = num;
769 i915->dirty |= I915_NEW_SAMPLER_VIEW;
777 struct i915_context *i915 = i915_context(pipe);
780 assert(num <= Elements(i915->vertex_sampler_views));
783 if (num == i915->num_vertex_sampler_views &&
784 !memcmp(i915->vertex_sampler_views, views, num * sizeof(struct pipe_sampler_view *))) {
788 for (i = 0; i < Elements(i915->vertex_sampler_views); i++) {
791 pipe_sampler_view_reference(&i915->vertex_sampler_views[i], view);
794 i915->num_vertex_sampler_views = num;
796 draw_set_sampler_views(i915->draw,
798 i915->vertex_sampler_views,
799 i915->num_vertex_sampler_views);
834 struct i915_context *i915 = i915_context(pipe);
837 i915->framebuffer.width = fb->width;
838 i915->framebuffer.height = fb->height;
839 i915->framebuffer.nr_cbufs = fb->nr_cbufs;
841 pipe_surface_reference(&i915->framebuffer.cbufs[i],
844 pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf);
846 i915->dirty |= I915_NEW_FRAMEBUFFER;
854 struct i915_context *i915 = i915_context(pipe);
856 i915->saved_clip = *clip;
858 draw_set_clip_state(i915->draw, clip);
860 i915->dirty |= I915_NEW_CLIP;
871 struct i915_context *i915 = i915_context(pipe);
873 i915->viewport = *viewport; /* struct copy */
876 draw_set_viewport_state(i915->draw, &i915->viewport);
878 i915->dirty |= I915_NEW_VIEWPORT;
953 struct i915_context *i915 = i915_context(pipe);
955 if (i915->rasterizer == raster)
958 i915->rasterizer = (struct i915_rasterizer_state *)raster;
961 draw_set_rasterizer_state(i915->draw,
962 (i915->rasterizer ? &(i915->rasterizer->templ) : NULL),
965 i915->dirty |= I915_NEW_RASTERIZER;
978 struct i915_context *i915 = i915_context(pipe);
979 struct draw_context *draw = i915->draw;
982 util_copy_vertex_buffers(i915->saved_vertex_buffers,
983 &i915->saved_nr_vertex_buffers,
988 for (i = 0; i < i915->num_vertex_buffers; i++) {
1024 struct i915_context *i915 = i915_context(pipe);
1027 if (i915->saved_velems == velems)
1030 i915->saved_velems = velems;
1034 draw_set_vertex_elements(i915->draw,
1048 struct i915_context *i915 = i915_context(pipe);
1051 memcpy(&i915->index_buffer, ib, sizeof(i915->index_buffer));
1053 memset(&i915->index_buffer, 0, sizeof(i915->index_buffer));
1063 i915_init_state_functions( struct i915_context *i915 )
1065 i915->base.create_blend_state = i915_create_blend_state;
1066 i915->base.bind_blend_state = i915_bind_blend_state;
1067 i915->base.delete_blend_state = i915_delete_blend_state;
1069 i915->base.create_sampler_state = i915_create_sampler_state;
1070 i915->base.bind_fragment_sampler_states = i915_bind_fragment_sampler_states;
1071 i915->base.bind_vertex_sampler_states = i915_bind_vertex_sampler_states;
1072 i915->base.delete_sampler_state = i915_delete_sampler_state;
1074 i915->base.create_depth_stencil_alpha_state = i915_create_depth_stencil_state;
1075 i915->base.bind_depth_stencil_alpha_state = i915_bind_depth_stencil_state;
1076 i915
1078 i915->base.create_rasterizer_state = i915_create_rasterizer_state;
1079 i915->base.bind_rasterizer_state = i915_bind_rasterizer_state;
1080 i915->base.delete_rasterizer_state = i915_delete_rasterizer_state;
1081 i915->base.create_fs_state = i915_create_fs_state;
1082 i915->base.bind_fs_state = i915_bind_fs_state;
1083 i915->base.delete_fs_state = i915_delete_fs_state;
1084 i915->base.create_vs_state = i915_create_vs_state;
1085 i915->base.bind_vs_state = i915_bind_vs_state;
1086 i915->base.delete_vs_state = i915_delete_vs_state;
1087 i915->base.create_vertex_elements_state = i915_create_vertex_elements_state;
1088 i915->base.bind_vertex_elements_state = i915_bind_vertex_elements_state;
1089 i915->base.delete_vertex_elements_state = i915_delete_vertex_elements_state;
1091 i915->base.set_blend_color = i915_set_blend_color;
1092 i915->base.set_stencil_ref = i915_set_stencil_ref;
1093 i915->base.set_clip_state = i915_set_clip_state;
1094 i915->base.set_sample_mask = i915_set_sample_mask;
1095 i915->base.set_constant_buffer = i915_set_constant_buffer;
1096 i915->base.set_framebuffer_state = i915_set_framebuffer_state;
1098 i915->base.set_polygon_stipple = i915_set_polygon_stipple;
1099 i915->base.set_scissor_state = i915_set_scissor_state;
1100 i915->base.set_fragment_sampler_views = i915_set_fragment_sampler_views;
1101 i915->base.set_vertex_sampler_views = i915_set_vertex_sampler_views;
1102 i915->base.create_sampler_view = i915_create_sampler_view;
1103 i915->base.sampler_view_destroy = i915_sampler_view_destroy;
1104 i915->base.set_viewport_state = i915_set_viewport_state;
1105 i915->base.set_vertex_buffers = i915_set_vertex_buffers;
1106 i915->base.set_index_buffer = i915_set_index_buffer;
1110 i915_init_fixup_state_functions( struct i915_context *i915 )
1112 i915->saved_bind_fs_state = i915->base.bind_fs_state;
1113 i915->base.bind_fs_state = i915_fixup_bind_fs_state;
1114 i915->saved_bind_sampler_states = i915->base.bind_fragment_sampler_states;
1115 i915->base.bind_fragment_sampler_states = i915_fixup_bind_sampler_states;
1116 i915->saved_set_sampler_views = i915->base.set_fragment_sampler_views;
1117 i915->base.set_fragment_sampler_views = i915_fixup_set_fragment_sampler_views;