Lines Matching refs:state
101 if (ctx->batch.state && !screen->device_lost) {
137 if (ctx->batch.state) {
138 zink_clear_batch_state(ctx, ctx->batch.state);
139 zink_batch_state_destroy(screen, ctx->batch.state);
333 const struct pipe_sampler_state *state)
342 if (screen->info.have_EXT_non_seamless_cube_map && !state->seamless_cube_map)
344 sci.unnormalizedCoordinates = !state->normalized_coords;
345 sci.magFilter = zink_filter(state->mag_img_filter);
349 sci.minFilter = zink_filter(state->min_img_filter);
354 switch (state->reduction_mode) {
365 if (state->reduction_mode)
370 } else if (state->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
371 sci.mipmapMode = sampler_mipmap_mode(state->min_mip_filter);
372 sci.minLod = state->min_lod;
373 sci.maxLod = state->max_lod;
381 sci.addressModeU = sampler_address_mode(state->wrap_s);
382 sci.addressModeV = sampler_address_mode(state->wrap_t);
383 sci.addressModeW = sampler_address_mode(state->wrap_r);
388 sci.mipLodBias = CLAMP(state->lod_bias,
392 need_custom |= wrap_needs_border_color(state->wrap_s);
393 need_custom |= wrap_needs_border_color(state->wrap_t);
394 need_custom |= wrap_needs_border_color(state->wrap_r);
396 if (state->compare_mode == PIPE_TEX_COMPARE_NONE)
399 sci.compareOp = compare_op(state->compare_func);
403 bool is_integer = state->border_color_is_integer;
405 sci.borderColor = get_border_color(&state->border_color, is_integer, need_custom);
413 (screen->info.border_color_feats.customBorderColorWithoutFormat || state->border_color_format)) {
424 clamped_border_color.f[i] = CLAMP(state->border_color.f[0], 0, 1);
426 if (memcmp(&state->border_color, &clamped_border_color, sizeof(clamped_border_color)) != 0) {
435 cbci.format = screen->info.border_color_feats.customBorderColorWithoutFormat ? VK_FORMAT_UNDEFINED : zink_get_format(screen, state->border_color_format);
437 memcpy(&cbci.customBorderColor, &state->border_color, sizeof(union pipe_color_union));
448 if (state->max_anisotropy > 1) {
449 sci.maxAnisotropy = state->max_anisotropy;
477 sampler->emulate_nonseamless = !state->seamless_cube_map;
605 struct zink_sampler_state *state = ctx->sampler_states[shader][slot];
608 state->sampler_clamped :
609 state->sampler;
698 struct zink_sampler_state *state = samplers[i];
699 if (ctx->sampler_states[shader][start_slot + i] != state)
704 ctx->sampler_states[shader][start_slot + i] = state;
705 if (state) {
706 ctx->di.textures[shader][start_slot + i].sampler = state->sampler;
707 if (state->sampler_clamped && !screen->have_D24_UNORM_S8_UINT) {
712 ctx->di.textures[shader][start_slot + i].sampler = state->sampler_clamped;
714 zink_batch_usage_set(&state->batch_uses, ctx->batch.state);
718 if (state->emulate_nonseamless)
720 if (state->emulate_nonseamless != was_nonseamless && (ctx->di.cubes[shader] & bit)) {
746 if (batch->state) {
747 util_dynarray_append(&batch->state->zombie_samplers, VkSampler,
750 util_dynarray_append(&batch->state->zombie_samplers, VkSampler,
886 const struct pipe_sampler_view *state)
894 sampler_view->base = *state;
900 if (state->target != PIPE_BUFFER) {
904 templ.u.tex.level = state->u.tex.first_level;
905 templ.format = state->format;
906 if (state->target != PIPE_TEXTURE_3D) {
907 templ.u.tex.first_layer = state->u.tex.first_layer;
908 templ.u.tex.last_layer = state->u.tex.last_layer;
918 ivci = create_ivci(screen, res, &templ, state->target);
919 ivci.subresourceRange.levelCount = state->u.tex.last_level - state->u.tex.first_level + 1;
920 ivci.subresourceRange.aspectMask = sampler_aspect_from_format(state->format);
928 * When the state tracker asks for 000x swizzles, this is depth mode GL_ALPHA,
945 if (zink_format_is_voidable_rgba_variant(state->format)) {
946 const struct util_format_description *desc = util_format_description(state->format);
966 VkBufferViewCreateInfo bvci = create_bvci(ctx, res, state->format, state->u.buf.offset, state->u.buf.size);
1190 const struct pipe_viewport_state *state)
1195 ctx->vp_state.viewport_states[start_slot + i] = state[i];
1644 zink_batch_usage_set(&image_view->buffer_view->batch_uses, ctx->batch.state);
1657 zink_batch_usage_set(&image_view->surface->batch_uses, ctx->batch.state);
1763 zink_batch_usage_set(&b->buffer_view->batch_uses, ctx->batch.state);
1781 zink_batch_usage_set(&b->cube_array->batch_uses, ctx->batch.state);
1784 zink_batch_usage_set(&b->image_view->batch_uses, ctx->batch.state);
1821 zink_create_texture_handle(struct pipe_context *pctx, struct pipe_sampler_view *view, const struct pipe_sampler_state *state)
1831 bd->sampler = pctx->create_sampler_state(pctx, state);
1861 util_dynarray_append(&ctx->batch.state->bindless_releases[0], uint32_t, h);
2008 util_dynarray_append(&ctx->batch.state->bindless_releases[1], uint32_t, h);
2124 VKCTX(CmdSetPatchControlPointsEXT)(ctx->batch.state->cmdbuf, patch_vertices);
2361 VKCTX(CmdBeginRendering)(ctx->batch.state->cmdbuf, &ctx->dynamic_fb.info);
2408 VKCTX(CmdEndRendering)(ctx->batch.state->cmdbuf);
2439 zink_batch_usage_set(&surf->batch_uses, ctx->batch.state);
2453 layout = zink_render_pass_attachment_get_barrier_info(&ctx->gfx_pipeline_state.render_pass->state.rts[i],
2604 zink_batch_usage_set(&sampler_state->batch_uses, ctx->batch.state);
2607 zink_batch_usage_set(&sv->buffer_view->batch_uses, ctx->batch.state);
2609 zink_batch_usage_set(&sv->image_view->batch_uses, ctx->batch.state);
2611 zink_batch_usage_set(&sv->cube_array->batch_uses, ctx->batch.state);
2616 zink_batch_usage_set(&iv->buffer_view->batch_uses, ctx->batch.state);
2618 zink_batch_usage_set(&iv->surface->batch_uses, ctx->batch.state);
2672 VKCTX(CmdSetColorWriteEnableEXT)(ctx->batch.state->cmdbuf, max_att, ctx->disable_color_writes ? disables : enables);
2675 VKCTX(CmdSetDepthWriteEnableEXT)(ctx->batch.state->cmdbuf, ctx->disable_color_writes ? VK_FALSE : ctx->dsa_state->hw_state.depth_write);
2701 sync_flush(ctx, ctx->batch.state);
2703 if (ctx->batch.state->is_device_lost) {
2722 VKCTX(CmdSetPatchControlPointsEXT)(ctx->batch.state->cmdbuf, ctx->gfx_pipeline_state.dyn_state2.vertices_per_patch);
2807 const struct pipe_framebuffer_state *state)
2810 unsigned samples = state->nr_cbufs || state->zsbuf ? 0 : state->samples;
2813 unsigned layers = MAX2(zink_framebuffer_get_num_layers(state), 1);
2817 state->width != w || state->height != h);
2819 if (i >= state->nr_cbufs || ctx->fb_state.cbufs[i] != state->cbufs[i])
2822 if (ctx->fb_state.zsbuf != state->zsbuf)
2828 if (i < state->nr_cbufs)
2829 ctx->rp_changed |= !!zink_transient_surface(psurf) != !!zink_transient_surface(state->cbufs[i]);
2830 unbind_fb_surface(ctx, psurf, i, i >= state->nr_cbufs || psurf != state->cbufs[i]);
2837 bool changed = psurf != state->zsbuf;
2840 ctx->rp_changed |= !!zink_transient_surface(psurf) != !!zink_transient_surface(state->zsbuf);
2848 ctx->rp_changed |= ctx->fb_state.nr_cbufs != state->nr_cbufs;
2849 ctx->rp_changed |= !!ctx->fb_state.zsbuf != !!state->zsbuf;
2851 util_copy_framebuffer_state(&ctx->fb_state, state);
2860 ctx->dynamic_fb.info.renderArea.extent.width = state->width;
2861 ctx->dynamic_fb.info.renderArea.extent.height = state->height;
3187 if (is_write && zink_batch_usage_matches(res->obj->bo->reads, ctx->batch.state) && !res->obj->unordered_read)
3190 return res->obj->unordered_write || !zink_batch_usage_matches(res->obj->bo->writes, ctx->batch.state);
3206 ctx->batch.state->has_barriers = true;
3207 return ctx->batch.state->barrier_cmdbuf;
3210 return ctx->batch.state->cmdbuf;
3437 fence = &batch->state->fence;
3438 submit_count = batch->state->submit_count;
3510 assert(ctx->batch.state);
3532 if (!ctx->framebuffer || !ctx->framebuffer->state.num_attachments)
3566 VKCTX(CmdPipelineBarrier2)(ctx->batch.state->cmdbuf, &dep);
3573 ctx->batch.state->cmdbuf,
3594 VKCTX(CmdPipelineBarrier)(batch->state->cmdbuf, src_stage, dst_stage, 0, 1, &mb, 0, NULL, 0, NULL);
4071 ctx->batch.state->cmdbuf :
4414 screen->vk.CmdInsertDebugUtilsLabelEXT(batch->state->cmdbuf, &label);
4614 if (!ctx->batch.state)
4644 VKCTX(CmdSetPatchControlPointsEXT)(ctx->batch.state->cmdbuf, 1);