summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_warnings.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-12-22 10:15:12 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2022-01-03 16:24:56 +0300
commitfd9c92d4ab32a908a69f6f7fadf65d77c43a6b54 (patch)
treef5d69fbc13e1a15d3c09fb7691e74f2cc6bb6d47 /servers/rendering/shader_warnings.h
parent9221c0f8addbf2027ad3b1b4a4d7bdebaa6ab864 (diff)
Add a shader warning when the uniform buffer limit is exceeded
Diffstat (limited to 'servers/rendering/shader_warnings.h')
-rw-r--r--servers/rendering/shader_warnings.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/servers/rendering/shader_warnings.h b/servers/rendering/shader_warnings.h
index 18915fffd8..2d0ba7b5b2 100644
--- a/servers/rendering/shader_warnings.h
+++ b/servers/rendering/shader_warnings.h
@@ -36,6 +36,7 @@
#include "core/string/string_name.h"
#include "core/templates/list.h"
#include "core/templates/map.h"
+#include "core/variant/variant.h"
class ShaderWarning {
public:
@@ -48,6 +49,7 @@ public:
UNUSED_VARYING,
UNUSED_LOCAL_VARIABLE,
FORMATTING_ERROR,
+ DEVICE_LIMIT_EXCEEDED,
WARNING_MAX,
};
@@ -61,12 +63,14 @@ public:
UNUSED_VARYING_FLAG = 32U,
UNUSED_LOCAL_VARIABLE_FLAG = 64U,
FORMATTING_ERROR_FLAG = 128U,
+ DEVICE_LIMIT_EXCEEDED_FLAG = 256U,
};
private:
Code code;
int line;
StringName subject;
+ Vector<Variant> extra_args;
public:
Code get_code() const;
@@ -74,12 +78,13 @@ public:
const StringName &get_subject() const;
String get_message() const;
String get_name() const;
+ Vector<Variant> get_extra_args() const;
static String get_name_from_code(Code p_code);
static Code get_code_from_name(const String &p_name);
static CodeFlags get_flags_from_codemap(const Map<Code, bool> &p_map);
- ShaderWarning(Code p_code = WARNING_MAX, int p_line = -1, const StringName &p_subject = "");
+ ShaderWarning(Code p_code = WARNING_MAX, int p_line = -1, const StringName &p_subject = "", const Vector<Variant> &p_extra_args = Vector<Variant>());
};
#endif // DEBUG_ENABLED