-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Start stroke tessellation in compute #39543
Conversation
height /= 2; | ||
} | ||
auto size = MTLSizeMake(width, height, 1); | ||
[encoder dispatchThreadgroups:size threadsPerThreadgroup:size]; |
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.
This was a bug. Previously, only the last command in the pass was being dispatched.
Ok. This patch still only does things in tests, but it verifies the following:
And a test that strings them all together. This feels like enough that I'd like to get it reviewed and tested on CI. Some next steps:
|
impeller/compiler/compiler.cc
Outdated
@@ -34,7 +34,7 @@ static CompilerBackend CreateMSLCompiler(const spirv_cross::ParsedIR& ir, | |||
// If this version specification changes, the GN rules that process the | |||
// Metal to AIR must be updated as well. | |||
sl_options.msl_version = | |||
spirv_cross::CompilerMSL::Options::make_msl_version(1, 2); | |||
spirv_cross::CompilerMSL::Options::make_msl_version(2, 1); |
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.
Need to make these configurable and add a new target for it.
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.
Ahh right I have to fix this.
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.
Ok. This is now parameterized here and elsewhere.
Because it's now parameterized, the comment above no longer applies - the MSL version is set once and flows through the GN templates to here and the build_metal_library.py script.
… subgroup related things to own TU
shaderc_env_version::shaderc_env_version_vulkan_1_1); | ||
spirv_options.SetTargetSpirv( | ||
shaderc_spirv_version::shaderc_spirv_version_1_0); | ||
shaderc_spirv_version::shaderc_spirv_version_1_3); |
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.
@chinmaygarde or @iskakaushik - is this ok?
I'm not sure why we'd be targetting Vulkan 1.0 here but Vulkan 1.1 above.
I'm also not sure I understand the implications of using SPIR-V version 1.0 here. I need 1.3 for subgroups. I think it's probably ok but don't know where to look it up.
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.
If it's not ok all the time, I can parameterize this the way I did with the MSL version above.
// but some cases result in no errors or warnings and still have an error | ||
// message. If there's a message we should print it. | ||
if (spv_result_->GetNumErrors() > 0 || spv_result_->GetNumWarnings() > 0 || | ||
!spv_result_->GetErrorMessage().empty()) { |
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.
This is the part that fixes flutter/flutter#120241
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.
LGTM
I think I finally got Windows to build. |
See comment below for update on what this does.
Fixes flutter/flutter#120241