Lines Matching defs:state
153 * structure defining which properties of the pipeline state object are
154 * dynamic and can be changed independently of the pipeline state. This
155 * can be NULL, which means no state in the pipeline is considered
207 unreachable("Unsupported dynamic graphics state");
444 * the graphics pipeline state then depth clipping is disabled if
642 * this state.
890 /* If we already have render pass state and it has attachment info, then
919 /* From the Vulkan 1.3.218 spec description of pre-rasterization state:
921 * "Fragment shader state is defined by:
927 * The description of fragment shader state contains identical text.
999 vk_graphics_pipeline_state_groups(const struct vk_graphics_pipeline_state *state)
1001 /* For now, we just validate dynamic state */
1005 if (state->s != NULL) groups |= STATE
1011 return groups | fully_dynamic_state_groups(state->dynamic);
1015 vk_graphics_pipeline_state_validate(const struct vk_graphics_pipeline_state *state)
1018 /* For now, we just validate dynamic state */
1020 vk_graphics_pipeline_state_groups(state);
1021 validate_dynamic_state_groups(state->dynamic, groups);
1026 may_have_rasterization(const struct vk_graphics_pipeline_state *state,
1030 if (state->rs) {
1032 return !state->rs->rasterizer_discard_enable;
1041 struct vk_graphics_pipeline_state *state,
1049 vk_graphics_pipeline_state_validate(state);
1055 state->shader_stages |= info->pStages[i].stage;
1062 * First, figure out which library-level shader/state groups we need
1074 * shader state, with other subsets included depending on that state.
1075 * If the pre-rasterization shader state includes a vertex shader,
1076 * then vertex input state is included in a complete graphics
1079 * the pre-rasterization shader state is VK_FALSE or the
1080 * VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state is
1081 * enabled fragment shader state and fragment output interface state
1086 if (state->shader_stages & VK_SHADER_STAGE_VERTEX_BIT)
1089 if (may_have_rasterization(state, dynamic, info)) {
1097 * de-duplicates things like FSR and multisample state which appear in
1112 vk_render_pass_state_init(&rp, state->rp, info, sp_info, lib);
1116 /* If the old state was incomplete but the new one isn't, set state->rp
1119 if (state->rp != NULL &&
1120 !vk_render_pass_state_is_complete(state->rp) &&
1122 state->rp = NULL;
1131 * state the stage member of one element of pStages must be either
1134 assert(state->shader_stages & (VK_SHADER_STAGE_VERTEX_BIT |
1137 if (state->shader_stages & (VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT |
1141 if (may_have_rasterization(state, dynamic, info))
1154 * "Fragment shader state is defined by:
1163 * "If the pipeline is being created with fragment shader state
1178 * created with fragment shader state, and subpass uses a
1186 * with fragment shader state and fragment output interface state,
1195 * with fragment shader state but not fragment output interface
1196 * state, pDepthStencilState must be a valid pointer to a valid
1201 * state, we will also have a valid set of aspects. In the third case
1202 * where we only have fragment shader state and no render pass, the
1223 if (state->s != NULL) needs &= ~STATE
1229 /* Filter dynamic state down to just what we're adding */
1235 BITSET_OR(state->dynamic, state->dynamic, dynamic);
1238 * If a state is fully dynamic, we don't need to even allocate them. Do
1239 * this after we've filtered dynamic state because we still want them to
1240 * show up in the dynamic state but don't want the actual state.
1242 needs &= ~fully_dynamic_state_groups(state->dynamic);
1330 state->s = new_##s; \
1333 /* render pass state is special and we just copy it */
1363 /* Render pass state needs special care because a render pass state may be
1371 #define MERGE(STATE, type, state) \
1372 if (dst->state == NULL && src->state != NULL) dst->state = src->state;
1457 * pointer in the dynamic state struct. If not, they don't support them
1458 * as dynamic state and we should leave them alone.
1480 #define SET_DYN_VALUE(dst, STATE, state, value) do { \
1482 (dst)->state != (value)) { \
1483 (dst)->state = (value); \
1484 assert((dst)->state == (value)); \
1490 #define SET_DYN_BOOL(dst, STATE, state, value) \
1491 SET_DYN_VALUE(dst, STATE, state, (bool)value);
1493 #define SET_DYN_ARRAY(dst, STATE, state, start, count, src) do { \
1494 assert(start + count <= ARRAY_SIZE((dst)->state)); \
1495 STATIC_ASSERT(sizeof(*(dst)->state) == sizeof(*(src))); \
1496 const size_t __state_size = sizeof(*(dst)->state) * (count); \
1498 memcmp((dst)->state + start, src, __state_size)) { \
1499 memcpy((dst)->state + start, src, __state_size); \
1512 #define COPY_MEMBER(STATE, state) \
1513 SET_DYN_VALUE(dst, STATE, state, src->state)
1515 #define COPY_ARRAY(STATE, state, count) \
1516 SET_DYN_ARRAY(dst, STATE, state, 0, count, src->state)
1518 #define COPY_IF_SET(STATE, state) \
1519 if (IS_SET_IN_SRC(STATE)) SET_DYN_VALUE(dst, STATE, state, src->state)
1650 const struct vk_dynamic_graphics_state *state)
1652 vk_dynamic_graphics_state_copy(&cmd->dynamic_graphics_state, state);