Lines Matching defs:gfx

1566    struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
1572 gfx->att_states =
1575 if (gfx->att_states.map == NULL) {
1580 struct anv_state next_state = gfx->att_states;
1583 gfx->null_surface_state = next_state;
1587 gfx->color_att_count = color_att_count;
1589 gfx->color_att[i] = (struct anv_attachment) {
1595 gfx->depth_att = (struct anv_attachment) { };
1596 gfx->stencil_att = (struct anv_attachment) { };
1604 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
1606 gfx->render_area = (VkRect2D) { };
1607 gfx->layer_count = 0;
1608 gfx->samples = 0;
1610 gfx->color_att_count = 0;
1611 gfx->depth_att = (struct anv_attachment) { };
1612 gfx->stencil_att = (struct anv_attachment) { };
1613 gfx->null_surface_state = ANV_STATE_NULL;
1696 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
1711 gfx->rendering_flags = inheritance_info->flags;
1712 gfx->render_area = (VkRect2D) { };
1713 gfx->layer_count = 0;
1714 gfx->samples = inheritance_info->rasterizationSamples;
1715 gfx->view_mask = inheritance_info->viewMask;
1723 gfx->color_att[i].vk_format =
1726 gfx->depth_att.vk_format =
1728 gfx->stencil_att.vk_format =
1731 cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_RENDER_TARGETS;
1893 struct anv_state src_state = primary->state.gfx.att_states;
1894 struct anv_state dst_state = secondary->state.gfx.att_states;
1940 primary->state.gfx.push_constant_stages = 0;
2361 memset(cmd_buffer->state.gfx.vb_dirty_ranges, 0,
2362 sizeof(cmd_buffer->state.gfx.vb_dirty_ranges));
2363 memset(&cmd_buffer->state.gfx.ib_dirty_range, 0,
2364 sizeof(cmd_buffer->state.gfx.ib_dirty_range));
2488 cmd_buffer->state.gfx.pipeline->active_stages;
2496 if (anv_pipeline_is_primitive(cmd_buffer->state.gfx.pipeline))
2499 if (stages == cmd_buffer->state.gfx.push_constant_stages)
2550 cmd_buffer->state.gfx.push_constant_stages = stages;
2606 if (binding->index < cmd_buffer->state.gfx.color_att_count) {
2608 &cmd_buffer->state.gfx.color_att[binding->index];
2611 surface_state = cmd_buffer->state.gfx.null_surface_state;
3017 struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3096 const struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3161 const struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3270 const struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3315 struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3434 struct anv_cmd_graphics_state *gfx_state = &cmd_buffer->state.gfx;
3454 cmd_buffer->state.gfx.base.push_constants.client_data,
3477 cmd_buffer->state.gfx.base.push_constants.client_data,
3493 if (!(cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) &&
3506 genX(raster_polygon_mode)(cmd_buffer->state.gfx.pipeline,
3521 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
3545 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
3554 cmd_buffer->state.gfx.pipeline->negative_one_to_one;
3588 if (gfx->render_area.extent.width > 0 &&
3589 gfx->render_area.extent.height > 0) {
3590 x_min = MAX2(x_min, gfx->render_area.offset.x);
3591 x_max = MIN2(x_min, gfx->render_area.offset.x +
3592 gfx->render_area.extent.width);
3593 y_min = MAX2(y_min, gfx->render_area.offset.y);
3594 y_max = MIN2(y_min, gfx->render_area.offset.y +
3595 gfx->render_area.extent.height);
3695 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
3739 y_min = clamp_int64((uint64_t) y_min, gfx->render_area.offset.y, max);
3740 x_min = clamp_int64((uint64_t) x_min, gfx->render_area.offset.x, max);
3742 gfx->render_area.offset.y +
3743 gfx->render_area.extent.height - 1);
3745 gfx->render_area.offset.x +
3746 gfx->render_area.extent.width - 1);
3775 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
3796 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
3815 uint32_t vb_emit = cmd_buffer->state.gfx.vb_dirty & pipeline->vb_used;
3816 if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE)
3889 cmd_buffer->state.gfx.vb_dirty &= ~vb_emit;
3893 if (!cmd_buffer->state.gfx.dirty && !descriptors_dirty &&
3898 if ((cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_XFB_ENABLE) ||
3899 (GFX_VER == 7 && (cmd_buffer->state.gfx.dirty &
3965 if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) {
3997 if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_RENDER_TARGETS)
4010 &cmd_buffer->state.gfx.base,
4038 if ((cmd_buffer->state.gfx.dirty & (ANV_CMD_DIRTY_PIPELINE |
4043 if ((cmd_buffer->state.gfx.dirty & (ANV_CMD_DIRTY_PIPELINE |
4053 if ((cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) ||
4061 cmd_buffer->state.gfx.primitive_topology = topology;
4154 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4202 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4227 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4250 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4277 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4301 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4325 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4349 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4391 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4414 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4433 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4469 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4520 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4535 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4579 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4616 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4636 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
4674 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4803 struct anv_graphics_pipeline *pipeline = cmd_state->gfx.pipeline;
4845 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4871 struct anv_graphics_pipeline *pipeline = cmd_state->gfx.pipeline;
4914 prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
4980 cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_XFB_ENABLE;
5030 cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_XFB_ENABLE;
5111 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
5154 struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
6137 bound = &cmd_buffer->state.gfx.ib_bound_range;
6138 dirty = &cmd_buffer->state.gfx.ib_dirty_range;
6141 assert(vb_index < ARRAY_SIZE(cmd_buffer->state.gfx.vb_bound_ranges));
6142 assert(vb_index < ARRAY_SIZE(cmd_buffer->state.gfx.vb_dirty_ranges));
6143 bound = &cmd_buffer->state.gfx.vb_bound_ranges[vb_index];
6144 dirty = &cmd_buffer->state.gfx.vb_dirty_ranges[vb_index];
6168 struct anv_vb_cache_range *bound = &cmd_buffer->state.gfx.ib_bound_range;
6169 struct anv_vb_cache_range *dirty = &cmd_buffer->state.gfx.ib_dirty_range;
6181 assert(i < ARRAY_SIZE(cmd_buffer->state.gfx.vb_bound_ranges));
6182 assert(i < ARRAY_SIZE(cmd_buffer->state.gfx.vb_dirty_ranges));
6185 bound = &cmd_buffer->state.gfx.vb_bound_ranges[i];
6186 dirty = &cmd_buffer->state.gfx.vb_dirty_ranges[i];
6290 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
6307 if (gfx->depth_att.iview != NULL) {
6308 isl_view = gfx->depth_att.iview->planes[0].isl;
6309 } else if (gfx->stencil_att.iview != NULL) {
6310 isl_view = gfx->stencil_att.iview->planes[0].isl;
6313 if (gfx->view_mask) {
6315 isl_view.array_len >= util_last_bit(gfx->view_mask));
6316 isl_view.array_len = util_last_bit(gfx->view_mask);
6319 isl_view.array_len >= util_last_bit(gfx->layer_count));
6320 isl_view.array_len = gfx->layer_count;
6323 if (gfx->depth_att.iview != NULL) {
6324 const struct anv_image_view *iview = gfx->depth_att.iview;
6343 info.hiz_usage = gfx->depth_att.aux_usage;
6363 if (gfx->stencil_att.iview != NULL) {
6364 const struct anv_image_view *iview = gfx->stencil_att.iview;
6463 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
6475 gfx->rendering_flags = pRenderingInfo->flags;
6476 gfx->render_area = pRenderingInfo->renderArea;
6477 gfx->view_mask = pRenderingInfo->viewMask;
6478 gfx->layer_count = pRenderingInfo->layerCount;
6479 gfx->samples = 0;
6481 const bool is_multiview = gfx->view_mask != 0;
6482 const VkRect2D render_area = gfx->render_area;
6484 is_multiview ? util_last_bit(gfx->view_mask) : gfx->layer_count;
6502 for (uint32_t i = 0; i < gfx->color_att_count; i++) {
6520 assert(gfx->samples == 0 || gfx->samples == iview->vk.image->samples);
6521 gfx->samples |= iview->vk.image->samples;
6533 !(gfx->rendering_flags & VK_RENDERING_RESUMING_BIT)) {
6540 (!is_multiview || (gfx->view_mask & 1)) &&
6550 u_foreach_bit(view, gfx->view_mask) {
6566 gfx->layer_count,
6576 uint32_t clear_layer_count = gfx->layer_count;
6648 gfx->color_att[i].vk_format = iview->vk.format;
6649 gfx->color_att[i].iview = iview;
6650 gfx->color_att[i].layout = att->imageLayout;
6651 gfx->color_att[i].aux_usage = aux_usage;
6669 &gfx->color_att[i].surface_state,
6672 add_surface_state_relocs(cmd_buffer, gfx->color_att[i].surface_state);
6676 (gfx->rendering_flags & VK_RENDERING_RESUMING_BIT)) &&
6681 gfx->color_att[i].surface_state.state,
6688 gfx->color_att[i].resolve_mode = att->resolveMode;
6689 gfx->color_att[i].resolve_iview =
6691 gfx->color_att[i].resolve_layout = att->resolveImageLayout;
6758 assert(gfx->samples == 0 || gfx->samples == ds_iview->vk.image->samples);
6759 gfx->samples |= ds_iview->vk.image->samples;
6763 !(gfx->rendering_flags & VK_RENDERING_RESUMING_BIT))
6766 !(gfx->rendering_flags & VK_RENDERING_RESUMING_BIT))
6782 u_foreach_bit(view, gfx->view_mask) {
6792 gfx->layer_count,
6804 u_foreach_bit(view, gfx->view_mask) {
6817 gfx->layer_count,
6851 uint32_t layer_count = gfx->layer_count;
6876 gfx->depth_att.vk_format = d_iview->vk.format;
6877 gfx->depth_att.iview = d_iview;
6878 gfx->depth_att.layout = depth_layout;
6879 gfx->depth_att.aux_usage = depth_aux_usage;
6882 gfx->depth_att.resolve_mode = d_att->resolveMode;
6883 gfx->depth_att.resolve_iview =
6885 gfx->depth_att.resolve_layout = d_att->resolveImageLayout;
6890 gfx->stencil_att.vk_format = s_iview->vk.format;
6891 gfx->stencil_att.iview = s_iview;
6892 gfx->stencil_att.layout = stencil_layout;
6893 gfx->stencil_att.aux_usage = stencil_aux_usage;
6896 gfx->stencil_att.resolve_mode = s_att->resolveMode;
6897 gfx->stencil_att.resolve_iview =
6899 gfx->stencil_att.resolve_layout = s_att->resolveImageLayout;
6905 assert(util_bitcount(gfx->samples) <= 1);
6907 gfx->null_surface_state.map,
6910 for (uint32_t i = 0; i < gfx->color_att_count; i++) {
6915 gfx->color_att[i].surface_state.state.map,
6921 gfx->dirty |= ANV_CMD_DIRTY_RENDER_TARGETS;
6931 gfx->vb_dirty |= ~0;
6942 gfx->dirty |= ANV_CMD_DIRTY_PIPELINE;
6969 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
6972 if (gfx->view_mask == 0) {
6977 gfx->layer_count);
6979 uint32_t res_view_mask = gfx->view_mask;
7016 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
7034 const VkRect2D render_area = gfx->render_area;
7035 if (gfx->view_mask == 0) {
7048 gfx->layer_count, filter);
7050 uint32_t res_view_mask = gfx->view_mask;
7075 struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
7080 const bool is_multiview = gfx->view_mask != 0;
7082 is_multiview ? util_last_bit(gfx->view_mask) : gfx->layer_count;
7085 for (uint32_t i = 0; i < gfx->color_att_count; i++) {
7086 if (gfx->color_att[i].iview == NULL)
7089 cmd_buffer_mark_attachment_written(cmd_buffer, &gfx->color_att[i],
7093 if (gfx->color_att[i].resolve_mode != VK_RESOLVE_MODE_NONE &&
7094 !(gfx->rendering_flags & VK_RENDERING_SUSPENDING_BIT))
7098 if (gfx->depth_att.iview != NULL) {
7099 cmd_buffer_mark_attachment_written(cmd_buffer, &gfx->depth_att,
7103 if (gfx->stencil_att.iview != NULL) {
7104 cmd_buffer_mark_attachment_written(cmd_buffer, &gfx->stencil_att,
7119 if (gfx->depth_att.resolve_mode != VK_RESOLVE_MODE_NONE ||
7120 gfx->stencil_att.resolve_mode != VK_RESOLVE_MODE_NONE) {
7131 for (uint32_t i = 0; i < gfx->color_att_count; i++) {
7132 const struct anv_attachment *att = &gfx->color_att[i];
7134 (gfx->rendering_flags & VK_RENDERING_SUSPENDING_BIT))
7141 if (gfx->depth_att.resolve_mode != VK_RESOLVE_MODE_NONE &&
7142 !(gfx->rendering_flags & VK_RENDERING_SUSPENDING_BIT)) {
7143 const struct anv_image_view *src_iview = gfx->depth_att.iview;
7152 gfx->depth_att.layout,
7156 cmd_buffer_resolve_msaa_attachment(cmd_buffer, &gfx->depth_att,
7168 gfx->depth_att.layout,
7172 if (gfx->stencil_att.resolve_mode != VK_RESOLVE_MODE_NONE &&
7173 !(gfx->rendering_flags & VK_RENDERING_SUSPENDING_BIT)) {
7174 cmd_buffer_resolve_msaa_attachment(cmd_buffer, &gfx->stencil_att,
7175 gfx->stencil_att.layout,
7197 if (gfx->stencil_att.iview != NULL) {
7198 const struct anv_image_view *iview = gfx->stencil_att.iview;
7204 (gfx->stencil_att.layout == VK_IMAGE_LAYOUT_GENERAL ||
7205 gfx->stencil_att.layout == VK_IMAGE_LAYOUT_SUBPASS_SELF_DEPENDENCY_MESA)) {
7216 gfx->render_area.extent.width,
7217 gfx->render_area.extent.height,
7218 gfx->color_att_count,
7219 gfx->samples);
7436 cmd_buffer->state.gfx.restart_index = restart_index_for_type(indexType);
7437 cmd_buffer->state.gfx.index_buffer = buffer;
7438 cmd_buffer->state.gfx.index_type = vk_to_intel_index_type(indexType);
7439 cmd_buffer->state.gfx.index_offset = offset;
7441 cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_INDEX_BUFFER;