-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Impeller] compute UVs in vertex stage. #52106
Merged
auto-submit
merged 12 commits into
flutter:main
from
jonahwilliams:compute_uv_vertex_stage
Apr 20, 2024
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
65cf0af
[Impeller] compute UVs in vertex stage.
jonahwilliams 699fe6a
++
jonahwilliams a255449
Merge branch 'main' of github.com:flutter/engine into compute_uv_vert…
jonahwilliams 0adc252
++
jonahwilliams 82786b2
++
jonahwilliams d97e84b
++
jonahwilliams 6ef532c
delete more uv computation.
jonahwilliams a3ba350
remove position uv pipelines
jonahwilliams 63c48bf
add maybe unused
jonahwilliams 9ac3c5d
update licenses
jonahwilliams ae7f592
malioc diff.
jonahwilliams 38879f2
Merge branch 'main' into compute_uv_vertex_stage
jonahwilliams 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -57,8 +57,8 @@ | |
#include "impeller/entity/texture_fill.frag.h" | ||
#include "impeller/entity/texture_fill.vert.h" | ||
#include "impeller/entity/texture_fill_strict_src.frag.h" | ||
#include "impeller/entity/texture_uv_fill.vert.h" | ||
#include "impeller/entity/tiled_texture_fill.frag.h" | ||
#include "impeller/entity/uv.comp.h" | ||
#include "impeller/entity/vertices.frag.h" | ||
#include "impeller/entity/yuv_to_rgb_filter.frag.h" | ||
|
||
|
@@ -129,10 +129,8 @@ using TexturePipeline = | |
using TextureStrictSrcPipeline = | ||
RenderPipelineHandle<TextureFillVertexShader, | ||
TextureFillStrictSrcFragmentShader>; | ||
using PositionUVPipeline = RenderPipelineHandle<TextureFillVertexShader, | ||
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. Unused |
||
TiledTextureFillFragmentShader>; | ||
using TiledTexturePipeline = | ||
RenderPipelineHandle<TextureFillVertexShader, | ||
RenderPipelineHandle<TextureUvFillVertexShader, | ||
TiledTextureFillFragmentShader>; | ||
using KernelDecalPipeline = | ||
RenderPipelineHandle<KernelVertexShader, KernelDecalFragmentShader>; | ||
|
@@ -253,20 +251,13 @@ using FramebufferBlendSoftLightPipeline = | |
|
||
/// Geometry Pipelines | ||
using PointsComputeShaderPipeline = ComputePipelineBuilder<PointsComputeShader>; | ||
using UvComputeShaderPipeline = ComputePipelineBuilder<UvComputeShader>; | ||
|
||
#ifdef IMPELLER_ENABLE_OPENGLES | ||
using TiledTextureExternalPipeline = | ||
RenderPipelineHandle<TextureFillVertexShader, | ||
RenderPipelineHandle<TextureUvFillVertexShader, | ||
TiledTextureFillExternalFragmentShader>; | ||
#endif // IMPELLER_ENABLE_OPENGLES | ||
|
||
// A struct used to isolate command buffer storage from the content | ||
// context options to preserve const-ness. | ||
struct PendingCommandBuffers { | ||
std::vector<std::shared_ptr<CommandBuffer>> command_buffers; | ||
}; | ||
|
||
/// Pipeline state configuration. | ||
/// | ||
/// Each unique combination of these options requires a different pipeline state | ||
|
@@ -478,11 +469,6 @@ class ContentContext { | |
} | ||
#endif // IMPELLER_ENABLE_OPENGLES | ||
|
||
std::shared_ptr<Pipeline<PipelineDescriptor>> GetPositionUVPipeline( | ||
ContentContextOptions opts) const { | ||
return GetPipeline(position_uv_pipelines_, opts); | ||
} | ||
|
||
std::shared_ptr<Pipeline<PipelineDescriptor>> GetTiledTexturePipeline( | ||
ContentContextOptions opts) const { | ||
return GetPipeline(tiled_texture_pipelines_, opts); | ||
|
@@ -727,12 +713,6 @@ class ContentContext { | |
return point_field_compute_pipelines_; | ||
} | ||
|
||
std::shared_ptr<Pipeline<ComputePipelineDescriptor>> GetUvComputePipeline() | ||
const { | ||
FML_DCHECK(GetDeviceCapabilities().SupportsCompute()); | ||
return uv_compute_pipelines_; | ||
} | ||
|
||
std::shared_ptr<Context> GetContext() const; | ||
|
||
const Capabilities& GetDeviceCapabilities() const; | ||
|
@@ -932,7 +912,6 @@ class ContentContext { | |
mutable Variants<TiledTextureExternalPipeline> | ||
tiled_texture_external_pipelines_; | ||
#endif // IMPELLER_ENABLE_OPENGLES | ||
mutable Variants<PositionUVPipeline> position_uv_pipelines_; | ||
mutable Variants<TiledTexturePipeline> tiled_texture_pipelines_; | ||
mutable Variants<KernelDecalPipeline> kernel_decal_pipelines_; | ||
mutable Variants<KernelPipeline> kernel_nodecal_pipelines_; | ||
|
@@ -997,8 +976,6 @@ class ContentContext { | |
framebuffer_blend_softlight_pipelines_; | ||
mutable std::shared_ptr<Pipeline<ComputePipelineDescriptor>> | ||
point_field_compute_pipelines_; | ||
mutable std::shared_ptr<Pipeline<ComputePipelineDescriptor>> | ||
uv_compute_pipelines_; | ||
|
||
template <class TypedPipeline> | ||
std::shared_ptr<Pipeline<PipelineDescriptor>> GetPipeline( | ||
|
@@ -1058,7 +1035,6 @@ class ContentContext { | |
#endif // IMPELLER_ENABLE_3D | ||
std::shared_ptr<RenderTargetAllocator> render_target_cache_; | ||
std::shared_ptr<HostBuffer> host_buffer_; | ||
std::unique_ptr<PendingCommandBuffers> pending_command_buffers_; | ||
bool wireframe_ = false; | ||
|
||
ContentContext(const ContentContext&) = delete; | ||
|
This file contains 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 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.
1 for 1!