Compare commits
No commits in common. "4cdb39c6ba77e5f30cb14a4f1cf41b4f7e4a97c1" and "cfb76c7d7821f6ffaacf0e51f921f6bca137a378" have entirely different histories.
4cdb39c6ba
...
cfb76c7d78
|
|
@ -386,7 +386,7 @@ struct Frame
|
|||
// TODO: ThreadSafe
|
||||
_internal::GraphicsContextPool m_PrimaryPool;
|
||||
_internal::TransferContextPool m_AsyncTransferPool;
|
||||
_internal::ComputeContextPool m_AsyncComputePool;
|
||||
_internal::ContextPool m_AsyncComputePool;
|
||||
|
||||
vk::Fence m_FrameAvailableFence;
|
||||
vk::Semaphore m_ImageAcquireSem;
|
||||
|
|
@ -402,7 +402,6 @@ struct Frame
|
|||
void Reset(u32 imageIdx, vk::Image swapchainImage, vk::ImageView swapchainImageView, Size2D swapchainSize);
|
||||
GraphicsContext CreateGraphicsContext();
|
||||
TransferContext CreateAsyncTransferContext();
|
||||
ComputeContext CreateAsyncComputeContext();
|
||||
void WaitUntilReady();
|
||||
|
||||
Frame() = default;
|
||||
|
|
@ -542,12 +541,15 @@ class Device final
|
|||
PipelineCreationError
|
||||
CreateShaders(eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> &shadersOut,
|
||||
Slang::ComPtr<slang::IComponentType> &program, std::span<ShaderInfo const> const &shaders);
|
||||
systems::PipelineCreationError
|
||||
CreateShader(vk::PipelineShaderStageCreateInfo &shadersOut, Slang::ComPtr<slang::IComponentType> &program,
|
||||
ShaderInfo const &shaders);
|
||||
PipelineCreationError
|
||||
CreatePipelineLayout(vk::PipelineLayout &pipelineLayout, Slang::ComPtr<slang::IComponentType> const &program);
|
||||
|
||||
public:
|
||||
// Pipelines, unlike the other resources, are not ref-counted.
|
||||
PipelineCreationError CreateGraphicsPipeline(Pipeline &pipeline, GraphicsPipelineCreateInfo const &createInfo);
|
||||
PipelineCreationError CreatePipeline(Pipeline &pipeline, GraphicsPipelineCreateInfo const &createInfo);
|
||||
PipelineCreationError CreateComputePipeline(Pipeline &pipeline, ComputePipelineCreateInfo const &createInfo);
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ systems::Device::CreateSampler(SamplerCreateInfo const &createInfo)
|
|||
// ----------------------------------------------------------------------------------------------------
|
||||
|
||||
systems::PipelineCreationError
|
||||
systems::Device::CreateGraphicsPipeline(Pipeline &pipelineOut, GraphicsPipelineCreateInfo const &createInfo)
|
||||
systems::Device::CreatePipeline(Pipeline &pipelineOut, GraphicsPipelineCreateInfo const &createInfo)
|
||||
{
|
||||
eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> shaders;
|
||||
Slang::ComPtr<slang::IComponentType> program;
|
||||
|
|
@ -1286,12 +1286,6 @@ systems::Frame::CreateAsyncTransferContext()
|
|||
return m_AsyncTransferPool.CreateTransferContext();
|
||||
}
|
||||
|
||||
systems::ComputeContext
|
||||
systems::Frame::CreateAsyncComputeContext()
|
||||
{
|
||||
return m_AsyncComputePool.CreateComputeContext();
|
||||
}
|
||||
|
||||
void
|
||||
systems::Frame::WaitUntilReady()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ main(int, char **)
|
|||
}};
|
||||
|
||||
Pipeline pipeline;
|
||||
auto pipelineError = device.CreateGraphicsPipeline(pipeline, {
|
||||
auto pipelineError = device.CreatePipeline(pipeline, {
|
||||
.m_VertexInputs = {{
|
||||
.m_Attribute = Vertex::GetAttributes(),
|
||||
.m_Stride = sizeof(Vertex),
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ main(int, char **)
|
|||
|
||||
Pipeline pipeline;
|
||||
auto pipelineResult =
|
||||
device.CreateGraphicsPipeline(pipeline, {.m_Shaders = {
|
||||
device.CreatePipeline(pipeline, {.m_Shaders = {
|
||||
{.m_ShaderFile = SHADER_FILE, .m_EntryPoints = {"vsmain", "fsmain"}},
|
||||
}});
|
||||
ERROR_IF(pipelineResult, "Could not create pipeline. Cause: {}", pipelineResult.What())
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ main(int, char **)
|
|||
auto attachmentFormat = device.m_Swapchain.m_Format;
|
||||
|
||||
Pipeline pipeline;
|
||||
if (auto result = device.CreateGraphicsPipeline(pipeline, {
|
||||
if (auto result = device.CreatePipeline(pipeline, {
|
||||
.m_Shaders = {{
|
||||
.m_ShaderFile = MODEL_SHADER_FILE,
|
||||
.m_EntryPoints = {"vsmain", "fsmain"},
|
||||
|
|
@ -196,7 +196,7 @@ main(int, char **)
|
|||
}
|
||||
|
||||
Pipeline backgroundPipeline;
|
||||
if (auto result = device.CreateGraphicsPipeline(
|
||||
if (auto result = device.CreatePipeline(
|
||||
backgroundPipeline, {
|
||||
.m_Shaders = {{
|
||||
.m_ShaderFile = BACKGROUND_SHADER_FILE,
|
||||
|
|
|
|||
Loading…
Reference in New Issue