OpenGL: Split off QueueGL
This commit is contained in:
parent
77d1f10493
commit
a714f5b459
|
@ -77,6 +77,8 @@ if (NXT_ENABLE_OPENGL)
|
||||||
${OPENGL_DIR}/PipelineGL.h
|
${OPENGL_DIR}/PipelineGL.h
|
||||||
${OPENGL_DIR}/PipelineLayoutGL.cpp
|
${OPENGL_DIR}/PipelineLayoutGL.cpp
|
||||||
${OPENGL_DIR}/PipelineLayoutGL.h
|
${OPENGL_DIR}/PipelineLayoutGL.h
|
||||||
|
${OPENGL_DIR}/QueueGL.cpp
|
||||||
|
${OPENGL_DIR}/QueueGL.h
|
||||||
${OPENGL_DIR}/RenderPipelineGL.cpp
|
${OPENGL_DIR}/RenderPipelineGL.cpp
|
||||||
${OPENGL_DIR}/RenderPipelineGL.h
|
${OPENGL_DIR}/RenderPipelineGL.h
|
||||||
${OPENGL_DIR}/SamplerGL.cpp
|
${OPENGL_DIR}/SamplerGL.cpp
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2017 The NXT Authors
|
// Copyright 2018 The NXT Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
#include "backend/opengl/DepthStencilStateGL.h"
|
#include "backend/opengl/DepthStencilStateGL.h"
|
||||||
#include "backend/opengl/InputStateGL.h"
|
#include "backend/opengl/InputStateGL.h"
|
||||||
#include "backend/opengl/PipelineLayoutGL.h"
|
#include "backend/opengl/PipelineLayoutGL.h"
|
||||||
|
#include "backend/opengl/QueueGL.h"
|
||||||
#include "backend/opengl/RenderPipelineGL.h"
|
#include "backend/opengl/RenderPipelineGL.h"
|
||||||
#include "backend/opengl/SamplerGL.h"
|
#include "backend/opengl/SamplerGL.h"
|
||||||
#include "backend/opengl/ShaderModuleGL.h"
|
#include "backend/opengl/ShaderModuleGL.h"
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "nxt/nxtcpp.h"
|
#include "nxt/nxtcpp.h"
|
||||||
|
|
||||||
#include "backend/Device.h"
|
#include "backend/Device.h"
|
||||||
#include "backend/Queue.h"
|
|
||||||
#include "backend/opengl/Forward.h"
|
#include "backend/opengl/Forward.h"
|
||||||
|
|
||||||
#include "glad/glad.h"
|
#include "glad/glad.h"
|
||||||
|
@ -53,14 +52,6 @@ namespace backend { namespace opengl {
|
||||||
const nxt::SamplerDescriptor* descriptor) override;
|
const nxt::SamplerDescriptor* descriptor) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Queue : public QueueBase {
|
|
||||||
public:
|
|
||||||
Queue(Device* device);
|
|
||||||
|
|
||||||
// NXT API
|
|
||||||
void Submit(uint32_t numCommands, CommandBuffer* const* commands);
|
|
||||||
};
|
|
||||||
|
|
||||||
}} // namespace backend::opengl
|
}} // namespace backend::opengl
|
||||||
|
|
||||||
#endif // BACKEND_OPENGL_DEVICEGL_H_
|
#endif // BACKEND_OPENGL_DEVICEGL_H_
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "backend/opengl/InputStateGL.h"
|
#include "backend/opengl/InputStateGL.h"
|
||||||
#include "backend/opengl/PersistentPipelineStateGL.h"
|
#include "backend/opengl/PersistentPipelineStateGL.h"
|
||||||
#include "backend/opengl/PipelineLayoutGL.h"
|
#include "backend/opengl/PipelineLayoutGL.h"
|
||||||
|
#include "backend/opengl/QueueGL.h"
|
||||||
#include "backend/opengl/RenderPipelineGL.h"
|
#include "backend/opengl/RenderPipelineGL.h"
|
||||||
#include "backend/opengl/SamplerGL.h"
|
#include "backend/opengl/SamplerGL.h"
|
||||||
#include "backend/opengl/ShaderModuleGL.h"
|
#include "backend/opengl/ShaderModuleGL.h"
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
// Copyright 2018 The NXT Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include "backend/opengl/QueueGL.h"
|
||||||
|
|
||||||
|
#include "backend/opengl/CommandBufferGL.h"
|
||||||
|
#include "backend/opengl/DeviceGL.h"
|
||||||
|
|
||||||
|
namespace backend { namespace opengl {
|
||||||
|
|
||||||
|
Queue::Queue(Device* device) : QueueBase(device) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void Queue::Submit(uint32_t numCommands, CommandBuffer* const* commands) {
|
||||||
|
for (uint32_t i = 0; i < numCommands; ++i) {
|
||||||
|
commands[i]->Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}} // namespace backend::opengl
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright 2018 The NXT Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#ifndef BACKEND_OPENGL_QUEUEGL_H_
|
||||||
|
#define BACKEND_OPENGL_QUEUEGL_H_
|
||||||
|
|
||||||
|
#include "backend/Queue.h"
|
||||||
|
|
||||||
|
namespace backend { namespace opengl {
|
||||||
|
|
||||||
|
class CommandBuffer;
|
||||||
|
class Device;
|
||||||
|
|
||||||
|
class Queue : public QueueBase {
|
||||||
|
public:
|
||||||
|
Queue(Device* device);
|
||||||
|
|
||||||
|
// NXT API
|
||||||
|
void Submit(uint32_t numCommands, CommandBuffer* const* commands);
|
||||||
|
};
|
||||||
|
|
||||||
|
}} // namespace backend::opengl
|
||||||
|
|
||||||
|
#endif // BACKEND_OPENGL_QUEUEGL_H_
|
Loading…
Reference in New Issue