Skip to content

Commit

Permalink
Set supportsRasterOrdering in the webgpu backend
Browse files Browse the repository at this point in the history
Diffs=
2a6cf9d0a6 Set supportsRasterOrdering in the webgpu backend (#8774)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
  • Loading branch information
csmartdalton and csmartdalton committed Dec 18, 2024
1 parent 819348d commit 2d754a6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f19a9c9399997a1e1b4571fe860faf2ed60b7d49
2a6cf9d0a60f53d8d8f0c6e2d2d837f441780902
14 changes: 6 additions & 8 deletions renderer/make_dawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ cd dependencies
if [ ! -d dawn ]; then
echo "Cloning Dawn..."
git clone https://dawn.googlesource.com/dawn
cd dawn
cp scripts/standalone.gclient .gclient
gclient sync
gn gen --args='is_debug=false dawn_complete_static_libs=true use_custom_libcxx=false dawn_use_swiftshader=false angle_enable_swiftshader=false' out/release
else
echo "Already have Dawn; updating it..."
cd dawn
git fetch origin
git checkout origin/main
gclient sync
git -C dawn fetch origin
fi

cd dawn
git checkout origin/main
cp scripts/standalone.gclient .gclient
gclient sync
gn gen --args='is_debug=false dawn_complete_static_libs=true use_custom_libcxx=true dawn_use_swiftshader=false angle_enable_swiftshader=false' out/release
ninja -C out/release -j20 webgpu_dawn_static cpp proc_static
3 changes: 3 additions & 0 deletions renderer/src/webgpu/render_context_webgpu_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ RenderContextWebGPUImpl::RenderContextWebGPUImpl(
std::make_unique<TessellatePipeline>(m_device, m_contextOptions))
{
m_platformFeatures = baselinePlatformFeatures;
// All backends currently use raster ordered shaders.
// TODO: update this flag once we have msaa and atomic modes.
m_platformFeatures.supportsRasterOrdering = true;
m_platformFeatures.invertOffscreenY = true;

if (m_contextOptions.plsType ==
Expand Down
1 change: 1 addition & 0 deletions renderer/src/webgpu/render_context_webgpu_vulkan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class RenderContextWebGPUVulkan : public RenderContextWebGPUImpl
baselinePlatformFeatures)
{
assert(contextOptions.plsType == PixelLocalStorageType::subpassLoad);
m_platformFeatures.supportsRasterOrdering = true;
}

EmJsHandle m_plsTextureBindGroupJSHandle;
Expand Down

0 comments on commit 2d754a6

Please sign in to comment.