More metal changes
This commit is contained in:
@@ -176,9 +176,14 @@ void DepthCullingPass::render() {
|
||||
command->bindPipeline(pipeline);
|
||||
}
|
||||
command->bindDescriptor({viewParamsSet, vertexData->getVertexDataSet(), vertexData->getInstanceDataSet(), set});
|
||||
uint32 offset = 0;
|
||||
VertexData::DrawCallOffsets offsets = {
|
||||
.instanceOffset = 0,
|
||||
.floatOffset = 0,
|
||||
.samplerOffset = 0,
|
||||
.textureOffset = 0,
|
||||
};
|
||||
command->pushConstants(Gfx::SE_SHADER_STAGE_TASK_BIT_EXT | Gfx::SE_SHADER_STAGE_VERTEX_BIT, 0, sizeof(VertexData::DrawCallOffsets),
|
||||
&offset);
|
||||
&offsets);
|
||||
if (graphics->supportMeshShading()) {
|
||||
command->drawMesh(vertexData->getNumInstances(), 1, 1);
|
||||
} else {
|
||||
|
||||
@@ -248,7 +248,7 @@ void LightCullingPass::setupFrustums() {
|
||||
dispatchParamsLayout->addDescriptorBinding(Gfx::DescriptorBinding{
|
||||
.binding = 0,
|
||||
.descriptorType = Gfx::SE_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||
.uniformLength = sizeof(DispatchParams),
|
||||
.uniformLength = 56,//sizeof(DispatchParams),
|
||||
});
|
||||
dispatchParamsLayout->addDescriptorBinding(Gfx::DescriptorBinding{
|
||||
.binding = 1,
|
||||
@@ -264,6 +264,7 @@ void LightCullingPass::setupFrustums() {
|
||||
.modules = {"ComputeFrustums"},
|
||||
.entryPoints = {{"computeFrustums", "ComputeFrustums"}},
|
||||
.rootSignature = frustumLayout,
|
||||
.dumpIntermediate = true,
|
||||
};
|
||||
graphics->beginShaderCompilation(createInfo);
|
||||
frustumShader = graphics->createComputeShader({0});
|
||||
|
||||
@@ -7,7 +7,7 @@ RenderPass::RenderPass(Gfx::PGraphics graphics, PScene scene) : graphics(graphic
|
||||
viewParamsLayout->addDescriptorBinding(Gfx::DescriptorBinding{
|
||||
.binding = 0,
|
||||
.descriptorType = Gfx::SE_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||
.uniformLength = sizeof(ViewParameter),
|
||||
.uniformLength = 576,//sizeof(ViewParameter),
|
||||
});
|
||||
UniformBufferCreateInfo uniformInitializer = {
|
||||
.sourceData =
|
||||
|
||||
Reference in New Issue
Block a user