Lines Matching refs:i915
54 struct i915_context *i915 = i915_context(pipe); in i915_draw_vbo() local
55 struct draw_context *draw = i915->draw; in i915_draw_vbo()
62 i915->dirty &= ~I915_NEW_VS_CONSTANTS; in i915_draw_vbo()
64 if (i915->dirty) in i915_draw_vbo()
65 i915_update_derived(i915); in i915_draw_vbo()
70 for (i = 0; i < i915->nr_vertex_buffers; i++) { in i915_draw_vbo()
71 const void *buf = i915->vertex_buffers[i].user_buffer; in i915_draw_vbo()
73 buf = i915_buffer(i915->vertex_buffers[i].buffer)->data; in i915_draw_vbo()
81 mapped_indices = i915->index_buffer.user_buffer; in i915_draw_vbo()
83 mapped_indices = i915_buffer(i915->index_buffer.buffer)->data; in i915_draw_vbo()
85 (ubyte *) mapped_indices + i915->index_buffer.offset, in i915_draw_vbo()
86 i915->index_buffer.index_size, ~0); in i915_draw_vbo()
89 if (i915->constants[PIPE_SHADER_VERTEX]) in i915_draw_vbo()
91 i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data, in i915_draw_vbo()
92 (i915->current.num_user_constants[PIPE_SHADER_VERTEX] * in i915_draw_vbo()
97 if (i915->num_vertex_sampler_views > 0) in i915_draw_vbo()
98 i915_prepare_vertex_sampling(i915); in i915_draw_vbo()
103 draw_vbo(i915->draw, info); in i915_draw_vbo()
108 for (i = 0; i < i915->nr_vertex_buffers; i++) { in i915_draw_vbo()
109 draw_set_mapped_vertex_buffer(i915->draw, i, NULL, 0); in i915_draw_vbo()
114 if (i915->num_vertex_sampler_views > 0) in i915_draw_vbo()
115 i915_cleanup_vertex_sampling(i915); in i915_draw_vbo()
121 draw_flush(i915->draw); in i915_draw_vbo()
132 struct i915_context *i915 = i915_context(pipe); in i915_destroy() local
135 if (i915->blitter) in i915_destroy()
136 util_blitter_destroy(i915->blitter); in i915_destroy()
138 draw_destroy(i915->draw); in i915_destroy()
140 if(i915->batch) in i915_destroy()
141 i915->iws->batchbuffer_destroy(i915->batch); in i915_destroy()
145 pipe_surface_reference(&i915->framebuffer.cbufs[i], NULL); in i915_destroy()
147 pipe_surface_reference(&i915->framebuffer.zsbuf, NULL); in i915_destroy()
151 pipe_resource_reference(&i915->constants[i], NULL); in i915_destroy()
154 FREE(i915); in i915_destroy()
160 struct i915_context *i915; in i915_create_context() local
162 i915 = CALLOC_STRUCT(i915_context); in i915_create_context()
163 if (!i915) in i915_create_context()
166 i915->iws = i915_screen(screen)->iws; in i915_create_context()
167 i915->base.screen = screen; in i915_create_context()
168 i915->base.priv = priv; in i915_create_context()
170 i915->base.destroy = i915_destroy; in i915_create_context()
173 i915->base.clear = i915_clear_blitter; in i915_create_context()
175 i915->base.clear = i915_clear_render; in i915_create_context()
177 i915->base.draw_vbo = i915_draw_vbo; in i915_create_context()
180 slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer), in i915_create_context()
182 slab_create(&i915->texture_transfer_pool, sizeof(struct i915_transfer), in i915_create_context()
187 i915->batch = i915->iws->batchbuffer_create(i915->iws); in i915_create_context()
192 i915->draw = draw_create(&i915->base); in i915_create_context()
193 assert(i915->draw); in i915_create_context()
195 draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915)); in i915_create_context()
197 draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915)); in i915_create_context()
200 i915_init_surface_functions(i915); in i915_create_context()
201 i915_init_state_functions(i915); in i915_create_context()
202 i915_init_flush_functions(i915); in i915_create_context()
203 i915_init_resource_functions(i915); in i915_create_context()
204 i915_init_query_functions(i915); in i915_create_context()
207 i915->blitter = util_blitter_create(&i915->base); in i915_create_context()
208 assert(i915->blitter); in i915_create_context()
211 util_blitter_cache_all_shaders(i915->blitter); in i915_create_context()
213 draw_install_aaline_stage(i915->draw, &i915->base); in i915_create_context()
214 draw_install_aapoint_stage(i915->draw, &i915->base); in i915_create_context()
215 draw_enable_point_sprites(i915->draw, TRUE); in i915_create_context()
217 i915->dirty = ~0; in i915_create_context()
218 i915->hardware_dirty = ~0; in i915_create_context()
219 i915->immediate_dirty = ~0; in i915_create_context()
220 i915->dynamic_dirty = ~0; in i915_create_context()
221 i915->static_dirty = ~0; in i915_create_context()
222 i915->flush_dirty = 0; in i915_create_context()
224 return &i915->base; in i915_create_context()