Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tracking logic for input attachments as it's not necessary. #88631

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions servers/rendering/rendering_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2853,17 +2853,6 @@ RID RenderingDevice::uniform_set_create(const Vector<Uniform> &p_uniforms, RID p

DEV_ASSERT(!texture->owner.is_valid() || texture_owner.get_or_null(texture->owner));

if (_texture_make_mutable(texture, texture_id)) {
// The texture must be mutable as a layout transition will be required.
draw_graph.add_synchronization();
}

if (texture->draw_tracker != nullptr) {
bool depth_stencil_read = (texture->usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
draw_trackers.push_back(texture->draw_tracker);
draw_trackers_usage.push_back(depth_stencil_read ? RDG::RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ : RDG::RESOURCE_USAGE_ATTACHMENT_COLOR_READ);
}

driver_uniform.ids.push_back(texture->driver_id);
}
} break;
Expand Down
9 changes: 0 additions & 9 deletions servers/rendering/rendering_device_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ bool RenderingDeviceGraph::_is_write_usage(ResourceUsage p_usage) {
case RESOURCE_USAGE_INDEX_BUFFER_READ:
case RESOURCE_USAGE_TEXTURE_SAMPLE:
case RESOURCE_USAGE_STORAGE_IMAGE_READ:
case RESOURCE_USAGE_ATTACHMENT_COLOR_READ:
case RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ:
return false;
case RESOURCE_USAGE_TRANSFER_TO:
case RESOURCE_USAGE_TEXTURE_BUFFER_READ_WRITE:
Expand All @@ -80,11 +78,8 @@ RDD::TextureLayout RenderingDeviceGraph::_usage_to_image_layout(ResourceUsage p_
case RESOURCE_USAGE_STORAGE_IMAGE_READ:
case RESOURCE_USAGE_STORAGE_IMAGE_READ_WRITE:
return RDD::TEXTURE_LAYOUT_GENERAL;
case RESOURCE_USAGE_ATTACHMENT_COLOR_READ:
case RESOURCE_USAGE_ATTACHMENT_COLOR_READ_WRITE:
return RDD::TEXTURE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
case RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ:
return RDD::TEXTURE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
case RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ_WRITE:
return RDD::TEXTURE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
case RESOURCE_USAGE_NONE:
Expand Down Expand Up @@ -123,12 +118,8 @@ RDD::BarrierAccessBits RenderingDeviceGraph::_usage_to_access_bits(ResourceUsage
return RDD::BARRIER_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
case RESOURCE_USAGE_INDEX_BUFFER_READ:
return RDD::BARRIER_ACCESS_INDEX_READ_BIT;
case RESOURCE_USAGE_ATTACHMENT_COLOR_READ:
return RDD::BARRIER_ACCESS_COLOR_ATTACHMENT_READ_BIT;
case RESOURCE_USAGE_ATTACHMENT_COLOR_READ_WRITE:
return RDD::BarrierAccessBits(RDD::BARRIER_ACCESS_COLOR_ATTACHMENT_READ_BIT | RDD::BARRIER_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
case RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ:
return RDD::BARRIER_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;
case RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ_WRITE:
return RDD::BarrierAccessBits(RDD::BARRIER_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | RDD::BARRIER_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT);
default:
Expand Down
2 changes: 0 additions & 2 deletions servers/rendering/rendering_device_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ class RenderingDeviceGraph {
RESOURCE_USAGE_TEXTURE_SAMPLE,
RESOURCE_USAGE_STORAGE_IMAGE_READ,
RESOURCE_USAGE_STORAGE_IMAGE_READ_WRITE,
RESOURCE_USAGE_ATTACHMENT_COLOR_READ,
RESOURCE_USAGE_ATTACHMENT_COLOR_READ_WRITE,
RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ,
RESOURCE_USAGE_ATTACHMENT_DEPTH_STENCIL_READ_WRITE
};

Expand Down
Loading