Skip to content

Commit 26236f2

Browse files
authored
fix(⬆️): upgrade to chromium/7472 (#269)
1 parent c51c688 commit 26236f2

13 files changed

Lines changed: 21 additions & 24 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "externals/dawn"]
22
path = externals/dawn
33
url = https://dawn.googlesource.com/dawn
4-
branch = chromium/7403
4+
branch = chromium/7472

apps/example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ PODS:
18651865
- ReactCommon/turbomodule/core
18661866
- SocketRocket
18671867
- Yoga
1868-
- react-native-wgpu (0.2.8):
1868+
- react-native-wgpu (0.2.9):
18691869
- boost
18701870
- DoubleConversion
18711871
- fast_float
@@ -2903,7 +2903,7 @@ SPEC CHECKSUMS:
29032903
React-microtasksnativemodule: 75b6604b667d297292345302cc5bfb6b6aeccc1b
29042904
react-native-safe-area-context: c6e2edd1c1da07bdce287fa9d9e60c5f7b514616
29052905
react-native-skia: 5bf2b2107cd7f2d806fd364f5e16b1c7554ed3cd
2906-
react-native-wgpu: fa319a78b8773740fd2247cff8054f4bb3cd341e
2906+
react-native-wgpu: 6b98abaead58c53560720db8074bb82b29edd9a8
29072907
React-NativeModulesApple: 879fbdc5dcff7136abceb7880fe8a2022a1bd7c3
29082908
React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d
29092909
React-perflogger: 5536d2df3d18fe0920263466f7b46a56351c0510

apps/example/src/ComputeToys/ComputeToys.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { ComputeToy, useComputeToy } from "./ComputeToy";
22

33
export const ComputeToys = () => {
44
//1806
5-
const toy = useComputeToy(537);
5+
const toy = useComputeToy(2349);
66
if (!toy) {
77
return null;
88
}
9+
console.log({ toy });
910
return <ComputeToy toy={toy} />;
1011
};

apps/example/src/ComputeToys/engine/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ struct DispatchInfo { id: uint }
167167
`;
168168

169169
// Add custom uniforms struct
170-
prelude += "struct Custom {\n";
171170
const [customNames] = this.bindings!.custom.host;
171+
prelude += "struct Custom {\n";
172172
for (const name of customNames) {
173173
prelude += ` ${name}: float,\n`;
174174
}

externals/dawn

Submodule dawn updated from c84d448 to ffb6058

packages/webgpu/cpp/rnwgpu/api/GPUAdapter.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,4 @@ std::shared_ptr<GPUAdapterInfo> GPUAdapter::getInfo() {
151151
return std::make_shared<GPUAdapterInfo>(info);
152152
}
153153

154-
bool GPUAdapter::getIsFallbackAdapter() {
155-
wgpu::AdapterInfo adapterInfo = {};
156-
_instance.GetInfo(&adapterInfo);
157-
return adapterInfo.adapterType == wgpu::AdapterType::CPU;
158-
}
159-
160154
} // namespace rnwgpu

packages/webgpu/cpp/rnwgpu/api/GPUAdapter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,13 @@ class GPUAdapter : public m::HybridObject {
3737
std::unordered_set<std::string> getFeatures();
3838
std::shared_ptr<GPUSupportedLimits> getLimits();
3939
std::shared_ptr<GPUAdapterInfo> getInfo();
40-
bool getIsFallbackAdapter();
4140

4241
void loadHybridMethods() override {
4342
registerHybridGetter("__brand", &GPUAdapter::getBrand, this);
4443
registerHybridMethod("requestDevice", &GPUAdapter::requestDevice, this);
4544
registerHybridGetter("features", &GPUAdapter::getFeatures, this);
4645
registerHybridGetter("limits", &GPUAdapter::getLimits, this);
4746
registerHybridGetter("info", &GPUAdapter::getInfo, this);
48-
registerHybridGetter("isFallbackAdapter", &GPUAdapter::getIsFallbackAdapter,
49-
this);
5047
}
5148

5249
inline const wgpu::Adapter get() { return _instance; }

packages/webgpu/cpp/rnwgpu/api/GPUAdapterInfo.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class GPUAdapterInfo : public m::HybridObject {
2121
explicit GPUAdapterInfo(wgpu::AdapterInfo &info)
2222
: HybridObject("GPUAdapterInfo"), _vendor(info.vendor),
2323
_architecture(info.architecture), _device(info.device),
24-
_description(info.description) {}
24+
_description(info.description),
25+
_isFallbackAdapter(info.adapterType == wgpu::AdapterType::CPU) {}
2526

2627
public:
2728
std::string getBrand() { return _name; }
@@ -30,6 +31,7 @@ class GPUAdapterInfo : public m::HybridObject {
3031
std::string getArchitecture() { return _architecture; }
3132
std::string getDevice() { return _device; }
3233
std::string getDescription() { return _description; }
34+
bool getIsFallbackAdapter() { return _isFallbackAdapter; }
3335

3436
void loadHybridMethods() override {
3537
registerHybridGetter("__brand", &GPUAdapterInfo::getBrand, this);
@@ -39,13 +41,16 @@ class GPUAdapterInfo : public m::HybridObject {
3941
this);
4042
registerHybridGetter("device", &GPUAdapterInfo::getDevice, this);
4143
registerHybridGetter("description", &GPUAdapterInfo::getDescription, this);
44+
registerHybridGetter("isFallbackAdapter",
45+
&GPUAdapterInfo::getIsFallbackAdapter, this);
4246
}
4347

4448
private:
4549
std::string _vendor;
4650
std::string _architecture;
4751
std::string _device;
4852
std::string _description;
53+
bool _isFallbackAdapter;
4954
};
5055

5156
} // namespace rnwgpu

packages/webgpu/cpp/rnwgpu/api/GPUCommandEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ std::shared_ptr<GPURenderPassEncoder> GPUCommandEncoder::beginRenderPass(
4141
std::shared_ptr<GPURenderPassDescriptor> descriptor) {
4242

4343
wgpu::RenderPassDescriptor desc{};
44-
wgpu::RenderPassDescriptorMaxDrawCount maxDrawCountDesc{};
44+
wgpu::RenderPassMaxDrawCount maxDrawCountDesc{};
4545
desc.nextInChain = &maxDrawCountDesc;
4646
Convertor conv;
4747

packages/webgpu/cpp/rnwgpu/api/GPUDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ GPUDevice::createTexture(std::shared_ptr<GPUTextureDescriptor> descriptor) {
7070

7171
std::shared_ptr<GPUShaderModule> GPUDevice::createShaderModule(
7272
std::shared_ptr<GPUShaderModuleDescriptor> descriptor) {
73-
wgpu::ShaderModuleWGSLDescriptor wgsl_desc{};
73+
wgpu::ShaderSourceWGSL wgsl_desc{};
7474
wgpu::ShaderModuleDescriptor sm_desc{};
7575
Convertor conv;
7676
if (!conv(wgsl_desc.code, descriptor->code) ||

0 commit comments

Comments
 (0)