Lines Matching refs:job
90 store_general(struct vc5_job *job, in store_general() argument
116 ((job->cleared & pipe_bit) && in store_general()
152 (job->cleared & pipe_bit))); in store_general()
154 !(job->cleared & PIPE_CLEAR_DEPTH); in store_general()
156 !(job->cleared & PIPE_CLEAR_STENCIL); in store_general()
197 vc5_rcl_emit_loads(struct vc5_job *job, struct vc5_cl *cl) in vc5_rcl_emit_loads() argument
199 uint32_t read_but_not_cleared = job->resolve & ~job->cleared; in vc5_rcl_emit_loads()
206 struct pipe_surface *psurf = job->cbufs[i]; in vc5_rcl_emit_loads()
221 (job->zsbuf && job->zsbuf->texture->nr_samples > 1))) { in vc5_rcl_emit_loads()
222 load_general(cl, job->zsbuf, in vc5_rcl_emit_loads()
252 vc5_rcl_emit_stores(struct vc5_job *job, struct vc5_cl *cl) in vc5_rcl_emit_stores() argument
254 MAYBE_UNUSED bool needs_color_clear = job->cleared & PIPE_CLEAR_COLOR_BUFFERS; in vc5_rcl_emit_stores()
255 MAYBE_UNUSED bool needs_z_clear = job->cleared & PIPE_CLEAR_DEPTH; in vc5_rcl_emit_stores()
256 MAYBE_UNUSED bool needs_s_clear = job->cleared & PIPE_CLEAR_STENCIL; in vc5_rcl_emit_stores()
273 (job->cleared & PIPE_CLEAR_COLOR_BUFFERS) == in vc5_rcl_emit_stores()
274 (job->resolve & PIPE_CLEAR_COLOR_BUFFERS)); in vc5_rcl_emit_stores()
276 uint32_t stores_pending = job->resolve; in vc5_rcl_emit_stores()
289 if (!(job->resolve & bit)) in vc5_rcl_emit_stores()
292 struct pipe_surface *psurf = job->cbufs[i]; in vc5_rcl_emit_stores()
299 store_general(job, cl, psurf, RENDER_TARGET_0 + i, bit, in vc5_rcl_emit_stores()
305 if (job->resolve & PIPE_CLEAR_DEPTHSTENCIL && job->zsbuf && in vc5_rcl_emit_stores()
306 !(V3D_VERSION < 40 && job->zsbuf->texture->nr_samples <= 1)) { in vc5_rcl_emit_stores()
309 struct vc5_resource *rsc = vc5_resource(job->zsbuf->texture); in vc5_rcl_emit_stores()
311 if (job->resolve & PIPE_CLEAR_DEPTH) { in vc5_rcl_emit_stores()
312 store_general(job, cl, job->zsbuf, Z, in vc5_rcl_emit_stores()
317 if (job->resolve & PIPE_CLEAR_STENCIL) { in vc5_rcl_emit_stores()
318 store_general(job, cl, job->zsbuf, STENCIL, in vc5_rcl_emit_stores()
324 store_general(job, cl, job->zsbuf, in vc5_rcl_emit_stores()
325 zs_buffer_from_pipe_bits(job->resolve), in vc5_rcl_emit_stores()
326 job->resolve & PIPE_CLEAR_DEPTHSTENCIL, in vc5_rcl_emit_stores()
374 vc5_rcl_emit_generic_per_tile_list(struct vc5_job *job, int last_cbuf) in vc5_rcl_emit_generic_per_tile_list() argument
379 struct vc5_cl *cl = &job->indirect; in vc5_rcl_emit_generic_per_tile_list()
390 vc5_rcl_emit_loads(job, cl); in vc5_rcl_emit_generic_per_tile_list()
409 vc5_rcl_emit_stores(job, cl); in vc5_rcl_emit_generic_per_tile_list()
417 cl_emit(&job->rcl, START_ADDRESS_OF_GENERIC_TILE_LIST, branch) { in vc5_rcl_emit_generic_per_tile_list()
425 v3d_setup_render_target(struct vc5_job *job, int cbuf, in v3d_setup_render_target() argument
428 if (!job->cbufs[cbuf]) in v3d_setup_render_target()
431 struct vc5_surface *surf = vc5_surface(job->cbufs[cbuf]); in v3d_setup_render_target()
441 v3dX(emit_rcl)(struct vc5_job *job) in v3dX()
444 assert(!job->rcl.bo); in v3dX()
446 vc5_cl_ensure_space_with_branch(&job->rcl, 200 + 256 * in v3dX()
448 job->submit.rcl_start = job->rcl.bo->offset; in v3dX()
449 vc5_job_add_bo(job, job->rcl.bo); in v3dX()
453 if (job->cbufs[i]) in v3dX()
461 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_COMMON_CONFIGURATION, in v3dX()
464 config.enable_z_store = job->resolve & PIPE_CLEAR_DEPTH; in v3dX()
465 config.enable_stencil_store = job->resolve & PIPE_CLEAR_STENCIL; in v3dX()
467 if (job->zsbuf) { in v3dX()
468 struct vc5_surface *surf = vc5_surface(job->zsbuf); in v3dX()
475 config.early_z_disable = !job->uses_early_z; in v3dX()
477 config.image_width_pixels = job->draw_width; in v3dX()
478 config.image_height_pixels = job->draw_height; in v3dX()
483 config.multisample_mode_4x = job->msaa; in v3dX()
485 config.maximum_bpp_of_all_render_targets = job->internal_bpp; in v3dX()
489 struct pipe_surface *psurf = job->cbufs[i]; in v3dX()
502 … uint32_t implicit_padded_height = (align(job->draw_height, uif_block_height) / in v3dX()
515 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_RENDER_TARGET_CONFIG, rt) { in v3dX()
524 if (job->resolve & PIPE_CLEAR_COLOR0 << i) in v3dX()
529 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART1, in v3dX()
531 clear.clear_color_low_32_bits = job->clear_color[i][0]; in v3dX()
532 clear.clear_color_next_24_bits = job->clear_color[i][1] & 0xffffff; in v3dX()
537 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART2, in v3dX()
540 ((job->clear_color[i][1] >> 24) | in v3dX()
541 (job->clear_color[i][2] << 8)); in v3dX()
543 ((job->clear_color[i][2] >> 24) | in v3dX()
544 ((job->clear_color[i][3] & 0xffff) << 8)); in v3dX()
550 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART3, in v3dX()
553 clear.clear_color_high_16_bits = job->clear_color[i][3] >> 16; in v3dX()
560 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_RENDER_TARGET_CONFIG, rt) { in v3dX()
561 v3d_setup_render_target(job, 0, in v3dX()
565 v3d_setup_render_target(job, 1, in v3dX()
569 v3d_setup_render_target(job, 2, in v3dX()
573 v3d_setup_render_target(job, 3, in v3dX()
582 if (job->zsbuf) { in v3dX()
583 struct pipe_surface *psurf = job->zsbuf; in v3dX()
587 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CONFIG, zs) { in v3dX()
599 if (job->resolve & PIPE_CLEAR_DEPTHSTENCIL) in v3dX()
607 cl_emit(&job->rcl, in v3dX()
627 cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CLEAR_VALUES, in v3dX()
629 clear.z_clear_value = job->clear_z; in v3dX()
630 clear.stencil_vg_mask_clear_value = job->clear_s; in v3dX()
636 cl_emit(&job->rcl, TILE_LIST_INITIAL_BLOCK_SIZE, init) { in v3dX()
647 cl_emit(&job->rcl, MULTICORE_RENDERING_TILE_LIST_SET_BASE, list) { in v3dX()
648 list.address = cl_address(job->tile_alloc, 0); in v3dX()
651 cl_emit(&job->rcl, MULTICORE_RENDERING_SUPERTILE_CONFIGURATION, config) { in v3dX()
657 frame_w_in_supertiles = div_round_up(job->draw_tiles_x, in v3dX()
659 frame_h_in_supertiles = div_round_up(job->draw_tiles_y, in v3dX()
672 config.total_frame_width_in_tiles = job->draw_tiles_x; in v3dX()
673 config.total_frame_height_in_tiles = job->draw_tiles_y; in v3dX()
683 cl_emit(&job->rcl, TILE_COORDINATES, coords) { in v3dX()
689 cl_emit(&job->rcl, STORE_TILE_BUFFER_GENERAL, store) { in v3dX()
693 cl_emit(&job->rcl, END_OF_LOADS, end); in v3dX()
694 cl_emit(&job->rcl, STORE_TILE_BUFFER_GENERAL, store) { in v3dX()
697 cl_emit(&job->rcl, CLEAR_TILE_BUFFERS, clear) { in v3dX()
701 cl_emit(&job->rcl, END_OF_TILE_MARKER, end); in v3dX()
704 cl_emit(&job->rcl, FLUSH_VCD_CACHE, flush); in v3dX()
706 vc5_rcl_emit_generic_per_tile_list(job, nr_cbufs - 1); in v3dX()
708 cl_emit(&job->rcl, WAIT_ON_SEMAPHORE, sem); in v3dX()
711 uint32_t supertile_w_in_pixels = job->tile_width * supertile_w; in v3dX()
712 uint32_t supertile_h_in_pixels = job->tile_height * supertile_h; in v3dX()
713 uint32_t min_x_supertile = job->draw_min_x / supertile_w_in_pixels; in v3dX()
714 uint32_t min_y_supertile = job->draw_min_y / supertile_h_in_pixels; in v3dX()
715 uint32_t max_x_supertile = (job->draw_max_x - 1) / supertile_w_in_pixels; in v3dX()
716 uint32_t max_y_supertile = (job->draw_max_y - 1) / supertile_h_in_pixels; in v3dX()
720 cl_emit(&job->rcl, SUPERTILE_COORDINATES, coords) { in v3dX()
727 cl_emit(&job->rcl, END_OF_RENDERING, end); in v3dX()