Lines Matching defs:state

39  * entrypoints.  This file is concerned entirely with state emission and
47 struct anv_cmd_state *state = &cmd_buffer->state;
49 memset(state, 0, sizeof(*state));
51 state->current_pipeline = UINT32_MAX;
52 state->gfx.restart_index = UINT32_MAX;
53 state->gfx.dirty = 0;
72 struct anv_cmd_state *state = &cmd_buffer->state;
74 anv_cmd_pipeline_state_finish(cmd_buffer, &state->gfx.base);
75 anv_cmd_pipeline_state_finish(cmd_buffer, &state->compute.base);
107 &cmd_buffer->state.gfx.sample_locations;
285 assert(stage < ARRAY_SIZE(cmd_buffer->state.surface_sha1s));
286 if (mem_update(cmd_buffer->state.surface_sha1s[stage],
288 cmd_buffer->state.descriptors_dirty |= mesa_to_vk_shader_stage(stage);
290 assert(stage < ARRAY_SIZE(cmd_buffer->state.sampler_sha1s));
291 if (mem_update(cmd_buffer->state.sampler_sha1s[stage],
293 cmd_buffer->state.descriptors_dirty |= mesa_to_vk_shader_stage(stage);
295 assert(stage < ARRAY_SIZE(cmd_buffer->state.push_sha1s));
296 if (mem_update(cmd_buffer->state.push_sha1s[stage],
298 cmd_buffer->state.push_constants_dirty |= mesa_to_vk_shader_stage(stage);
321 (!cmd_buffer->state.ray_query_shadow_bo ||
322 cmd_buffer->state.ray_query_shadow_bo->size < ray_shadow_size)) {
347 cmd_buffer->state.ray_query_shadow_bo = bo;
352 cmd_buffer->state.ray_query_shadow_bo);
370 cmd_buffer->state.push_constants_dirty |= stages;
380 struct anv_cmd_pipeline_state *state;
387 if (cmd_buffer->state.compute.pipeline == compute_pipeline)
390 cmd_buffer->state.compute.pipeline = compute_pipeline;
391 cmd_buffer->state.compute.pipeline_dirty = true;
395 state = &cmd_buffer->state.compute.base;
403 if (cmd_buffer->state.gfx.pipeline == gfx_pipeline)
406 cmd_buffer->state.gfx.pipeline = gfx_pipeline;
407 cmd_buffer->state.gfx.vb_dirty |= gfx_pipeline->vb_used;
408 cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_PIPELINE;
415 /* Apply the non dynamic state from the pipeline */
419 state = &cmd_buffer->state.gfx.base;
427 if (cmd_buffer->state.rt.pipeline == rt_pipeline)
430 cmd_buffer->state.rt.pipeline = rt_pipeline;
431 cmd_buffer->state.rt.pipeline_dirty = true;
438 state = &cmd_buffer->state.rt.base;
448 anv_cmd_buffer_set_ray_query_buffer(cmd_buffer, state, pipeline, stages);
483 pipe_state = &cmd_buffer->state.gfx.base;
488 pipe_state = &cmd_buffer->state.compute.base;
498 pipe_state = &cmd_buffer->state.rt.base;
572 cmd_buffer->state.descriptors_dirty |= dirty_stages;
573 cmd_buffer->state.push_constants_dirty |= dirty_stages;
610 struct anv_vertex_binding *vb = cmd_buffer->state.vertex_bindings;
631 cmd_buffer->state.gfx.vb_dirty |= 1 << (firstBinding + i);
649 struct anv_xfb_binding *xfb = cmd_buffer->state.xfb_bindings;
692 struct anv_state state;
694 state = anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, size, alignment);
695 memcpy(state.map, data, size);
697 VG(VALGRIND_CHECK_MEM_IS_DEFINED(state.map, size));
699 return state;
707 struct anv_state state;
710 state = anv_cmd_buffer_alloc_dynamic_state(cmd_buffer,
712 p = state.map;
718 return state;
725 &cmd_buffer->state.gfx.base.push_constants;
727 struct anv_state state =
731 memcpy(state.map, data, sizeof(struct anv_push_constants));
733 return state;
741 &cmd_buffer->state.compute.base.push_constants;
742 struct anv_compute_pipeline *pipeline = cmd_buffer->state.compute.pipeline;
757 struct anv_state state;
759 state = anv_state_stream_alloc(&cmd_buffer->general_state_stream,
763 state = anv_cmd_buffer_alloc_dynamic_state(cmd_buffer,
768 void *dst = state.map;
790 return state;
807 &cmd_buffer->state.gfx.base;
813 &cmd_buffer->state.compute.base;
824 &cmd_buffer->state.rt.base;
829 cmd_buffer->state.push_constants_dirty |= stageFlags;
842 pipe_state = &cmd_buffer->state.gfx.base;
846 pipe_state = &cmd_buffer->state.compute.base;
850 pipe_state = &cmd_buffer->state.rt.base;
1064 struct anv_cmd_ray_tracing_state *rt = &cmd_buffer->state.rt;