Everything is broken

This commit is contained in:
Dynamitos
2024-10-01 16:56:04 +02:00
parent 4ca43427e2
commit a5694b838a
23 changed files with 49 additions and 57 deletions
+2 -2
View File
@@ -159,8 +159,8 @@ static constexpr bool useAsyncCompute = false;
static constexpr bool useMeshShading = true;
static constexpr uint32 numFramesBuffered = 3;
static constexpr uint32 numVerticesPerMeshlet = 64;
static constexpr uint32 numPrimitivesPerMeshlet = 126;
static constexpr uint32 numVerticesPerMeshlet = 256;
static constexpr uint32 numPrimitivesPerMeshlet = 256;
double getCurrentFrameDelta();
double getCurrentFrameTime();
uint32 getCurrentFrameIndex();
+1 -3
View File
@@ -104,10 +104,8 @@ void StaticMeshVertexData::init(Gfx::PGraphics _graphics) {
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 0, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER});
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 1, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER});
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 2, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER});
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 3, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER});
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 4, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER});
descriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{
.binding = 5,
.binding = 3,
.descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER,
.descriptorCount = MAX_TEXCOORDS,
});
+1 -1
View File
@@ -11,7 +11,7 @@
using namespace Seele;
constexpr static uint64 NUM_DEFAULT_ELEMENTS = 36;
constexpr static uint64 NUM_DEFAULT_ELEMENTS = 100000;
uint64 VertexData::meshletCount = 0;
void VertexData::resetMeshData() {
+2
View File
@@ -765,6 +765,7 @@ void Graphics::pickPhysicalDevice() {
features11 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES,
.pNext = &features12,
.storageBuffer16BitAccess = true,
.uniformAndStorageBuffer16BitAccess = true,
};
features = {
@@ -780,6 +781,7 @@ void Graphics::pickPhysicalDevice() {
.pipelineStatisticsQuery = true,
.fragmentStoresAndAtomics = true,
.shaderInt64 = true,
.shaderInt16 = true,
.inheritedQueries = true,
},
};
+2 -1
View File
@@ -113,10 +113,11 @@ void Seele::beginCompilation(const ShaderCompilationInfo& info, SlangCompileTarg
slang::ProgramLayout* signature = specializedComponent->getLayout(0, diagnostics.writeRef());
CHECK_DIAGNOSTICS();
std::cout << info.name << std::endl;
for (size_t i = 0; i < signature->getParameterCount(); ++i) {
auto param = signature->getParameterByIndex(i);
layout->addMapping(param->getName(), param->getBindingIndex());
//std::cout << param->getName() << ": " << param->getBindingIndex() << std::endl;
std::cout << param->getName() << ": " << param->getBindingIndex() << std::endl;
}
// workaround
+1 -1
View File
@@ -7,7 +7,7 @@
namespace Seele {
class ThreadPool {
public:
ThreadPool(uint32 numWorkers = std::thread::hardware_concurrency() - 2);
ThreadPool(uint32 numWorkers = 1);
~ThreadPool();
void runAndWait(List<std::function<void()>> functions);
void runAsync(std::function<void()> func);