This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/gpu/vulkan/vk_shader_log.hh
Jeroen Bakker 9c0d822737 GPU: Compile vulkan shaders to Spir-V binaries.
Compile each static shader using shaderc to Spir-V binaries.

The main goal is to make sure that the GLSL created using ShaderCreateInfo and able to compile to Spir-V.
For the second stage a correct pipeline needs to be created and some shader would need more
adjustments (push constants size).

With this patch future changes to GLSL sources can already be checked against vulkan, without the
backend finished.

Mechanism has been tested using MacOS and MoltenVK. For other OS, we should finetune CMake
files to find the right location to shaderc.

```
************************************************************
*** Build Mon 12 Dec 2022 11:08:07 CET
************************************************************
Shader Test compilation result: 463 / 463 passed (skipped 118 for compatibility reasons)
OpenGL backend shader compilation succeeded.
Shader Test compilation result: 529 / 529 passed (skipped 52 for compatibility reasons)
Vulkan backend shader compilation succeeded.
```

Reviewed By: fclem

Maniphest Tasks: T102760

Differential Revision: https://developer.blender.org/D16610
2022-12-12 12:25:22 +01:00

16 lines
434 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2022 Blender Foundation. All rights reserved. */
#include "gpu_shader_private.hh"
namespace blender::gpu {
class VKLogParser : public GPULogParser {
public:
char *parse_line(char *log_line, GPULogItem &log_item) override;
protected:
char *skip_name(char *log_line);
char *skip_severity_keyword(char *log_line, GPULogItem &log_item);
};
} // namespace blender::gpu