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

Vk protected content command buffer #8241

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

phoenixxxx
Copy link
Contributor

This is the second phase of the protected content work. This includes the protected command buffer, and the associated scheduling and submission work. We also introduce a getProtected method in the VulkanCommands object for specific cases where protection level is activated.

phoenixxxx and others added 27 commits June 4, 2024 12:35
Adding the basic mechanisms for creating and managing the protected
state. We also create the queue and get it. Finally we allocate
protected memory.
Addressing all the feedbacks from the pull request.
Part 2:
- Removing some of the shared context logic
- Cleaning up spacing issues
- Removing accessors
Line length, variable name.
The lack of type was causing VK to not properly fill the strucutres.
Command buffer protection is added.
Constructor Modification.
Argument ordering was wrong.
The command buffers are now protected and able to submit work.
As expressed we took the new implementation and tried applied it to the
branch. Needed for testing on the Moohan side.
The depth buffer creation takes a different path potentially not getting
picked up for depth creation.
@@ -33,453 +33,504 @@ using namespace utils;

namespace filament::backend {

namespace {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing is different for this file.

the base classes and namespace should have no spacing in front.

@@ -111,6 +111,15 @@ class VulkanDriver final : public DriverBase {

private:
void collectGarbage();
inline VulkanCommandBuffer& getCommandBuffer() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this and also mIsRenderPassProtected and mIsContentProtected

@@ -185,8 +185,9 @@ struct PushConstantDescription {

uint32_t getVkRangeCount() const noexcept { return mRangeCount; }

void write(VulkanCommands* commands, VkPipelineLayout layout, backend::ShaderStage stage,
uint8_t index, backend::PushConstantVariant const& value);
void write(VulkanCommands* commands, bool isProtected, VkPipelineLayout layout,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not change VulkanHandles in this PR

@@ -29,7 +29,7 @@ namespace filament::backend {
namespace {

std::tuple<VkImage, VkDeviceMemory> createImageAndMemory(VulkanContext const& context,
VkDevice device, VkExtent2D extent, VkFormat format) {
VkDevice device, VkExtent2D extent, VkFormat format, bool isProtected) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do this in a separate PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants