зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1600929 - WebGPU buffer creation and mapping r=jgilbert,bzbarsky
This is the basic functionality needed to work with buffers. What it doesn't have: - ability to re-map the buffer for writing - async writing map - most of the validation Differential Revision: https://phabricator.services.mozilla.com/D55656 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2555b4f008
Коммит
b3d867ca6e
|
@ -1316,6 +1316,7 @@ DOMInterfaces = {
|
|||
},
|
||||
'GPUBuffer': {
|
||||
'nativeType': 'mozilla::webgpu::Buffer',
|
||||
'implicitJSContext': [ 'unmap' ],
|
||||
},
|
||||
'GPUCanvasContext': {
|
||||
'nativeType': 'mozilla::webgpu::CanvasContext',
|
||||
|
|
|
@ -6,18 +6,123 @@
|
|||
#include "mozilla/dom/WebGPUBinding.h"
|
||||
#include "Buffer.h"
|
||||
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/ipc/Shmem.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "Device.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace webgpu {
|
||||
|
||||
GPU_IMPL_CYCLE_COLLECTION(Buffer, mParent)
|
||||
GPU_IMPL_JS_WRAP(Buffer)
|
||||
|
||||
Buffer::Buffer(Device* const parent) : ChildOf(parent) {}
|
||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(Buffer, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(Buffer, Release)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(Buffer)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Buffer)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
tmp->mMapping.reset();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Buffer)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParent)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Buffer)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
if (tmp->mMapping) {
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mMapping->mArrayBuffer)
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
Buffer::~Buffer() = default;
|
||||
Buffer::Mapping::Mapping(ipc::Shmem&& aShmem, JSObject* aArrayBuffer)
|
||||
: mShmem(MakeUnique<ipc::Shmem>(std::move(aShmem))),
|
||||
mArrayBuffer(aArrayBuffer) {}
|
||||
|
||||
Buffer::Buffer(Device* const aParent, RawId aId, BufferAddress aSize)
|
||||
: ChildOf(aParent), mId(aId), mSize(aSize) {
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
Buffer::~Buffer() {
|
||||
if (mParent) {
|
||||
mParent->DestroyBuffer(mId);
|
||||
}
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
void Buffer::InitMapping(ipc::Shmem&& aShmem, JSObject* aArrayBuffer) {
|
||||
mMapping.emplace(std::move(aShmem), aArrayBuffer);
|
||||
}
|
||||
|
||||
already_AddRefed<dom::Promise> Buffer::MapReadAsync(ErrorResult& aRv) {
|
||||
RefPtr<dom::Promise> promise = dom::Promise::Create(GetParentObject(), aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
if (mMapping) {
|
||||
aRv.ThrowDOMException(NS_ERROR_DOM_INVALID_STATE_ERR,
|
||||
"Unable to map a buffer that is already mapped");
|
||||
return nullptr;
|
||||
}
|
||||
const auto checked = CheckedInt<size_t>(mSize);
|
||||
if (!checked.isValid()) {
|
||||
aRv.ThrowRangeError(u"Mapped size is too large");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto& size = checked.value();
|
||||
RefPtr<Buffer> self(this);
|
||||
|
||||
auto mappingPromise = mParent->MapBufferForReadAsync(mId, size, aRv);
|
||||
if (!mappingPromise) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mappingPromise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[promise, size, self](ipc::Shmem&& aShmem) {
|
||||
MOZ_ASSERT(aShmem.Size<uint8_t>() == size);
|
||||
dom::AutoJSAPI jsapi;
|
||||
if (!jsapi.Init(self->GetParentObject())) {
|
||||
promise->MaybeRejectWithDOMException(NS_ERROR_DOM_ABORT_ERR,
|
||||
"Owning page was unloaded!");
|
||||
return;
|
||||
}
|
||||
JS::Rooted<JSObject*> arrayBuffer(
|
||||
jsapi.cx(),
|
||||
Device::CreateExternalArrayBuffer(jsapi.cx(), size, aShmem));
|
||||
if (!arrayBuffer) {
|
||||
ErrorResult rv;
|
||||
rv.StealExceptionFromJSContext(jsapi.cx());
|
||||
promise->MaybeReject(rv);
|
||||
return;
|
||||
}
|
||||
JS::Rooted<JS::Value> val(jsapi.cx(), JS::ObjectValue(*arrayBuffer));
|
||||
self->mMapping.emplace(std::move(aShmem), arrayBuffer);
|
||||
promise->MaybeResolve(val);
|
||||
},
|
||||
[promise](const ipc::ResponseRejectReason&) {
|
||||
promise->MaybeRejectWithDOMException(NS_ERROR_DOM_ABORT_ERR,
|
||||
"Internal communication error!");
|
||||
});
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
void Buffer::Unmap(JSContext* aCx, ErrorResult& aRv) {
|
||||
if (!mMapping) {
|
||||
return;
|
||||
}
|
||||
JS::Rooted<JSObject*> rooted(aCx, mMapping->mArrayBuffer);
|
||||
bool ok = JS::DetachArrayBuffer(aCx, rooted);
|
||||
if (!ok) {
|
||||
aRv.NoteJSContextException(aCx);
|
||||
return;
|
||||
}
|
||||
mParent->UnmapBuffer(mId, std::move(mMapping->mShmem));
|
||||
mMapping.reset();
|
||||
}
|
||||
|
||||
} // namespace webgpu
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -6,11 +6,15 @@
|
|||
#ifndef GPU_BUFFER_H_
|
||||
#define GPU_BUFFER_H_
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
#include "mozilla/dom/Nullable.h"
|
||||
#include "mozilla/dom/TypedArray.h"
|
||||
#include "mozilla/webgpu/WebGPUTypes.h"
|
||||
#include "ObjectModel.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
class Shmem;
|
||||
} // namespace ipc
|
||||
namespace webgpu {
|
||||
|
||||
class Device;
|
||||
|
@ -20,11 +24,30 @@ class Buffer final : public ObjectBase, public ChildOf<Device> {
|
|||
GPU_DECL_CYCLE_COLLECTION(Buffer)
|
||||
GPU_DECL_JS_WRAP(Buffer)
|
||||
|
||||
struct Mapping final {
|
||||
UniquePtr<ipc::Shmem> mShmem;
|
||||
JS::Heap<JSObject*> mArrayBuffer;
|
||||
|
||||
Mapping(ipc::Shmem&& aShmem, JSObject* aArrayBuffer);
|
||||
};
|
||||
|
||||
Buffer(Device* const aParent, RawId aId, BufferAddress aSize);
|
||||
void InitMapping(ipc::Shmem&& aShmem, JSObject* aArrayBuffer);
|
||||
|
||||
private:
|
||||
explicit Buffer(Device* parent);
|
||||
virtual ~Buffer();
|
||||
|
||||
const RawId mId;
|
||||
// Note: we can't map a buffer with the size that don't fit into `size_t`
|
||||
// (which may be smaller than `BufferAddress`), but general not all buffers
|
||||
// are mapped.
|
||||
const BufferAddress mSize;
|
||||
nsString mLabel;
|
||||
Maybe<Mapping> mMapping;
|
||||
|
||||
public:
|
||||
already_AddRefed<dom::Promise> MapReadAsync(ErrorResult& aRv);
|
||||
void Unmap(JSContext* aCx, ErrorResult& aRv);
|
||||
};
|
||||
|
||||
} // namespace webgpu
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "js/ArrayBuffer.h"
|
||||
#include "js/Value.h"
|
||||
#include "mozilla/dom/WebGPUBinding.h"
|
||||
#include "mozilla/ipc/Shmem.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "Device.h"
|
||||
|
||||
#include "Adapter.h"
|
||||
|
@ -12,19 +16,31 @@
|
|||
namespace mozilla {
|
||||
namespace webgpu {
|
||||
|
||||
mozilla::LazyLogModule gWebGPULog("WebGPU");
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(Device, DOMEventTargetHelper, mBridge)
|
||||
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(Device, DOMEventTargetHelper)
|
||||
GPU_IMPL_JS_WRAP(Device)
|
||||
|
||||
static void mapFreeCallback(void* aContents, void* aUserData) {
|
||||
Unused << aContents;
|
||||
Unused << aUserData;
|
||||
}
|
||||
|
||||
JSObject* Device::CreateExternalArrayBuffer(JSContext* aCx, size_t aSize,
|
||||
ipc::Shmem& aShmem) {
|
||||
MOZ_ASSERT(aShmem.Size<uint8_t>() == aSize);
|
||||
return JS::NewExternalArrayBuffer(aCx, aSize, aShmem.get<uint8_t>(),
|
||||
&mapFreeCallback, nullptr);
|
||||
}
|
||||
|
||||
Device::Device(Adapter* const aParent, RawId aId)
|
||||
: DOMEventTargetHelper(aParent->GetParentObject()),
|
||||
mBridge(aParent->GetBridge()),
|
||||
mId(aId) {
|
||||
Unused << mId; // TODO: remove
|
||||
}
|
||||
mId(aId) {}
|
||||
|
||||
Device::~Device() {
|
||||
// TODO: figure out when `mBridge` could be `nullptr`
|
||||
// could be `nullptr` if CC-ed
|
||||
if (mBridge && mBridge->IsOpen()) {
|
||||
mBridge->SendDeviceDestroy(mId);
|
||||
}
|
||||
|
@ -33,5 +49,83 @@ Device::~Device() {
|
|||
void Device::GetLabel(nsAString& aValue) const { aValue = mLabel; }
|
||||
void Device::SetLabel(const nsAString& aLabel) { mLabel = aLabel; }
|
||||
|
||||
already_AddRefed<Buffer> Device::CreateBuffer(
|
||||
const dom::GPUBufferDescriptor& aDesc) {
|
||||
RawId id = mBridge->DeviceCreateBuffer(mId, aDesc);
|
||||
RefPtr<Buffer> buffer = new Buffer(this, id, aDesc.mSize);
|
||||
return buffer.forget();
|
||||
}
|
||||
|
||||
void Device::CreateBufferMapped(JSContext* aCx,
|
||||
const dom::GPUBufferDescriptor& aDesc,
|
||||
nsTArray<JS::Value>& aSequence,
|
||||
ErrorResult& aRv) {
|
||||
const auto checked = CheckedInt<size_t>(aDesc.mSize);
|
||||
if (!checked.isValid()) {
|
||||
aRv.ThrowRangeError(u"Mapped size is too large");
|
||||
return;
|
||||
}
|
||||
const auto& size = checked.value();
|
||||
|
||||
// TODO: use `ShmemPool`
|
||||
ipc::Shmem shmem;
|
||||
if (!mBridge->AllocShmem(size, ipc::Shmem::SharedMemory::TYPE_BASIC,
|
||||
&shmem)) {
|
||||
aRv.ThrowDOMException(
|
||||
NS_ERROR_DOM_ABORT_ERR,
|
||||
nsPrintfCString("Unable to allocate shmem of size %" PRIuPTR, size));
|
||||
return;
|
||||
}
|
||||
|
||||
// zero out memory
|
||||
memset(shmem.get<uint8_t>(), 0, size);
|
||||
|
||||
JSObject* arrayBuffer = CreateExternalArrayBuffer(aCx, size, shmem);
|
||||
if (!arrayBuffer) {
|
||||
aRv.NoteJSContextException(aCx);
|
||||
return;
|
||||
}
|
||||
|
||||
dom::GPUBufferDescriptor modifiedDesc(aDesc);
|
||||
modifiedDesc.mUsage |= dom::GPUBufferUsage_Binding::MAP_WRITE;
|
||||
RawId id = mBridge->DeviceCreateBuffer(mId, modifiedDesc);
|
||||
RefPtr<Buffer> buffer = new Buffer(this, id, aDesc.mSize);
|
||||
|
||||
JS::Rooted<JS::Value> bufferValue(aCx);
|
||||
if (!dom::ToJSValue(aCx, buffer, &bufferValue)) {
|
||||
aRv.NoteJSContextException(aCx);
|
||||
return;
|
||||
}
|
||||
|
||||
aSequence.AppendElement(bufferValue);
|
||||
aSequence.AppendElement(JS::ObjectValue(*arrayBuffer));
|
||||
|
||||
buffer->InitMapping(std::move(shmem), arrayBuffer);
|
||||
}
|
||||
|
||||
RefPtr<MappingPromise> Device::MapBufferForReadAsync(RawId aId, size_t aSize,
|
||||
ErrorResult& aRv) {
|
||||
ipc::Shmem shmem;
|
||||
if (!mBridge->AllocShmem(aSize, ipc::Shmem::SharedMemory::TYPE_BASIC,
|
||||
&shmem)) {
|
||||
aRv.ThrowDOMException(
|
||||
NS_ERROR_DOM_ABORT_ERR,
|
||||
nsPrintfCString("Unable to allocate shmem of size %" PRIuPTR, aSize));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mBridge->SendDeviceMapBufferRead(mId, aId, std::move(shmem));
|
||||
}
|
||||
|
||||
void Device::UnmapBuffer(RawId aId, UniquePtr<ipc::Shmem> aShmem) {
|
||||
mBridge->SendDeviceUnmapBuffer(mId, aId, std::move(*aShmem));
|
||||
}
|
||||
|
||||
void Device::DestroyBuffer(RawId aId) {
|
||||
if (mBridge && mBridge->IsOpen()) {
|
||||
mBridge->SendBufferDestroy(aId);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webgpu
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef GPU_DEVICE_H_
|
||||
#define GPU_DEVICE_H_
|
||||
|
||||
#include "mozilla/MozPromise.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/webgpu/WebGPUTypes.h"
|
||||
#include "mozilla/DOMEventTargetHelper.h"
|
||||
|
@ -34,10 +35,16 @@ struct GPUCommandEncoderDescriptor;
|
|||
|
||||
class EventHandlerNonNull;
|
||||
class Promise;
|
||||
template <typename T>
|
||||
class Sequence;
|
||||
class GPUBufferOrGPUTexture;
|
||||
enum class GPUErrorFilter : uint8_t;
|
||||
class GPULogCallback;
|
||||
} // namespace dom
|
||||
namespace ipc {
|
||||
enum class ResponseRejectReason;
|
||||
class Shmem;
|
||||
} // namespace ipc
|
||||
|
||||
namespace webgpu {
|
||||
class Adapter;
|
||||
|
@ -57,12 +64,22 @@ class ShaderModule;
|
|||
class Texture;
|
||||
class WebGPUChild;
|
||||
|
||||
typedef MozPromise<ipc::Shmem, ipc::ResponseRejectReason, true> MappingPromise;
|
||||
|
||||
class Device final : public DOMEventTargetHelper {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Device, DOMEventTargetHelper)
|
||||
GPU_DECL_JS_WRAP(Device)
|
||||
|
||||
explicit Device(Adapter* const aParent, RawId aId);
|
||||
static JSObject* CreateExternalArrayBuffer(JSContext* aCx, size_t aSize,
|
||||
ipc::Shmem& aShmem);
|
||||
RefPtr<MappingPromise> MapBufferForReadAsync(RawId aId, size_t aSize,
|
||||
ErrorResult& aRv);
|
||||
void UnmapBuffer(RawId aId, UniquePtr<ipc::Shmem> aShmem);
|
||||
void DestroyBuffer(RawId aId);
|
||||
|
||||
private:
|
||||
Device() = delete;
|
||||
virtual ~Device();
|
||||
|
@ -72,10 +89,13 @@ class Device final : public DOMEventTargetHelper {
|
|||
nsString mLabel;
|
||||
|
||||
public:
|
||||
explicit Device(Adapter* const aParent, RawId aId);
|
||||
void GetLabel(nsAString& aValue) const;
|
||||
void SetLabel(const nsAString& aLabel);
|
||||
|
||||
already_AddRefed<Buffer> CreateBuffer(const dom::GPUBufferDescriptor& aDesc);
|
||||
void CreateBufferMapped(JSContext* aCx, const dom::GPUBufferDescriptor& aDesc,
|
||||
nsTArray<JS::Value>& aSequence, ErrorResult& aRv);
|
||||
|
||||
// IMPL_EVENT_HANDLER(uncapturederror)
|
||||
};
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
using RawId from "mozilla/webgpu/WebGPUTypes.h";
|
||||
using dom::GPURequestAdapterOptions from "mozilla/dom/WebGPUBinding.h";
|
||||
using dom::GPUDeviceDescriptor from "mozilla/dom/WebGPUBinding.h";
|
||||
using dom::GPUBufferDescriptor from "mozilla/dom/WebGPUBinding.h";
|
||||
|
||||
include "mozilla/webgpu/WebGPUSerialize.h";
|
||||
include protocol PCompositorBridge;
|
||||
|
@ -27,7 +28,11 @@ async protocol PWebGPU
|
|||
parent:
|
||||
async InstanceRequestAdapter(GPURequestAdapterOptions options, RawId[] ids) returns (RawId adapterId);
|
||||
async AdapterRequestDevice(RawId selfId, GPUDeviceDescriptor desc, RawId newId);
|
||||
async DeviceCreateBuffer(RawId selfId, GPUBufferDescriptor desc, RawId newId);
|
||||
async DeviceDestroy(RawId selfId);
|
||||
async DeviceMapBufferRead(RawId selfId, RawId bufferId, Shmem shmem) returns (Shmem sm);
|
||||
async DeviceUnmapBuffer(RawId selfId, RawId bufferId, Shmem shmem);
|
||||
async BufferDestroy(RawId selfId);
|
||||
async Shutdown();
|
||||
|
||||
child:
|
||||
|
|
|
@ -80,5 +80,14 @@ Maybe<RawId> WebGPUChild::AdapterRequestDevice(
|
|||
}
|
||||
}
|
||||
|
||||
RawId WebGPUChild::DeviceCreateBuffer(RawId aSelfId,
|
||||
const dom::GPUBufferDescriptor& aDesc) {
|
||||
RawId id = ffi::wgpu_client_make_device_id(mClient, aSelfId);
|
||||
if (!SendDeviceCreateBuffer(aSelfId, aDesc, id)) {
|
||||
MOZ_CRASH("IPC failure");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
} // namespace webgpu
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -38,6 +38,8 @@ class WebGPUChild final : public PWebGPUChild {
|
|||
const dom::GPURequestAdapterOptions& aOptions);
|
||||
Maybe<RawId> AdapterRequestDevice(RawId aSelfId,
|
||||
const dom::GPUDeviceDescriptor& aDesc);
|
||||
RawId DeviceCreateBuffer(RawId aSelfId,
|
||||
const dom::GPUBufferDescriptor& aDesc);
|
||||
|
||||
private:
|
||||
virtual ~WebGPUChild();
|
||||
|
|
|
@ -48,6 +48,39 @@ ipc::IPCResult WebGPUParent::RecvDeviceDestroy(RawId aSelfId) {
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ipc::IPCResult WebGPUParent::RecvDeviceCreateBuffer(
|
||||
RawId aSelfId, const dom::GPUBufferDescriptor& aDesc, RawId aNewId) {
|
||||
ffi::WGPUBufferDescriptor desc = {};
|
||||
desc.usage = aDesc.mUsage;
|
||||
desc.size = aDesc.mSize;
|
||||
ffi::wgpu_server_device_create_buffer(mContext, aSelfId, &desc, aNewId);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ipc::IPCResult WebGPUParent::RecvDeviceMapBufferRead(
|
||||
RawId aSelfId, RawId aBufferId, Shmem&& shmem,
|
||||
DeviceMapBufferReadResolver&& resolver) {
|
||||
ffi::wgpu_server_device_get_buffer_sub_data(mContext, aSelfId, aBufferId, 0,
|
||||
shmem.get<uint8_t>(),
|
||||
shmem.Size<uint8_t>());
|
||||
resolver(std::move(shmem));
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ipc::IPCResult WebGPUParent::RecvDeviceUnmapBuffer(RawId aSelfId,
|
||||
RawId aBufferId,
|
||||
Shmem&& shmem) {
|
||||
ffi::wgpu_server_device_set_buffer_sub_data(mContext, aSelfId, aBufferId, 0,
|
||||
shmem.get<uint8_t>(),
|
||||
shmem.Size<uint8_t>());
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ipc::IPCResult WebGPUParent::RecvBufferDestroy(RawId aSelfId) {
|
||||
ffi::wgpu_server_buffer_destroy(mContext, aSelfId);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ipc::IPCResult WebGPUParent::RecvShutdown() {
|
||||
ffi::wgpu_server_delete(const_cast<ffi::WGPUGlobal*>(mContext));
|
||||
return IPC_OK();
|
||||
|
|
|
@ -29,6 +29,15 @@ class WebGPUParent final : public PWebGPUParent {
|
|||
const dom::GPUDeviceDescriptor& aDesc,
|
||||
RawId aNewId);
|
||||
ipc::IPCResult RecvDeviceDestroy(RawId aSelfId);
|
||||
ipc::IPCResult RecvDeviceCreateBuffer(RawId aSelfId,
|
||||
const dom::GPUBufferDescriptor& aDesc,
|
||||
RawId aNewId);
|
||||
ipc::IPCResult RecvDeviceMapBufferRead(
|
||||
RawId aSelfId, RawId aBufferId, Shmem&& shmem,
|
||||
DeviceMapBufferReadResolver&& resolver);
|
||||
ipc::IPCResult RecvDeviceUnmapBuffer(RawId aSelfId, RawId aBufferId,
|
||||
Shmem&& shmem);
|
||||
ipc::IPCResult RecvBufferDestroy(RawId aSelfId);
|
||||
ipc::IPCResult RecvShutdown();
|
||||
|
||||
private:
|
||||
|
|
|
@ -27,6 +27,8 @@ DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::dom::GPUExtensions,
|
|||
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::dom::GPULimits, mMaxBindGroups);
|
||||
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::dom::GPUDeviceDescriptor,
|
||||
mExtensions, mLimits);
|
||||
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::dom::GPUBufferDescriptor, mSize,
|
||||
mUsage);
|
||||
|
||||
#undef DEFINE_IPC_SERIALIZER_ENUM
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace mozilla {
|
|||
namespace webgpu {
|
||||
|
||||
typedef uint64_t RawId;
|
||||
typedef uint64_t BufferAddress;
|
||||
|
||||
} // namespace webgpu
|
||||
|
||||
|
|
|
@ -4,3 +4,4 @@ prefs = dom.webgpu.enable=true
|
|||
|
||||
[test_enabled.html]
|
||||
[test_device_creation.html]
|
||||
[test_buffer_mapping.html]
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
ok(SpecialPowers.getBoolPref('dom.webgpu.enable'), 'Pref should be enabled.');
|
||||
|
||||
const func = async function() {
|
||||
const adapter = await navigator.gpu.requestAdapter();
|
||||
const device = await adapter.requestDevice();
|
||||
const [buffer, mapping] = await device.createBufferMapped({
|
||||
size: 4,
|
||||
usage: GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_SRC, //TODO: remove the dummy usage
|
||||
});
|
||||
new Float32Array(mapping).set([1.0]);
|
||||
buffer.unmap();
|
||||
const data = await buffer.mapReadAsync();
|
||||
const value = new Float32Array(data)[0];
|
||||
buffer.unmap();
|
||||
ok(value == 1.0, 'value == 1.0');
|
||||
};
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
func().finally(() => SimpleTest.finish());
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -66,6 +66,9 @@ UNIFIED_SOURCES += [
|
|||
'ipc/WebGPUParent.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
|
||||
CXXFLAGS += ['-Werror=implicit-int-conversion']
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
|
|
@ -54,7 +54,7 @@ dictionary GPUObjectDescriptorBase {
|
|||
|
||||
[
|
||||
Pref="dom.webgpu.enable",
|
||||
Exposed=Window,
|
||||
Exposed=Window
|
||||
]
|
||||
interface GPU {
|
||||
// May reject with DOMException
|
||||
|
@ -105,8 +105,10 @@ interface GPUDevice {
|
|||
//GPULimits getLimits();
|
||||
//readonly attribute GPUAdapter adapter;
|
||||
|
||||
//GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
|
||||
//GPUMappedBuffer createBufferMapped(GPUBufferDescriptor descriptor);
|
||||
[NewObject]
|
||||
GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
|
||||
[NewObject, Throws]
|
||||
GPUMappedBuffer createBufferMapped(GPUBufferDescriptor descriptor);
|
||||
//Promise<GPUMappedBuffer> createBufferMappedAsync(GPUBufferDescriptor descriptor);
|
||||
//GPUTexture createTexture(GPUTextureDescriptor descriptor);
|
||||
//GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {});
|
||||
|
@ -202,9 +204,11 @@ dictionary GPUBufferDescriptor {
|
|||
[Pref="dom.webgpu.enable",
|
||||
Exposed=Window]
|
||||
interface GPUBuffer {
|
||||
//Promise<ArrayBuffer> mapReadAsync();
|
||||
[NewObject]
|
||||
Promise<ArrayBuffer> mapReadAsync();
|
||||
//Promise<ArrayBuffer> mapWriteAsync();
|
||||
//void unmap();
|
||||
[Throws]
|
||||
void unmap();
|
||||
|
||||
//void destroy();
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -18,35 +18,9 @@ name = "atom"
|
|||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace-sys"
|
||||
version = "0.1.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.0.4"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -56,22 +30,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "2.5.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.1"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.37"
|
||||
version = "1.0.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.9"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -79,21 +53,21 @@ name = "cloudabi"
|
|||
version = "0.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cocoa"
|
||||
version = "0.19.0"
|
||||
version = "0.19.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -112,7 +86,7 @@ version = "0.6.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -125,10 +99,10 @@ name = "core-graphics"
|
|||
version = "0.17.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -136,9 +110,9 @@ name = "d3d12"
|
|||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -159,39 +133,35 @@ name = "fxhash"
|
|||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.3.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gfx-auxil"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spirv_cross 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gfx-backend-dx11"
|
||||
version = "0.4.0"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-auxil 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spirv_cross 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wio 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -200,16 +170,16 @@ name = "gfx-backend-dx12"
|
|||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"d3d12 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-auxil 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spirv_cross 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -217,32 +187,32 @@ name = "gfx-backend-empty"
|
|||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cocoa 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cocoa 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-auxil 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"metal 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"metal 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spirv_cross 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"storage-map 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -252,28 +222,28 @@ name = "gfx-backend-vulkan"
|
|||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ash 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gfx-hal"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -286,20 +256,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.25"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"wasm-bindgen 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.3.0"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.55"
|
||||
version = "0.2.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -307,13 +277,13 @@ name = "libloading"
|
|||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -321,10 +291,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.6"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -332,38 +302,43 @@ name = "malloc_buf"
|
|||
version = "0.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maybe-uninit"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "metal"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cocoa 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cocoa 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc_exception 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc_exception 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc_exception"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -371,44 +346,44 @@ name = "parking_lot"
|
|||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.6.1"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.15"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.30"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.12"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -418,15 +393,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.3.0"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.54"
|
||||
version = "0.1.56"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -434,41 +409,35 @@ name = "relevant"
|
|||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rendy-descriptor"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"relevant 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rendy-memory"
|
||||
version = "0.5.0"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"colorful 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hibitset 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"relevant 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
|
@ -497,20 +466,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.91"
|
||||
version = "1.0.103"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.91"
|
||||
version = "1.0.103"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -518,8 +487,8 @@ name = "shared_library"
|
|||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -529,7 +498,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "0.6.9"
|
||||
version = "0.6.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -537,9 +514,9 @@ name = "spirv_cross"
|
|||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"js-sys 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -547,22 +524,22 @@ name = "storage-map"
|
|||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.15.34"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -572,72 +549,73 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.48"
|
||||
version = "0.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"wasm-bindgen-macro 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.48"
|
||||
version = "0.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bumpalo 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.48"
|
||||
version = "0.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-macro-support 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.48"
|
||||
version = "0.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-backend 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.48"
|
||||
version = "0.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-dx11 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-dx11 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-dx12 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-empty 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-metal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-metal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-vulkan 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rendy-descriptor 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rendy-memory 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rendy-descriptor 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rendy-memory 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -645,9 +623,9 @@ dependencies = [
|
|||
name = "wgpu-native"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wgpu-core 0.1.0",
|
||||
]
|
||||
|
||||
|
@ -655,14 +633,14 @@ dependencies = [
|
|||
name = "wgpu-remote"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wgpu-core 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -684,7 +662,7 @@ name = "wio"
|
|||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -692,25 +670,22 @@ name = "x11"
|
|||
version = "2.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[metadata]
|
||||
"checksum arrayvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ead801bcb8843bc91ea0a028f95b786f39ce519b1738de4e74a2a393332c2a16"
|
||||
"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
|
||||
"checksum ash 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "003d1fb2eb12eb06d4a03dbe02eea67a9fac910fa97932ab9e3a75b96a1ea5e5"
|
||||
"checksum atom 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3c86699c3f02778ec07158376991c8f783dd1f2f95c579ffaf0738dc984b2fe2"
|
||||
"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
|
||||
"checksum backtrace 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "f92d5d536fa03dc3d93711d97bac1fae2eb59aba467ca4c6600c0119da614f51"
|
||||
"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
|
||||
"checksum bumpalo 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cd43d82f27d68911e6ee11ee791fb248f138f5d69424dc02e098d4f152b0b05"
|
||||
"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb"
|
||||
"checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d"
|
||||
"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
|
||||
"checksum bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708"
|
||||
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||
"checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76"
|
||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||
"checksum cocoa 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8cd20045e880893b4a8286d5639e9ade85fb1f6a14c291f882cf8cf2149d37d9"
|
||||
"checksum cocoa 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f29f7768b2d1be17b96158e3285951d366b40211320fb30826a76cb7a0da6400"
|
||||
"checksum colorful 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0bca1619ff57dd7a56b58a8e25ef4199f123e78e503fe1653410350a1b98ae65"
|
||||
"checksum copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127"
|
||||
"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
|
||||
|
@ -720,57 +695,57 @@ dependencies = [
|
|||
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
||||
"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
|
||||
"checksum gfx-auxil 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572eee952a9a23c99cfe3e4fd95d277784058a89ac3c77ff6fa3d80a4e321919"
|
||||
"checksum gfx-backend-dx11 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee975e0f4e7f42d201685d2ceed8d77f946ef35d623095cadaf8526a259584f0"
|
||||
"checksum gfx-backend-dx11 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2cdc732e8cead82f5bfc8ce147ee0a2d8a425342aa7944f1c8f734e53ca3e6b"
|
||||
"checksum gfx-backend-dx12 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6e913cc800fb12eaba2c420091a02aca9aafbefd672600dfc5b52654343d341"
|
||||
"checksum gfx-backend-empty 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d383e6bc48867cb37d298a20139fd1eec298f8f6d594690cd1c50ef25470cc7"
|
||||
"checksum gfx-backend-metal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8de5c71f18ba805c95b84d6c78c472ef44485a6fc46e3b49fe1e6739c8d7b0c0"
|
||||
"checksum gfx-backend-metal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "15b8aa3d56d78283546ce51adb3db2826b64232ccea961f1d5c55ce986518632"
|
||||
"checksum gfx-backend-vulkan 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62538fedd66a78968a162e8e1a29d085ffbc97f8782634684b2f7da7aea59207"
|
||||
"checksum gfx-hal 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "977716fea7800ab5bc9a1e048dd2f72b23af166d8c2f48c6fb6d1ce37d77ca7e"
|
||||
"checksum gfx-hal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c88981665c780447bb08eb099e1ded330754a7246719bab927ee4a949c0ba7f"
|
||||
"checksum hibitset 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "47e7292fd9f7fe89fa35c98048f2d0a69b79ed243604234d18f6f8a1aa6f408d"
|
||||
"checksum js-sys 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)" = "da3ea71161651a4cd97d999b2da139109c537b15ab33abc8ae4ead38deac8a03"
|
||||
"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
|
||||
"checksum libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "42914d39aad277d9e176efbdad68acb1d5443ab65afe0e0e4f0d49352a950880"
|
||||
"checksum js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "1c840fdb2167497b0bd0db43d6dfe61e91637fa72f9d061f8bd17ddc44ba6414"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
|
||||
"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
|
||||
"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc"
|
||||
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
|
||||
"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586"
|
||||
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
|
||||
"checksum metal 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf8052f20601c7af6293d3f7bf7b9159aee5974804fe65d871d437f933ec1eb"
|
||||
"checksum objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "31d20fd2b37e07cf5125be68357b588672e8cefe9a96f8c17a9d46053b3e590d"
|
||||
"checksum objc_exception 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "098cd29a2fa3c230d3463ae069cecccc3fdfd64c0d2496ab5b96f82dab6a00dc"
|
||||
"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
"checksum metal 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f83c7dcc2038e12f68493fa3de44235df27b2497178e257185b4b5b5d028a1e4"
|
||||
"checksum objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
|
||||
"checksum objc_exception 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
|
||||
"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
|
||||
"checksum parking_lot_core 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a7bbaa05312363e0480e1efee133fff1a09ef4a6406b65e226b9a793c223a32"
|
||||
"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af"
|
||||
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db"
|
||||
"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
|
||||
"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
|
||||
"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5927936723a9e8b715d37d7e4b390455087c4bdf25b9f702309460577b14f9"
|
||||
"checksum raw-window-handle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e815b85b31e4d397ca9dd8eb1d692e9cb458b9f6ae8ac2232c995dca8236f87"
|
||||
"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252"
|
||||
"checksum raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211"
|
||||
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
|
||||
"checksum relevant 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bbc232e13d37f4547f5b9b42a5efc380cabe5dbc1807f8b893580640b2ab0308"
|
||||
"checksum rendy-descriptor 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b39c42e01e86db7d6652733bdb5617ab620dc0a5f335a1d14c443df084c809"
|
||||
"checksum rendy-memory 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "898bfc8b7522ba619b7d89aefcad1717e103a7662da2b62257b24625f9b3eba9"
|
||||
"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288"
|
||||
"checksum rendy-descriptor 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f475bcc0505946e998590f1f0545c52ef4b559174a1b353a7ce6638def8b621e"
|
||||
"checksum rendy-memory 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ed492161a819feae7f27f418bb16035276ac20649c60d756699152cb5c1960ec"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd"
|
||||
"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f"
|
||||
"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702"
|
||||
"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0"
|
||||
"checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"
|
||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||
"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be"
|
||||
"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
|
||||
"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"
|
||||
"checksum spirv_cross 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbbe441b3ac8ec0ae6a4f05234239bd372a241ce15793eef694e8b24afc267bb"
|
||||
"checksum storage-map 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0a4829a5c591dc24a944a736d6b1e4053e51339a79fd5d4702c4c999a9c45e"
|
||||
"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum wasm-bindgen 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "4de97fa1806bb1a99904216f6ac5e0c050dc4f8c676dc98775047c38e5c01b55"
|
||||
"checksum wasm-bindgen-backend 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "5d82c170ef9f5b2c63ad4460dfcee93f3ec04a9a36a4cc20bc973c39e59ab8e3"
|
||||
"checksum wasm-bindgen-macro 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f07d50f74bf7a738304f6b8157f4a581e1512cd9e9cdb5baad8c31bbe8ffd81d"
|
||||
"checksum wasm-bindgen-macro-support 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "95cf8fe77e45ba5f91bc8f3da0c3aa5d464b3d8ed85d84f4d4c7cc106436b1d7"
|
||||
"checksum wasm-bindgen-shared 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "d9c2d4d4756b2e46d3a5422e06277d02e4d3e1d62d138b76a4c681e925743623"
|
||||
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
|
||||
"checksum wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "29ae32af33bacd663a9a28241abecf01f2be64e6a185c6139b04f18b6385c5f2"
|
||||
"checksum wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "1845584bd3593442dc0de6e6d9f84454a59a057722f36f005e44665d6ab19d85"
|
||||
"checksum wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "87fcc747e6b73c93d22c947a6334644d22cfec5abd8b66238484dc2b0aeb9fe4"
|
||||
"checksum wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc4b3f2c4078c8c4a5f363b92fcf62604c5913cbd16c6ff5aaf0f74ec03f570"
|
||||
"checksum wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ca0b78d6d3be8589b95d1d49cdc0794728ca734adf36d7c9f07e6459508bb53d"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
"checksum wio 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"
|
||||
|
|
|
@ -31,7 +31,7 @@ endif
|
|||
run-example-compute run-example-triangle run-example-remote
|
||||
|
||||
#TODO: example-remote
|
||||
all: example-compute example-triangle
|
||||
all: example-compute example-triangle lib-remote
|
||||
|
||||
check:
|
||||
cargo check --all
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::{
|
|||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
use std::convert::identity;
|
||||
use std::slice;
|
||||
|
||||
pub const DEFAULT_BIND_GROUPS: usize = 4;
|
||||
type BindGroupMask = u8;
|
||||
|
@ -36,16 +36,21 @@ pub enum Provision {
|
|||
Changed { was_compatible: bool },
|
||||
}
|
||||
|
||||
struct TakeSome<I> {
|
||||
iter: I,
|
||||
#[derive(Clone)]
|
||||
pub struct FollowUpIter<'a> {
|
||||
iter: slice::Iter<'a, BindGroupEntry>,
|
||||
}
|
||||
impl<T, I> Iterator for TakeSome<I>
|
||||
where
|
||||
I: Iterator<Item = Option<T>>,
|
||||
{
|
||||
type Item = T;
|
||||
fn next(&mut self) -> Option<T> {
|
||||
self.iter.next().and_then(identity)
|
||||
impl<'a> Iterator for FollowUpIter<'a> {
|
||||
type Item = (BindGroupId, &'a [BufferAddress]);
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.iter
|
||||
.next()
|
||||
.and_then(|entry| {
|
||||
Some((
|
||||
entry.actual_value()?,
|
||||
entry.dynamic_offsets.as_slice(),
|
||||
))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,11 +168,7 @@ impl Binder {
|
|||
bind_group_id: BindGroupId,
|
||||
bind_group: &BindGroup<B>,
|
||||
offsets: &[BufferAddress],
|
||||
) -> Option<(
|
||||
PipelineLayoutId,
|
||||
impl 'a + Iterator<Item = BindGroupId>,
|
||||
impl 'a + Iterator<Item = &'a BufferAddress>,
|
||||
)> {
|
||||
) -> Option<(PipelineLayoutId, FollowUpIter<'a>)> {
|
||||
log::trace!("\tBinding [{}] = group {:?}", index, bind_group_id);
|
||||
debug_assert_eq!(B::VARIANT, bind_group_id.backend());
|
||||
|
||||
|
@ -184,14 +185,9 @@ impl Binder {
|
|||
log::trace!("\t\tbinding up to {}", end);
|
||||
Some((
|
||||
self.pipeline_layout_id?,
|
||||
TakeSome {
|
||||
iter: self.entries[index + 1 .. end]
|
||||
.iter()
|
||||
.map(|entry| entry.actual_value()),
|
||||
},
|
||||
self.entries[index + 1 .. end]
|
||||
.iter()
|
||||
.flat_map(|entry| entry.dynamic_offsets.as_slice()),
|
||||
FollowUpIter {
|
||||
iter: self.entries[index + 1 .. end].iter(),
|
||||
}
|
||||
))
|
||||
} else {
|
||||
log::trace!("\t\tskipping above compatible {}", compatible_count);
|
||||
|
|
|
@ -116,12 +116,12 @@ impl<F> Global<F> {
|
|||
&*texture_guard,
|
||||
);
|
||||
|
||||
if let Some((pipeline_layout_id, follow_up_sets, follow_up_offsets)) = pass
|
||||
if let Some((pipeline_layout_id, follow_ups)) = pass
|
||||
.binder
|
||||
.provide_entry(index as usize, bind_group_id, bind_group, offsets)
|
||||
{
|
||||
let bind_groups = iter::once(bind_group.raw.raw())
|
||||
.chain(follow_up_sets.map(|bg_id| bind_group_guard[bg_id].raw.raw()));
|
||||
.chain(follow_ups.clone().map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()));
|
||||
unsafe {
|
||||
pass.raw.bind_compute_descriptor_sets(
|
||||
&pipeline_layout_guard[pipeline_layout_id].raw,
|
||||
|
@ -129,7 +129,7 @@ impl<F> Global<F> {
|
|||
bind_groups,
|
||||
offsets
|
||||
.iter()
|
||||
.chain(follow_up_offsets)
|
||||
.chain(follow_ups.flat_map(|(_, offsets)| offsets))
|
||||
.map(|&off| off as hal::command::DescriptorSetOffset),
|
||||
);
|
||||
}
|
||||
|
@ -161,8 +161,9 @@ impl<F> Global<F> {
|
|||
) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
let (mut pass_guard, mut token) = hub.compute_passes.write(&mut token);
|
||||
let (buffer_guard, _) = hub.buffers.read(&mut token);
|
||||
let (mut pass_guard, _) = hub.compute_passes.write(&mut token);
|
||||
|
||||
let pass = &mut pass_guard[pass_id];
|
||||
|
||||
let (src_buffer, src_pending) = pass.trackers.buffers.use_replace(
|
||||
|
|
|
@ -247,12 +247,12 @@ impl<F: IdentityFilter<RenderPassId>> Global<F> {
|
|||
|
||||
pass.trackers.merge_extend(&bind_group.used);
|
||||
|
||||
if let Some((pipeline_layout_id, follow_up_sets, follow_up_offsets)) = pass
|
||||
if let Some((pipeline_layout_id, follow_ups)) = pass
|
||||
.binder
|
||||
.provide_entry(index as usize, bind_group_id, bind_group, offsets)
|
||||
{
|
||||
let bind_groups = iter::once(bind_group.raw.raw())
|
||||
.chain(follow_up_sets.map(|bg_id| bind_group_guard[bg_id].raw.raw()));
|
||||
.chain(follow_ups.clone().map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()));
|
||||
unsafe {
|
||||
pass.raw.bind_graphics_descriptor_sets(
|
||||
&&pipeline_layout_guard[pipeline_layout_id].raw,
|
||||
|
@ -260,7 +260,7 @@ impl<F: IdentityFilter<RenderPassId>> Global<F> {
|
|||
bind_groups,
|
||||
offsets
|
||||
.iter()
|
||||
.chain(follow_up_offsets)
|
||||
.chain(follow_ups.flat_map(|(_, offsets)| offsets))
|
||||
.map(|&off| off as hal::command::DescriptorSetOffset),
|
||||
);
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ impl<F: IdentityFilter<RenderPassId>> Global<F> {
|
|||
) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
let (mut pass_guard, _) = hub.render_passes.write(&mut token);
|
||||
let (mut pass_guard, mut token) = hub.render_passes.write(&mut token);
|
||||
let (buffer_guard, _) = hub.buffers.read(&mut token);
|
||||
let pass = &mut pass_guard[pass_id];
|
||||
pass.is_ready().unwrap();
|
||||
|
@ -447,7 +447,7 @@ impl<F: IdentityFilter<RenderPassId>> Global<F> {
|
|||
) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
let (mut pass_guard, _) = hub.render_passes.write(&mut token);
|
||||
let (mut pass_guard, mut token) = hub.render_passes.write(&mut token);
|
||||
let (buffer_guard, _) = hub.buffers.read(&mut token);
|
||||
let pass = &mut pass_guard[pass_id];
|
||||
pass.is_ready().unwrap();
|
||||
|
|
|
@ -169,7 +169,6 @@ impl<F> Global<F> {
|
|||
range: pending.selector,
|
||||
});
|
||||
|
||||
let aspects = dst_texture.full_range.aspects;
|
||||
let bytes_per_texel = conv::map_texture_format(dst_texture.format, cmb.features)
|
||||
.surface_desc()
|
||||
.bits as u32
|
||||
|
@ -246,7 +245,6 @@ impl<F> Global<F> {
|
|||
range: None .. None,
|
||||
});
|
||||
|
||||
let aspects = src_texture.full_range.aspects;
|
||||
let bytes_per_texel = conv::map_texture_format(src_texture.format, cmb.features)
|
||||
.surface_desc()
|
||||
.bits as u32
|
||||
|
@ -328,7 +326,6 @@ impl<F> Global<F> {
|
|||
range: pending.selector,
|
||||
}));
|
||||
|
||||
let aspects = src_texture.full_range.aspects & dst_texture.full_range.aspects;
|
||||
let region = hal::command::ImageCopy {
|
||||
src_subresource: source.to_sub_layers(aspects),
|
||||
src_offset: conv::map_origin(source.origin),
|
||||
|
|
|
@ -35,7 +35,7 @@ pub fn map_buffer_usage(
|
|||
if usage.contains(W::UNIFORM) {
|
||||
hal_usage |= U::UNIFORM;
|
||||
}
|
||||
if usage.contains(W::STORAGE) {
|
||||
if usage.intersects(W::STORAGE | W::STORAGE_READ) {
|
||||
hal_usage |= U::STORAGE;
|
||||
}
|
||||
if usage.contains(W::INDIRECT) {
|
||||
|
|
|
@ -481,6 +481,27 @@ fn map_buffer<B: hal::Backend>(
|
|||
Ok(ptr.as_ptr())
|
||||
}
|
||||
|
||||
fn unmap_buffer<B: hal::Backend>(
|
||||
raw: &B::Device,
|
||||
buffer: &mut resource::Buffer<B>,
|
||||
) {
|
||||
if !buffer.mapped_write_ranges.is_empty() {
|
||||
unsafe {
|
||||
raw
|
||||
.flush_mapped_memory_ranges(
|
||||
buffer
|
||||
.mapped_write_ranges
|
||||
.iter()
|
||||
.map(|r| (buffer.memory.memory(), r.clone())),
|
||||
)
|
||||
.unwrap()
|
||||
};
|
||||
buffer.mapped_write_ranges.clear();
|
||||
}
|
||||
|
||||
buffer.memory.unmap(raw);
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Device<B: hal::Backend> {
|
||||
pub(crate) raw: B::Device,
|
||||
|
@ -790,7 +811,7 @@ impl<F: IdentityFilter<BufferId>> Global<F> {
|
|||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
|
||||
let (device_guard, _) = hub.devices.read(&mut token);
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let buffer = device.create_buffer(device_id, desc);
|
||||
let ref_count = buffer.life_guard.ref_count.clone();
|
||||
|
@ -818,7 +839,7 @@ impl<F: IdentityFilter<BufferId>> Global<F> {
|
|||
let mut desc = desc.clone();
|
||||
desc.usage |= resource::BufferUsage::MAP_WRITE;
|
||||
|
||||
let (device_guard, _) = hub.devices.read(&mut token);
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let mut buffer = device.create_buffer(device_id, &desc);
|
||||
let ref_count = buffer.life_guard.ref_count.clone();
|
||||
|
@ -846,6 +867,76 @@ impl<F: IdentityFilter<BufferId>> Global<F> {
|
|||
id
|
||||
}
|
||||
|
||||
pub fn device_set_buffer_sub_data<B: GfxBackend>(
|
||||
&self,
|
||||
device_id: DeviceId,
|
||||
buffer_id: BufferId,
|
||||
offset: BufferAddress,
|
||||
data: &[u8],
|
||||
) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let (mut buffer_guard, _) = hub.buffers.write(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let mut buffer = &mut buffer_guard[buffer_id];
|
||||
assert!(buffer.usage.contains(resource::BufferUsage::MAP_WRITE));
|
||||
//assert!(buffer isn't used by the GPU);
|
||||
|
||||
match map_buffer(
|
||||
&device.raw,
|
||||
&mut buffer,
|
||||
offset .. offset + data.len() as BufferAddress,
|
||||
HostMap::Write,
|
||||
) {
|
||||
Ok(ptr) => unsafe {
|
||||
ptr::copy_nonoverlapping(data.as_ptr(), ptr, data.len());
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("failed to map a buffer: {:?}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
unmap_buffer(&device.raw, buffer);
|
||||
}
|
||||
|
||||
pub fn device_get_buffer_sub_data<B: GfxBackend>(
|
||||
&self,
|
||||
device_id: DeviceId,
|
||||
buffer_id: BufferId,
|
||||
offset: BufferAddress,
|
||||
data: &mut [u8],
|
||||
) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let (mut buffer_guard, _) = hub.buffers.write(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let mut buffer = &mut buffer_guard[buffer_id];
|
||||
assert!(buffer.usage.contains(resource::BufferUsage::MAP_READ));
|
||||
//assert!(buffer isn't used by the GPU);
|
||||
|
||||
match map_buffer(
|
||||
&device.raw,
|
||||
&mut buffer,
|
||||
offset .. offset + data.len() as BufferAddress,
|
||||
HostMap::Read,
|
||||
) {
|
||||
Ok(ptr) => unsafe {
|
||||
ptr::copy_nonoverlapping(ptr, data.as_mut_ptr(), data.len());
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("failed to map a buffer: {:?}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
unmap_buffer(&device.raw, buffer);
|
||||
}
|
||||
|
||||
pub fn buffer_destroy<B: GfxBackend>(&self, buffer_id: BufferId) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
|
@ -869,7 +960,7 @@ impl<F: IdentityFilter<TextureId>> Global<F> {
|
|||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
|
||||
let (device_guard, _) = hub.devices.read(&mut token);
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let texture = device.create_texture(device_id, desc);
|
||||
let range = texture.full_range.clone();
|
||||
|
@ -1176,7 +1267,7 @@ impl<F: IdentityFilter<BindGroupId>> Global<F> {
|
|||
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let device = &device_guard[device_id];
|
||||
let (bind_group_layout_guard, _) = hub.bind_group_layouts.read(&mut token);
|
||||
let (bind_group_layout_guard, mut token) = hub.bind_group_layouts.read(&mut token);
|
||||
let bind_group_layout = &bind_group_layout_guard[desc.layout];
|
||||
let bindings =
|
||||
unsafe { slice::from_raw_parts(desc.bindings, desc.bindings_length as usize) };
|
||||
|
@ -1983,8 +2074,9 @@ impl<F: IdentityFilter<SwapChainId>> Global<F> {
|
|||
impl<F: AllIdentityFilter> Global<F> {
|
||||
pub fn device_poll<B: GfxBackend>(&self, device_id: DeviceId, force_wait: bool) {
|
||||
let hub = B::hub(self);
|
||||
let mut token = Token::root();
|
||||
let callbacks = {
|
||||
let (device_guard, mut token) = hub.devices.read(&mut Token::root());
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
device_guard[device_id].maintain(self, force_wait, &mut token)
|
||||
};
|
||||
Device::<B>::fire_map_callbacks(callbacks);
|
||||
|
@ -1994,7 +2086,8 @@ impl<F: AllIdentityFilter> Global<F> {
|
|||
impl<F: AllIdentityFilter + IdentityFilter<DeviceId>> Global<F> {
|
||||
pub fn device_destroy<B: GfxBackend>(&self, device_id: DeviceId) {
|
||||
let hub = B::hub(self);
|
||||
let (device, mut token) = hub.devices.unregister(device_id, &mut Token::root());
|
||||
let mut token = Token::root();
|
||||
let (device, mut token) = hub.devices.unregister(device_id, &mut token);
|
||||
device.maintain(self, true, &mut token);
|
||||
device.com_allocator.destroy(&device.raw);
|
||||
}
|
||||
|
@ -2049,24 +2142,11 @@ impl<F> Global<F> {
|
|||
|
||||
let (device_guard, mut token) = hub.devices.read(&mut token);
|
||||
let (mut buffer_guard, _) = hub.buffers.write(&mut token);
|
||||
|
||||
let buffer = &mut buffer_guard[buffer_id];
|
||||
let device_raw = &device_guard[buffer.device_id.value].raw;
|
||||
|
||||
if !buffer.mapped_write_ranges.is_empty() {
|
||||
unsafe {
|
||||
device_raw
|
||||
.flush_mapped_memory_ranges(
|
||||
buffer
|
||||
.mapped_write_ranges
|
||||
.iter()
|
||||
.map(|r| (buffer.memory.memory(), r.clone())),
|
||||
)
|
||||
.unwrap()
|
||||
};
|
||||
buffer.mapped_write_ranges.clear();
|
||||
}
|
||||
|
||||
buffer.memory.unmap(device_raw);
|
||||
unmap_buffer(
|
||||
&device_guard[buffer.device_id.value].raw,
|
||||
buffer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,6 +167,7 @@ impl<B: hal::Backend> Access<BindGroupLayout<B>> for Root {}
|
|||
impl<B: hal::Backend> Access<BindGroupLayout<B>> for Device<B> {}
|
||||
impl<B: hal::Backend> Access<BindGroup<B>> for Root {}
|
||||
impl<B: hal::Backend> Access<BindGroup<B>> for Device<B> {}
|
||||
impl<B: hal::Backend> Access<BindGroup<B>> for BindGroupLayout<B> {}
|
||||
impl<B: hal::Backend> Access<BindGroup<B>> for PipelineLayout<B> {}
|
||||
impl<B: hal::Backend> Access<BindGroup<B>> for CommandBuffer<B> {}
|
||||
impl<B: hal::Backend> Access<CommandBuffer<B>> for Root {}
|
||||
|
@ -319,17 +320,17 @@ impl<T, I: TypedId + Copy, F> Registry<T, I, F> {
|
|||
assert!(old.is_none());
|
||||
}
|
||||
|
||||
pub fn read<A: Access<T>>(
|
||||
&self,
|
||||
_token: &mut Token<A>,
|
||||
) -> (RwLockReadGuard<Storage<T, I>>, Token<T>) {
|
||||
pub fn read<'a, A: Access<T>>(
|
||||
&'a self,
|
||||
_token: &'a mut Token<A>,
|
||||
) -> (RwLockReadGuard<'a, Storage<T, I>>, Token<'a, T>) {
|
||||
(self.data.read(), Token::new())
|
||||
}
|
||||
|
||||
pub fn write<A: Access<T>>(
|
||||
&self,
|
||||
_token: &mut Token<A>,
|
||||
) -> (RwLockWriteGuard<Storage<T, I>>, Token<T>) {
|
||||
pub fn write<'a, A: Access<T>>(
|
||||
&'a self,
|
||||
_token: &'a mut Token<A>,
|
||||
) -> (RwLockWriteGuard<'a, Storage<T, I>>, Token<'a, T>) {
|
||||
(self.data.write(), Token::new())
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +347,11 @@ impl<T, I: TypedId + Copy, F: IdentityFilter<I>> Registry<T, I, F> {
|
|||
id
|
||||
}
|
||||
|
||||
pub fn unregister<A: Access<T>>(&self, id: I, _token: &mut Token<A>) -> (T, Token<T>) {
|
||||
pub fn unregister<'a, A: Access<T>>(
|
||||
&self,
|
||||
id: I,
|
||||
_token: &'a mut Token<A>,
|
||||
) -> (T, Token<'a, T>) {
|
||||
let value = self.data.write().remove(id).unwrap();
|
||||
//Note: careful about the order here!
|
||||
self.identity.free(id);
|
||||
|
@ -433,6 +438,7 @@ impl<B: hal::Backend, F> Drop for Hub<B, F> {
|
|||
}
|
||||
}
|
||||
for (_, (buffer, _)) in self.buffers.data.write().map.drain() {
|
||||
//TODO: unmap if needed
|
||||
unsafe {
|
||||
devices[buffer.device_id.value]
|
||||
.raw
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::{
|
|||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub use hal::adapter::AdapterInfo;
|
||||
pub use hal::adapter::{AdapterInfo, DeviceType};
|
||||
use hal::{self, adapter::PhysicalDevice as _, queue::QueueFamily as _, Instance as _};
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ pub fn wgpu_create_surface(raw_handle: raw_window_handle::RawWindowHandle) -> id
|
|||
let instance = &GLOBAL.instance;
|
||||
let surface = match raw_handle {
|
||||
#[cfg(target_os = "ios")]
|
||||
Rwh::IOS(h) => Surface {
|
||||
Rwh::IOS(h) => core::instance::Surface {
|
||||
#[cfg(feature = "vulkan-portability")]
|
||||
vulkan: None,
|
||||
metal: instance
|
||||
|
|
|
@ -6,6 +6,7 @@ authors = [
|
|||
"Joshua Groves <josh@joshgroves.com>",
|
||||
]
|
||||
edition = "2018"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[lib]
|
||||
# Enabling these targets makes our CI bots try to build them and fail atm
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use core::{
|
||||
hub::IdentityManager,
|
||||
id::{AdapterId, DeviceId},
|
||||
id,
|
||||
Backend,
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@ pub mod server;
|
|||
struct IdentityHub {
|
||||
adapters: IdentityManager,
|
||||
devices: IdentityManager,
|
||||
buffers: IdentityManager,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
|
@ -77,7 +78,7 @@ pub extern "C" fn wgpu_client_delete(client: *mut Client) {
|
|||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_make_adapter_ids(
|
||||
client: &Client,
|
||||
ids: *mut AdapterId,
|
||||
ids: *mut id::AdapterId,
|
||||
id_length: usize,
|
||||
) -> usize {
|
||||
let mut identities = client.identities.lock();
|
||||
|
@ -101,7 +102,7 @@ pub extern "C" fn wgpu_client_make_adapter_ids(
|
|||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_kill_adapter_ids(
|
||||
client: &Client,
|
||||
ids: *const AdapterId,
|
||||
ids: *const id::AdapterId,
|
||||
id_length: usize,
|
||||
) {
|
||||
let mut identity = client.identities.lock();
|
||||
|
@ -112,7 +113,7 @@ pub extern "C" fn wgpu_client_kill_adapter_ids(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_make_device_id(client: &Client, adapter_id: AdapterId) -> DeviceId {
|
||||
pub extern "C" fn wgpu_client_make_device_id(client: &Client, adapter_id: id::AdapterId) -> id::DeviceId {
|
||||
let backend = adapter_id.backend();
|
||||
client
|
||||
.identities
|
||||
|
@ -123,7 +124,7 @@ pub extern "C" fn wgpu_client_make_device_id(client: &Client, adapter_id: Adapte
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_kill_device_id(client: &Client, id: DeviceId) {
|
||||
pub extern "C" fn wgpu_client_kill_device_id(client: &Client, id: id::DeviceId) {
|
||||
client
|
||||
.identities
|
||||
.lock()
|
||||
|
@ -131,3 +132,24 @@ pub extern "C" fn wgpu_client_kill_device_id(client: &Client, id: DeviceId) {
|
|||
.devices
|
||||
.free(id)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_make_buffer_id(client: &Client, device_id: id::DeviceId) -> id::BufferId {
|
||||
let backend = device_id.backend();
|
||||
client
|
||||
.identities
|
||||
.lock()
|
||||
.select(backend)
|
||||
.buffers
|
||||
.alloc(backend)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_client_kill_buffer_id(client: &Client, id: id::BufferId) {
|
||||
client
|
||||
.identities
|
||||
.lock()
|
||||
.select(id.backend())
|
||||
.buffers
|
||||
.free(id)
|
||||
}
|
||||
|
|
|
@ -2,18 +2,20 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use core::{gfx_select, hub::Global, id};
|
||||
use core::{gfx_select, id};
|
||||
|
||||
use std::slice;
|
||||
|
||||
pub type Global = core::hub::Global<()>;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_new() -> *mut Global<()> {
|
||||
pub extern "C" fn wgpu_server_new() -> *mut Global {
|
||||
log::info!("Initializing WGPU server");
|
||||
Box::into_raw(Box::new(Global::new("wgpu")))
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_delete(global: *mut Global<()>) {
|
||||
pub extern "C" fn wgpu_server_delete(global: *mut Global) {
|
||||
log::info!("Terminating WGPU server");
|
||||
unsafe { Box::from_raw(global) }.delete();
|
||||
log::info!("\t...done");
|
||||
|
@ -25,7 +27,7 @@ pub extern "C" fn wgpu_server_delete(global: *mut Global<()>) {
|
|||
/// Returns the index in this list, or -1 if unable to pick.
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_instance_request_adapter(
|
||||
global: &Global<()>,
|
||||
global: &Global,
|
||||
desc: &core::instance::RequestAdapterOptions,
|
||||
ids: *const id::AdapterId,
|
||||
id_length: usize,
|
||||
|
@ -42,7 +44,7 @@ pub extern "C" fn wgpu_server_instance_request_adapter(
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_adapter_request_device(
|
||||
global: &Global<()>,
|
||||
global: &Global,
|
||||
self_id: id::AdapterId,
|
||||
desc: &core::instance::DeviceDescriptor,
|
||||
new_id: id::DeviceId,
|
||||
|
@ -51,6 +53,51 @@ pub extern "C" fn wgpu_server_adapter_request_device(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_device_destroy(global: &Global<()>, self_id: id::DeviceId) {
|
||||
pub extern "C" fn wgpu_server_device_destroy(global: &Global, self_id: id::DeviceId) {
|
||||
gfx_select!(self_id => global.device_destroy(self_id))
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_device_create_buffer(
|
||||
global: &Global,
|
||||
self_id: id::DeviceId,
|
||||
desc: &core::resource::BufferDescriptor,
|
||||
new_id: id::BufferId,
|
||||
) {
|
||||
gfx_select!(self_id => global.device_create_buffer(self_id, desc, new_id));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_device_set_buffer_sub_data(
|
||||
global: &Global,
|
||||
self_id: id::DeviceId,
|
||||
buffer_id: id::BufferId,
|
||||
offset: core::BufferAddress,
|
||||
data: *const u8,
|
||||
size: core::BufferAddress,
|
||||
) {
|
||||
let slice = unsafe {
|
||||
slice::from_raw_parts(data, size as usize)
|
||||
};
|
||||
gfx_select!(self_id => global.device_set_buffer_sub_data(self_id, buffer_id, offset, slice));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_device_get_buffer_sub_data(
|
||||
global: &Global,
|
||||
self_id: id::DeviceId,
|
||||
buffer_id: id::BufferId,
|
||||
offset: core::BufferAddress,
|
||||
data: *mut u8,
|
||||
size: core::BufferAddress,
|
||||
) {
|
||||
let slice = unsafe {
|
||||
slice::from_raw_parts_mut(data, size as usize)
|
||||
};
|
||||
gfx_select!(self_id => global.device_get_buffer_sub_data(self_id, buffer_id, offset, slice));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_server_buffer_destroy(global: &Global, self_id: id::BufferId) {
|
||||
gfx_select!(self_id => global.buffer_destroy(self_id));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче