-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
base: main
Are you sure you want to change the base?
Vk protected content command buffer #8241
Conversation
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 { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
Unused variable in release.
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.