This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Flutter GPU] Remove Command/VertexBuffer usage from Flutter GPU. #55893
Merged
auto-submit
merged 7 commits into
flutter:main
from
bdero:bdero/fluttergpu-remove-command
Oct 17, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ea76acb
[Flutter GPU] Remove Command/VertexBuffer usage from Flutter GPU.
bdero 8b002fb
Make uniform/texture bindings re-assignable.
bdero 2837c64
Restore buffer checks
bdero 550ac4d
Unused vars
bdero 196c26e
🤦
bdero a199692
Vertex/index/stencil ref state.
bdero 9e7f39f
Fix uniform map insertion
bdero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,12 @@ class RenderPass : public ResourceBinder { | |
| /// | ||
| virtual void SetScissor(IRect scissor); | ||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// The number of elements to draw. When only a vertex buffer is set, this is | ||
| /// the vertex count. When an index buffer is set, this is the index count. | ||
| /// | ||
| virtual void SetElementCount(size_t count); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New method in RenderPass here. |
||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// The number of instances of the given set of vertices to render. Not all | ||
| /// backends support rendering more than one instance at a time. | ||
|
|
@@ -115,11 +121,9 @@ class RenderPass : public ResourceBinder { | |
| /// | ||
| /// @param[in] vertex_buffer The buffer view to use for sourcing vertices. | ||
| /// | ||
| /// @param[in] vertex_count The number of vertices to draw. | ||
| /// | ||
| /// @return Returns false if the given buffer view is invalid. | ||
| /// | ||
| bool SetVertexBuffer(BufferView vertex_buffer, size_t vertex_count); | ||
| bool SetVertexBuffer(BufferView vertex_buffer); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This patch removes |
||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// @brief Specify a set of vertex buffers to use for this command. | ||
|
|
@@ -131,12 +135,9 @@ class RenderPass : public ResourceBinder { | |
| /// @param[in] vertex_buffers The array of vertex buffer views to use. | ||
| /// The maximum number of vertex buffers is 16. | ||
| /// | ||
| /// @param[in] vertex_count The number of vertices to draw. | ||
| /// | ||
| /// @return Returns false if any of the given buffer views are invalid. | ||
| /// | ||
| bool SetVertexBuffer(std::vector<BufferView> vertex_buffers, | ||
| size_t vertex_count); | ||
| bool SetVertexBuffer(std::vector<BufferView> vertex_buffers); | ||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// @brief Specify a set of vertex buffers to use for this command. | ||
|
|
@@ -152,22 +153,20 @@ class RenderPass : public ResourceBinder { | |
| /// @param[in] vertex_buffer_count The number of vertex buffers to copy from | ||
| /// the array (max 16). | ||
| /// | ||
| /// @param[in] vertex_count The number of vertices to draw. | ||
| /// | ||
| /// @return Returns false if any of the given buffer views are invalid. | ||
| /// | ||
| virtual bool SetVertexBuffer(BufferView vertex_buffers[], | ||
| size_t vertex_buffer_count, | ||
| size_t vertex_count); | ||
| size_t vertex_buffer_count); | ||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// @brief Specify an index buffer to use for this command. | ||
| /// To unset the index buffer, pass IndexType::kNone to | ||
| /// index_type. | ||
| /// | ||
| /// @param[in] index_buffer The buffer view to use for sourcing indices. The | ||
| /// total number of indices is inferred from the | ||
| /// buffer view size and index type. | ||
| /// @param[in] index_buffer The buffer view to use for sourcing indices. | ||
| /// When an index buffer is bound, the | ||
| /// `vertex_count` set via `SetVertexBuffer` is used | ||
| /// as the number of indices to draw. | ||
| /// | ||
| /// @param[in] index_type The size of each index in the index buffer. Pass | ||
| /// IndexType::kNone to unset the index buffer. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this count as making you a two star programmer? :)
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.
One day I'll sneak three stars in and become a legend.