Lines Matching refs:vc4

76 vc4_start_draw(struct vc4_context *vc4)
78 struct vc4_job *job = vc4->job;
109 job->draw_width = vc4->framebuffer.width;
110 job->draw_height = vc4->framebuffer.height;
117 struct vc4_context *vc4 = vc4_context(pctx);
128 vc4_flush_jobs_writing_resource(vc4, view->texture);
133 vc4_emit_gl_shader_state(struct vc4_context *vc4,
138 struct vc4_job *job = vc4->job;
140 struct vc4_vertex_stateobj *vtx = vc4->vtx;
142 struct vc4_vertexbuf_stateobj *vertexbuf = &vc4->vertexbuf;
157 !vc4->prog.fs->fs_threaded;
162 vc4->rasterizer->base.point_size_per_vertex);
166 vc4->prog.fs->num_inputs;
168 cl_address(vc4->prog.fs->bo, 0);
171 vc4->prog.cs->vattrs_live;
173 vc4->prog.cs->vattr_offsets[8];
175 cl_address(vc4->prog.cs->bo, 0);
178 vc4->prog.vs->vattrs_live;
180 vc4->prog.vs->vattr_offsets[8];
182 cl_address(vc4->prog.vs->bo, 0);
192 /* not vc4->dirty tracked: vc4->last_index_bias */
206 vc4->prog.cs->vattr_offsets[i];
208 vc4->prog.vs->vattr_offsets[i];
219 struct vc4_bo *bo = vc4_bo_alloc(vc4->screen, 4096, "scratch VBO");
242 vc4_write_uniforms(vc4, vc4->prog.fs,
243 &vc4->constbuf[PIPE_SHADER_FRAGMENT],
244 &vc4->fragtex);
245 vc4_write_uniforms(vc4, vc4->prog.vs,
246 &vc4->constbuf[PIPE_SHADER_VERTEX],
247 &vc4->verttex);
248 vc4_write_uniforms(vc4, vc4->prog.cs,
249 &vc4->constbuf[PIPE_SHADER_VERTEX],
250 &vc4->verttex);
252 vc4->last_index_bias = index_bias + extra_index_bias;
253 vc4->max_index = max_index;
280 struct vc4_context *vc4 = vc4_context(pctx);
281 struct vc4_job *job = vc4_get_job_for_fbo(vc4);
286 vc4_job_submit(vc4, job);
327 struct vc4_context *vc4 = vc4_context(pctx);
338 vc4_predraw_check_textures(pctx, &vc4->verttex);
339 vc4_predraw_check_textures(pctx, &vc4->fragtex);
343 struct vc4_job *job = vc4_get_job_for_fbo(vc4);
348 if (job->flags != vc4->rasterizer->tile_raster_order_flags) {
349 vc4_job_submit(vc4, job);
350 job = vc4_get_job_for_fbo(vc4);
355 if (vc4->prim_mode != info->mode) {
356 vc4->prim_mode = info->mode;
357 vc4->dirty |= VC4_DIRTY_PRIM_MODE;
360 vc4_start_draw(vc4);
361 if (!vc4_update_compiled_shaders(vc4, info->mode)) {
371 if ((vc4->dirty & (VC4_DIRTY_VTXBUF |
378 vc4->prog.cs->uniform_dirty_bits |
379 vc4->prog.vs->uniform_dirty_bits |
380 vc4->prog.fs->uniform_dirty_bits)) ||
381 vc4->last_index_bias != index_bias) {
383 vc4_emit_gl_shader_state(vc4, info, draws, 0);
388 vc4->dirty = 0;
406 u_upload_data(vc4->uploader, start_offset,
444 cl_u32(&bcl, vc4->max_index);
479 vc4_emit_gl_shader_state(vc4, info, draws,
504 if (vc4->zsa && vc4->framebuffer.zsbuf) {
506 vc4_resource(vc4->framebuffer.zsbuf->texture);
508 if (vc4->zsa->base.depth_enabled) {
513 if (vc4->zsa->base.stencil[0].enabled) {
547 struct vc4_context *vc4 = vc4_context(pctx);
548 struct vc4_job *job = vc4_get_job_for_fbo(vc4);
552 vc4_resource(vc4->framebuffer.zsbuf->texture);
558 * tile-based clears in vc4->job, because the blitter may
564 util_format_is_depth_and_stencil(vc4->framebuffer.zsbuf->format)) {
569 vc4_blitter_save(vc4);
570 util_blitter_clear(vc4->blitter,
571 vc4->framebuffer.width,
572 vc4->framebuffer.height,
580 job = vc4_get_job_for_fbo(vc4);
589 vc4_job_submit(vc4, job);
590 job = vc4_get_job_for_fbo(vc4);
595 vc4_resource(vc4->framebuffer.cbufs[0]->texture);
598 if (vc4_rt_format_is_565(vc4->framebuffer.cbufs[0]->format)) {
609 pack_rgba(vc4->framebuffer.cbufs[0]->format,
618 vc4_resource(vc4->framebuffer.zsbuf->texture);
635 job->draw_max_x = vc4->framebuffer.width;
636 job->draw_max_y = vc4->framebuffer.height;
640 vc4_start_draw(vc4);