Lines Matching refs:state

98        * the surface state, there is no shader w/a required.
162 struct crocus_sampler_view *texture = ice->state.shaders[stage].textures[s];
174 screen->vtbl.fill_clamp_mask(ice->state.shaders[stage].samplers[s], s, key->gl_clamp_mask);
1292 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_VERTEX];
1317 ice->state.dirty |= CROCUS_DIRTY_GEN8_VF_SGVS;
1318 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_VS |
1333 if (ice->state.vs_uses_draw_params != uses_draw_params ||
1334 ice->state.vs_uses_derived_draw_params != uses_derived_draw_params ||
1335 ice->state.vs_needs_edge_flag != ish->needs_edge_flag ||
1336 ice->state.vs_uses_vertexid != vs_prog_data->uses_vertexid ||
1337 ice->state.vs_uses_instanceid != vs_prog_data->uses_instanceid) {
1338 ice->state.dirty |= CROCUS_DIRTY_VERTEX_BUFFERS |
1341 ice->state.vs_uses_draw_params = uses_draw_params;
1342 ice->state.vs_uses_derived_draw_params = uses_derived_draw_params;
1343 ice->state.vs_needs_sgvs_element = needs_sgvs_element;
1344 ice->state.vs_needs_edge_flag = ish->needs_edge_flag;
1345 ice->state.vs_uses_vertexid = vs_prog_data->uses_vertexid;
1346 ice->state.vs_uses_instanceid = vs_prog_data->uses_instanceid;
1519 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_TESS_CTRL];
1531 .input_vertices = ice->state.vertices_per_patch,
1555 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_TCS |
1663 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_TESS_EVAL];
1688 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_TES |
1697 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_CONSTANTS_TES;
1698 ice->state.shaders[MESA_SHADER_TESS_EVAL].sysvals_need_upload = true;
1804 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_GEOMETRY];
1832 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_GS |
1938 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_FRAGMENT];
1965 ice->state.dirty |= CROCUS_DIRTY_WM;
1968 ice->state.dirty |= CROCUS_DIRTY_GEN4_CLIP_PROG | CROCUS_DIRTY_GEN4_SF_PROG;
1970 ice->state.dirty |= CROCUS_DIRTY_CLIP | CROCUS_DIRTY_GEN6_BLEND_STATE;
1972 ice->state.dirty |= CROCUS_DIRTY_RASTER;
1974 ice->state.dirty |= CROCUS_DIRTY_GEN7_SBE;
1975 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_FS |
2001 ice->state.num_viewports =
2003 ice->state.dirty |= CROCUS_DIRTY_SF_CL_VIEWPORT |
2006 ice->state.dirty |= CROCUS_DIRTY_GEN4_CLIP_PROG | CROCUS_DIRTY_GEN4_SF_PROG;
2009 ice->state.dirty |= CROCUS_DIRTY_GEN4_FF_GS_PROG;
2012 ice->state.dirty |= CROCUS_DIRTY_CLIP |
2014 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_UNCOMPILED_FS |
2015 ice->state.stage_dirty_for_nos[CROCUS_NOS_LAST_VUE_MAP];
2019 ice->state.dirty |= CROCUS_DIRTY_GEN7_SBE;
2021 ice->state.dirty |= CROCUS_DIRTY_GEN4_FF_GS_PROG;
2022 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_UNCOMPILED_FS;
2037 struct crocus_shader_state *shs = &ice->state.shaders[stage];
2052 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_BINDINGS_VS << stage;
2114 key.primitive = ice->state.reduced_prim_mode;
2182 if (ice->state.framebuffer.zsbuf)
2183 mrd = util_get_depth_format_mrd(util_format_description(ice->state.framebuffer.zsbuf->format));
2216 ice->state.dirty |= CROCUS_DIRTY_CLIP;
2262 switch (ice->state.reduced_prim_mode) {
2309 ice->state.dirty |= CROCUS_DIRTY_RASTER;
2367 key.primitive = screen->vtbl.translate_prim_type(ice->state.prim_mode, 0);
2380 key.need_gs_prog = ice->state.streamout_active;
2401 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_GS;
2403 ice->state.dirty |= CROCUS_DIRTY_GEN6_URB;
2407 ice->state.last_xfb_verts_per_prim = gs_prog_data->svbi_postincrement_value;
2416 * Update the current shader variants for the given state.
2419 * shaders are bound. It will also flag any dirty state triggered by
2426 const uint64_t stage_dirty = ice->state.stage_dirty;
2429 if (!(ice->state.dirty & CROCUS_DIRTY_GEN6_URB)) {
2444 ice->state.stage_dirty |=
2480 ice->state.dirty |= CROCUS_DIRTY_CLIP;
2491 if (ice->state.streamout != shader->streamout) {
2492 ice->state.streamout = shader->streamout;
2493 ice->state.dirty |= CROCUS_DIRTY_SO_DECL_LIST | CROCUS_DIRTY_STREAMOUT;
2496 if (ice->state.streamout_active) {
2500 /* use ice->state version as last_vue_map can dirty this bit */
2501 if (ice->state.stage_dirty & CROCUS_STAGE_DIRTY_UNCOMPILED_FS)
2505 if (ice->state.dirty & CROCUS_DIRTY_GEN4_FF_GS_PROG &&
2511 if (ice->state.dirty & CROCUS_DIRTY_GEN4_CLIP_PROG)
2513 if (ice->state.dirty & CROCUS_DIRTY_GEN4_SF_PROG)
2519 if (!(ice->state.dirty & CROCUS_DIRTY_GEN6_URB)) {
2525 ice->state.dirty |= CROCUS_DIRTY_GEN6_URB;
2531 if (ice->state.stage_dirty & CROCUS_RENDER_STAGE_DIRTY_CONSTANTS) {
2533 if (ice->state.stage_dirty & (CROCUS_STAGE_DIRTY_CONSTANTS_VS << i))
2606 struct crocus_shader_state *shs = &ice->state.shaders[MESA_SHADER_COMPUTE];
2630 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_CS |
2640 if (ice->state.stage_dirty & CROCUS_STAGE_DIRTY_UNCOMPILED_CS)
2643 if (ice->state.stage_dirty & CROCUS_STAGE_DIRTY_CONSTANTS_CS)
2691 * Performs basic NIR preprocessing, records any state dependencies, and
2745 const struct pipe_shader_state *state)
2749 if (state->type == PIPE_SHADER_IR_TGSI)
2750 nir = tgsi_to_nir(state->tokens, ctx->screen, false);
2752 nir = state->ir.nir;
2754 return crocus_create_uncompiled_shader(ctx, nir, &state->stream_output);
2759 const struct pipe_shader_state *state)
2763 struct crocus_uncompiled_shader *ish = crocus_create_shader_state(ctx, state);
2786 const struct pipe_shader_state *state)
2790 struct crocus_uncompiled_shader *ish = crocus_create_shader_state(ctx, state);
2816 const struct pipe_shader_state *state)
2820 struct crocus_uncompiled_shader *ish = crocus_create_shader_state(ctx, state);
2845 const struct pipe_shader_state *state)
2849 struct crocus_uncompiled_shader *ish = crocus_create_shader_state(ctx, state);
2868 const struct pipe_shader_state *state)
2872 struct crocus_uncompiled_shader *ish = crocus_create_shader_state(ctx, state);
2921 const struct pipe_compute_state *state)
2923 assert(state->ir_type == PIPE_SHADER_IR_NIR);
2928 crocus_create_uncompiled_shader(ctx, (void *) state->prog, NULL);
2949 crocus_delete_shader_state(struct pipe_context *ctx, void *state, gl_shader_stage stage)
2951 struct crocus_uncompiled_shader *ish = state;
2956 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_UNCOMPILED_VS << stage;
2969 crocus_delete_vs_state(struct pipe_context *ctx, void *state)
2971 crocus_delete_shader_state(ctx, state, MESA_SHADER_VERTEX);
2975 crocus_delete_tcs_state(struct pipe_context *ctx, void *state)
2977 crocus_delete_shader_state(ctx, state, MESA_SHADER_TESS_CTRL);
2981 crocus_delete_tes_state(struct pipe_context *ctx, void *state)
2983 crocus_delete_shader_state(ctx, state, MESA_SHADER_TESS_EVAL);
2987 crocus_delete_gs_state(struct pipe_context *ctx, void *state)
2989 crocus_delete_shader_state(ctx, state, MESA_SHADER_GEOMETRY);
2993 crocus_delete_fs_state(struct pipe_context *ctx, void *state)
2995 crocus_delete_shader_state(ctx, state, MESA_SHADER_FRAGMENT);
2999 crocus_delete_cs_state(struct pipe_context *ctx, void *state)
3001 crocus_delete_shader_state(ctx, state, MESA_SHADER_COMPUTE);
3023 ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_SAMPLER_STATES_VS << stage;
3027 ice->state.stage_dirty |= dirty_bit;
3034 ice->state.stage_dirty_for_nos[i] |= dirty_bit;
3036 ice->state.stage_dirty_for_nos[i] &= ~dirty_bit;
3041 crocus_bind_vs_state(struct pipe_context *ctx, void *state)
3044 struct crocus_uncompiled_shader *new_ish = state;
3049 ice->state.window_space_position !=
3051 ice->state.window_space_position =
3054 ice->state.dirty |= CROCUS_DIRTY_CLIP |
3060 ice->state.stage_dirty |= CROCUS_DIRTY_GEN4_FF_GS_PROG;
3063 bind_shader_state((void *) ctx, state, MESA_SHADER_VERTEX);
3067 crocus_bind_tcs_state(struct pipe_context *ctx, void *state)
3069 bind_shader_state((void *) ctx, state, MESA_SHADER_TESS_CTRL);
3073 crocus_bind_tes_state(struct pipe_context *ctx, void *state)
3078 if (!!state != !!ice->shaders.uncompiled[MESA_SHADER_TESS_EVAL])
3079 ice->state.dirty |= CROCUS_DIRTY_GEN6_URB;
3081 bind_shader_state((void *) ctx, state, MESA_SHADER_TESS_EVAL);
3085 crocus_bind_gs_state(struct pipe_context *ctx, void *state)
3090 if (!!state != !!ice->shaders.uncompiled[MESA_SHADER_GEOMETRY])
3091 ice->state.dirty |= CROCUS_DIRTY_GEN6_URB;
3093 bind_shader_state((void *) ctx, state, MESA_SHADER_GEOMETRY);
3097 crocus_bind_fs_state(struct pipe_context *ctx, void *state)
3104 struct crocus_uncompiled_shader *new_ish = state;
3115 ice->state.dirty |= CROCUS_DIRTY_GEN8_PS_BLEND;
3117 ice->state.dirty |= CROCUS_DIRTY_WM;
3121 ice->state.dirty |= CROCUS_DIRTY_GEN8_PMA_FIX;
3122 bind_shader_state((void *) ctx, state, MESA_SHADER_FRAGMENT);
3126 crocus_bind_cs_state(struct pipe_context *ctx, void *state)
3128 bind_shader_state((void *) ctx, state, MESA_SHADER_COMPUTE);