Lines Matching refs:state
71 * any prefix state data before the binning list proper starts."
79 assert(cmd_buffer->state.job);
80 v3dv_cl_ensure_space_with_branch(&cmd_buffer->state.job->bcl,
83 cl_emit(&cmd_buffer->state.job->bcl, RETURN_FROM_SUB_LIST, ret);
155 check_needs_load(const struct v3dv_cmd_buffer_state *state,
169 if (state->job->first_subpass > first_subpass_idx)
175 if (state->job->is_subpass_continue)
179 if (!state->tile_aligned_render_area)
203 const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
204 const struct v3dv_render_pass *pass = state->pass;
205 const struct v3dv_subpass *subpass = &pass->subpasses[state->subpass_idx];
216 &state->pass->attachments[attachment_idx];
240 bool needs_load = check_needs_load(state,
246 state->attachments[attachment_idx].image_view;
255 &state->pass->attachments[ds_attachment_idx];
265 check_needs_load(state,
271 check_needs_load(state,
278 state->attachments[ds_attachment_idx].image_view;
309 cmd_buffer->state.attachments[attachment_idx].image_view;
359 check_needs_clear(const struct v3dv_cmd_buffer_state *state,
380 if (state->job->is_subpass_continue)
386 if (!state->tile_aligned_render_area)
393 if (state->job->first_subpass != first_subpass_idx)
401 check_needs_store(const struct v3dv_cmd_buffer_state *state,
416 if (state->subpass_idx < last_subpass_idx)
423 if (!state->job->is_subpass_finish)
435 struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
436 struct v3dv_render_pass *pass = state->pass;
438 &pass->subpasses[state->subpass_idx];
450 &state->pass->attachments[ds_attachment_idx];
452 assert(state->job->first_subpass >= ds_attachment->first_subpass);
453 assert(state->subpass_idx >= ds_attachment->first_subpass);
454 assert(state->subpass_idx <= ds_attachment->last_subpass);
470 uint32_t ds_first_subpass = !state->pass->multiview_enabled ?
475 check_needs_clear(state,
482 check_needs_clear(state,
494 check_needs_store(state,
500 check_needs_store(state,
507 &state->attachments[ds_attachment_idx];
552 use_global_zs_clear = !state->job->early_zs_clear &&
571 &state->pass->attachments[attachment_idx];
573 assert(state->job->first_subpass >= attachment->first_subpass);
574 assert(state->subpass_idx >= attachment->first_subpass);
575 assert(state->subpass_idx <= attachment->last_subpass);
583 check_needs_clear(state,
595 check_needs_store(state,
613 &state->attachments[attachment_idx];
662 struct v3dv_job *job = cmd_buffer->state.job;
665 /* Emit the generic list in our indirect state -- the rcl will just
708 const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
710 struct v3dv_job *job = cmd_buffer->state.job;
730 state->render_area.offset.x / supertile_w_in_pixels;
732 state->render_area.offset.y / supertile_h_in_pixels;
734 uint32_t max_render_x = state->render_area.offset.x;
735 if (state->render_area.extent.width > 0)
736 max_render_x += state->render_area.extent.width - 1;
737 uint32_t max_render_y = state->render_area.offset.y;
738 if (state->render_area.extent.height > 0)
739 max_render_y += state->render_area.extent.height - 1;
783 struct v3dv_job *job = cmd_buffer->state.job;
786 const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
787 const struct v3dv_framebuffer *framebuffer = state->framebuffer;
808 assert(state->subpass_idx < state->pass->subpass_count);
809 const struct v3dv_render_pass *pass = state->pass;
810 const struct v3dv_subpass *subpass = &pass->subpasses[state->subpass_idx];
815 * updates to the previous HW state.
830 state->attachments[ds_attachment_idx].image_view;
854 check_needs_clear(state,
861 check_needs_store(state,
871 check_needs_load(state,
877 check_needs_store(state,
904 state->attachments[attachment_idx].image_view;
911 &state->attachments[attachment_idx].clear_value.color[0];
971 state->attachments[ds_attachment_idx].clear_value.z;
973 state->attachments[ds_attachment_idx].clear_value.s;
1015 * state, we need 1 dummy store in between internal type/size
1024 if (cmd_buffer->state.tile_aligned_render_area &&
1047 struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;
1054 struct v3dv_job *job = cmd_buffer->state.job;
1087 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_VIEWPORT;
1093 struct v3dv_job *job = cmd_buffer->state.job;
1096 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1097 struct v3dv_dynamic_state *dynamic_state = &cmd_buffer->state.dynamic;
1142 cmd_buffer->state.dirty &= ~dynamic_stencil_dirty_flags;
1149 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1155 struct v3dv_job *job = cmd_buffer->state.job;
1161 struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;
1170 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_DEPTH_BIAS;
1176 struct v3dv_job *job = cmd_buffer->state.job;
1183 line.line_width = cmd_buffer->state.dynamic.line_width;
1186 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_LINE_WIDTH;
1192 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1195 struct v3dv_job *job = cmd_buffer->state.job;
1201 cl_emit(&job->bcl, SAMPLE_STATE, state) {
1202 state.coverage = 1.0f;
1203 state.mask = pipeline->sample_mask;
1210 struct v3dv_job *job = cmd_buffer->state.job;
1213 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1224 if (cmd_buffer->state.dirty & V3DV_CMD_DIRTY_PIPELINE) {
1238 cmd_buffer->state.dirty & V3DV_CMD_DIRTY_BLEND_CONSTANTS) {
1239 struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;
1246 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_BLEND_CONSTANTS;
1253 struct v3dv_job *job = cmd_buffer->state.job;
1256 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1257 struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;
1263 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_COLOR_WRITE_ENABLE;
1361 struct v3dv_job *job = cmd_buffer->state.job;
1362 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1401 /* Updates job early Z state tracking. Returns False if EZ must be disabled
1430 assert(cmd_buffer->state.pass);
1432 /* If this is the first time we update EZ state for this job we first check
1434 * job (based on state that is not related to the current draw call and
1435 * pipeline state).
1440 struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
1441 assert(state->subpass_idx < state->pass->subpass_count);
1442 struct v3dv_subpass *subpass = &state->pass->subpasses[state->subpass_idx];
1455 &state->pass->attachments[subpass->ds_attachment.attachment];
1461 check_needs_load(state,
1467 struct v3dv_framebuffer *fb = state->framebuffer;
1489 * calls using the CFG_BITS packet based on the bound pipeline state.
1496 * along with the current EZ state. This allows EZ optimization for Z
1543 struct v3dv_job *job = cmd_buffer->state.job;
1546 struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
1564 struct v3dv_job *job = cmd_buffer->state.job;
1572 if (cmd_buffer->state.query.active_query.bo) {
1574 v3dv_cl_address(cmd_buffer->state.query.active_query.bo,
1575 cmd_buffer->state.query.active_query.offset);
1579 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_OCCLUSION_QUERY;
1586 assert(cmd_buffer->state.subpass_idx != -1);
1590 cmd_buffer->state.subpass_idx);
1604 struct v3dv_cmd_buffer_state *p_state = &primary->state;
1605 struct v3dv_cmd_buffer_state *s_state = &secondary->state;
1618 &secondary->state.query.end.states[i];
1633 assert(primary->state.job);
1635 /* Emit occlusion query state if needed so the draw calls inside our
1639 primary->state.dirty & V3DV_CMD_DIRTY_OCCLUSION_QUERY;
1680 struct v3dv_job *primary_job = primary->state.job;
1694 * occlusion query state.
1745 * copy this state to the primary so it is processed properly when the
1750 /* If this secondary had any pending barrier state we will need that
1751 * barrier state consumed with whatever comes next in the primary.
1753 assert(secondary->state.barrier.dst_mask ||
1754 (!secondary->state.barrier.bcl_buffer_access &&
1755 !secondary->state.barrier.bcl_image_access));
1757 pending_barrier = secondary->state.barrier;
1761 v3dv_cmd_buffer_merge_barrier_state(&primary->state.barrier,
1880 struct v3dv_job *job = cmd_buffer->state.job;
1883 struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
1884 struct v3dv_pipeline *pipeline = state->gfx.pipeline;
1948 cmd_buffer->state.uniforms.gs_bin,
1950 cmd_buffer->state.uniforms.gs);
1992 shader.coordinate_shader_uniforms_address = cmd_buffer->state.uniforms.vs_bin;
1993 shader.vertex_shader_uniforms_address = cmd_buffer->state.uniforms.vs;
1994 shader.fragment_shader_uniforms_address = cmd_buffer->state.uniforms.fs;
2027 struct v3dv_vertex_binding *c_vb = &cmd_buffer->state.vertex_bindings[binding];
2086 if (cmd_buffer->state.dirty & V3DV_CMD_DIRTY_PIPELINE) {
2099 cl_emit(&job->bcl, GL_SHADER_STATE_INCLUDING_GS, state) {
2100 state.address = v3dv_cl_address(job->indirect.bo, shader_rec_offset);
2101 state.number_of_attribute_arrays = num_elements_to_emit;
2104 cl_emit(&job->bcl, GL_SHADER_STATE, state) {
2105 state.address = v3dv_cl_address(job->indirect.bo, shader_rec_offset);
2106 state.number_of_attribute_arrays = num_elements_to_emit;
2115 cmd_buffer->state.dirty &= ~(V3DV_CMD_DIRTY_VERTEX_BUFFER |
2118 cmd_buffer->state.dirty_descriptor_stages &= ~VK_SHADER_STAGE_ALL_GRAPHICS;
2119 cmd_buffer->state.dirty_push_constants_stages &= ~VK_SHADER_STAGE_ALL_GRAPHICS;
2126 struct v3dv_job *job = cmd_buffer->state.job;
2129 struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
2130 struct v3dv_pipeline *pipeline = state->gfx.pipeline;
2173 struct v3dv_job *job = cmd_buffer->state.job;
2176 /* We flag all state as dirty when we create a new job so make sure we
2177 * have a valid index buffer before attempting to emit state for it.
2180 v3dv_buffer_from_handle(cmd_buffer->state.index_buffer.buffer);
2186 const uint32_t offset = cmd_buffer->state.index_buffer.offset;
2194 cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_INDEX_BUFFER;
2205 struct v3dv_job *job = cmd_buffer->state.job;
2208 const struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
2210 uint8_t index_type = ffs(cmd_buffer->state.index_buffer.index_size) - 1;
2211 uint32_t index_offset = firstIndex * cmd_buffer->state.index_buffer.index_size;
2259 struct v3dv_job *job = cmd_buffer->state.job;
2262 const struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
2285 struct v3dv_job *job = cmd_buffer->state.job;
2288 const struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
2290 uint8_t index_type = ffs(cmd_buffer->state.index_buffer.index_size) - 1;
2314 const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
2316 assert(state->subpass_idx < state->pass->subpass_count);
2318 &state->pass->subpasses[state->subpass_idx];
2328 assert(attachment_idx < state->framebuffer->attachment_count &&
2329 attachment_idx < state->attachment_alloc_count);
2330 struct v3dv_image_view *iview = state->attachments[attachment_idx].image_view;