glsl: Implement derivatives and YDirection
plus some other misc additions/changed
This commit is contained in:
parent
ed14d31f66
commit
a752ec88d0
8 changed files with 87 additions and 81 deletions
|
@ -16,6 +16,7 @@
|
|||
namespace Shader {
|
||||
struct Info;
|
||||
struct Profile;
|
||||
struct RuntimeInfo;
|
||||
} // namespace Shader
|
||||
|
||||
namespace Shader::Backend {
|
||||
|
@ -31,7 +32,8 @@ namespace Shader::Backend::GLSL {
|
|||
|
||||
class EmitContext {
|
||||
public:
|
||||
explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_);
|
||||
explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_,
|
||||
const RuntimeInfo& runtime_info_);
|
||||
|
||||
template <Type type, typename... Args>
|
||||
void Add(const char* format_str, IR::Inst& inst, Args&&... args) {
|
||||
|
@ -121,6 +123,7 @@ public:
|
|||
RegAlloc reg_alloc;
|
||||
const Info& info;
|
||||
const Profile& profile;
|
||||
const RuntimeInfo& runtime_info;
|
||||
|
||||
Stage stage{};
|
||||
std::string_view stage_name = "invalid";
|
||||
|
@ -131,6 +134,8 @@ public:
|
|||
std::vector<u32> texture_bindings;
|
||||
std::vector<u32> image_bindings;
|
||||
|
||||
bool uses_y_direction{};
|
||||
|
||||
private:
|
||||
void SetupExtensions(std::string& header);
|
||||
void DefineConstantBuffers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue