Lines Matching refs:i915
56 struct i915_context *i915 = i915_context(pipe); in i915_draw_vbo() local
57 struct draw_context *draw = i915->draw; in i915_draw_vbo()
67 i915->dirty &= ~I915_NEW_VS_CONSTANTS; in i915_draw_vbo()
69 if (i915->dirty) in i915_draw_vbo()
70 i915_update_derived(i915); in i915_draw_vbo()
75 for (i = 0; i < i915->nr_vertex_buffers; i++) { in i915_draw_vbo()
76 const void *buf = i915->vertex_buffers[i].is_user_buffer ? in i915_draw_vbo()
77 i915->vertex_buffers[i].buffer.user : NULL; in i915_draw_vbo()
79 if (!i915->vertex_buffers[i].buffer.resource) in i915_draw_vbo()
81 buf = i915_buffer(i915->vertex_buffers[i].buffer.resource)->data; in i915_draw_vbo()
98 if (i915->constants[PIPE_SHADER_VERTEX]) in i915_draw_vbo()
100 i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data, in i915_draw_vbo()
101 (i915->current.num_user_constants[PIPE_SHADER_VERTEX] * in i915_draw_vbo()
106 if (i915->num_vertex_sampler_views > 0) in i915_draw_vbo()
107 i915_prepare_vertex_sampling(i915); in i915_draw_vbo()
112 draw_vbo(i915->draw, info); in i915_draw_vbo()
117 for (i = 0; i < i915->nr_vertex_buffers; i++) { in i915_draw_vbo()
118 draw_set_mapped_vertex_buffer(i915->draw, i, NULL, 0); in i915_draw_vbo()
123 if (i915->num_vertex_sampler_views > 0) in i915_draw_vbo()
124 i915_cleanup_vertex_sampling(i915); in i915_draw_vbo()
130 draw_flush(i915->draw); in i915_draw_vbo()
141 struct i915_context *i915 = i915_context(pipe); in i915_destroy() local
144 if (i915->blitter) in i915_destroy()
145 util_blitter_destroy(i915->blitter); in i915_destroy()
147 draw_destroy(i915->draw); in i915_destroy()
149 if (i915->base.stream_uploader) in i915_destroy()
150 u_upload_destroy(i915->base.stream_uploader); in i915_destroy()
152 if(i915->batch) in i915_destroy()
153 i915->iws->batchbuffer_destroy(i915->batch); in i915_destroy()
157 pipe_surface_reference(&i915->framebuffer.cbufs[i], NULL); in i915_destroy()
159 pipe_surface_reference(&i915->framebuffer.zsbuf, NULL); in i915_destroy()
163 pipe_resource_reference(&i915->constants[i], NULL); in i915_destroy()
166 FREE(i915); in i915_destroy()
172 struct i915_context *i915; in i915_create_context() local
174 i915 = CALLOC_STRUCT(i915_context); in i915_create_context()
175 if (!i915) in i915_create_context()
178 i915->iws = i915_screen(screen)->iws; in i915_create_context()
179 i915->base.screen = screen; in i915_create_context()
180 i915->base.priv = priv; in i915_create_context()
181 i915->base.stream_uploader = u_upload_create_default(&i915->base); in i915_create_context()
182 i915->base.const_uploader = i915->base.stream_uploader; in i915_create_context()
184 i915->base.destroy = i915_destroy; in i915_create_context()
187 i915->base.clear = i915_clear_blitter; in i915_create_context()
189 i915->base.clear = i915_clear_render; in i915_create_context()
191 i915->base.draw_vbo = i915_draw_vbo; in i915_create_context()
194 slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer), in i915_create_context()
196 slab_create(&i915->texture_transfer_pool, sizeof(struct i915_transfer), in i915_create_context()
201 i915->batch = i915->iws->batchbuffer_create(i915->iws); in i915_create_context()
206 i915->draw = draw_create(&i915->base); in i915_create_context()
207 assert(i915->draw); in i915_create_context()
209 draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915)); in i915_create_context()
211 draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915)); in i915_create_context()
214 i915_init_surface_functions(i915); in i915_create_context()
215 i915_init_state_functions(i915); in i915_create_context()
216 i915_init_flush_functions(i915); in i915_create_context()
217 i915_init_resource_functions(i915); in i915_create_context()
218 i915_init_query_functions(i915); in i915_create_context()
221 i915->blitter = util_blitter_create(&i915->base); in i915_create_context()
222 assert(i915->blitter); in i915_create_context()
225 util_blitter_cache_all_shaders(i915->blitter); in i915_create_context()
227 draw_install_aaline_stage(i915->draw, &i915->base); in i915_create_context()
228 draw_install_aapoint_stage(i915->draw, &i915->base); in i915_create_context()
229 draw_enable_point_sprites(i915->draw, TRUE); in i915_create_context()
231 i915->dirty = ~0; in i915_create_context()
232 i915->hardware_dirty = ~0; in i915_create_context()
233 i915->immediate_dirty = ~0; in i915_create_context()
234 i915->dynamic_dirty = ~0; in i915_create_context()
235 i915->static_dirty = ~0; in i915_create_context()
236 i915->flush_dirty = 0; in i915_create_context()
238 return &i915->base; in i915_create_context()