Compare commits
1 Commits
bjd/comman
...
kpiascik/v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04efb9e18d |
@@ -172,11 +172,15 @@ SPDPipeline& MipmapGenerator::GetOrCreatePipeline(const PipelineCacheKey& key) {
|
|||||||
entry.binding = i;
|
entry.binding = i;
|
||||||
entry.visibility = wgpu::ShaderStage::Compute;
|
entry.visibility = wgpu::ShaderStage::Compute;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
entry.texture.sampleType = (key.scalarType == SPDScalarType::I32)
|
if (key.scalarType == SPDScalarType::I32) {
|
||||||
? wgpu::TextureSampleType::Sint
|
entry.texture.sampleType = wgpu::TextureSampleType::Sint;
|
||||||
: (key.scalarType == SPDScalarType::U32)
|
} else if (key.scalarType == SPDScalarType::U32) {
|
||||||
? wgpu::TextureSampleType::Uint
|
entry.texture.sampleType = wgpu::TextureSampleType::Uint;
|
||||||
: wgpu::TextureSampleType::UnfilterableFloat;
|
} else if (key.scalarType == SPDScalarType::F32 || key.scalarType == SPDScalarType::F16) {
|
||||||
|
entry.texture.sampleType = wgpu::TextureSampleType::Float;
|
||||||
|
} else {
|
||||||
|
entry.texture.sampleType = wgpu::TextureSampleType::UnfilterableFloat;
|
||||||
|
}
|
||||||
entry.texture.viewDimension = wgpu::TextureViewDimension::e2DArray;
|
entry.texture.viewDimension = wgpu::TextureViewDimension::e2DArray;
|
||||||
} else {
|
} else {
|
||||||
entry.storageTexture.access = wgpu::StorageTextureAccess::WriteOnly;
|
entry.storageTexture.access = wgpu::StorageTextureAccess::WriteOnly;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ template<typename WebGPUPrintable>
|
|||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] std::string adapterInfoToString(wgpu::AdapterInfo const& info) {
|
[[nodiscard]] inline std::string adapterInfoToString(wgpu::AdapterInfo const& info) {
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
out << "vendor (" << info.vendorID << ") '" << info.vendor
|
out << "vendor (" << info.vendorID << ") '" << info.vendor
|
||||||
<< "' device (" << info.deviceID << ") '" << info.device
|
<< "' device (" << info.deviceID << ") '" << info.device
|
||||||
|
|||||||
Reference in New Issue
Block a user