SCons: Re-enable treating #warning
as error with werror
Replace all TODO uses of `#warning` by proper TODO comments, and will open matching bug reports to keep track of them. We don't have a great track record fixing TODOs, but I'd wager we're even worse for fixing these "TODO #warning" so we should prohibit this usage.
This commit is contained in:
parent
4e4e16f9a9
commit
8017827144
@ -732,12 +732,6 @@ if selected_platform in platform_list:
|
|||||||
if env["werror"]:
|
if env["werror"]:
|
||||||
env.Append(CCFLAGS=["-Werror"])
|
env.Append(CCFLAGS=["-Werror"])
|
||||||
|
|
||||||
# FIXME: Temporary workaround after the Vulkan merge, remove once warnings are fixed.
|
|
||||||
if methods.using_gcc(env):
|
|
||||||
env.Append(CXXFLAGS=["-Wno-error=cpp"])
|
|
||||||
elif methods.using_clang(env) or methods.using_emcc(env):
|
|
||||||
env.Append(CXXFLAGS=["-Wno-error=#warnings"])
|
|
||||||
|
|
||||||
if hasattr(detect, "get_program_suffix"):
|
if hasattr(detect, "get_program_suffix"):
|
||||||
suffix = "." + detect.get_program_suffix()
|
suffix = "." + detect.get_program_suffix()
|
||||||
else:
|
else:
|
||||||
|
@ -82,9 +82,7 @@ public:
|
|||||||
GDVIRTUAL_REQUIRED_CALL(_get_documentation, doc);
|
GDVIRTUAL_REQUIRED_CALL(_get_documentation, doc);
|
||||||
|
|
||||||
Vector<DocData::ClassDoc> class_doc;
|
Vector<DocData::ClassDoc> class_doc;
|
||||||
#ifndef _MSC_VER
|
// TODO: Missing conversion from documentation to ClassDoc.
|
||||||
#warning missing conversion from documentation to ClassDoc
|
|
||||||
#endif
|
|
||||||
return class_doc;
|
return class_doc;
|
||||||
}
|
}
|
||||||
#endif // TOOLS_ENABLED
|
#endif // TOOLS_ENABLED
|
||||||
|
@ -1655,9 +1655,7 @@ RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const T
|
|||||||
image_create_info.pNext = nullptr;
|
image_create_info.pNext = nullptr;
|
||||||
image_create_info.flags = 0;
|
image_create_info.flags = 0;
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
// TODO: Check for support via RenderingDevice to enable on mobile when possible.
|
||||||
#warning TODO check for support via RenderingDevice to enable on mobile when possible
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ANDROID_ENABLED
|
#ifndef ANDROID_ENABLED
|
||||||
|
|
||||||
|
@ -752,9 +752,7 @@ CreateDialog::CreateDialog() {
|
|||||||
favorites->connect("cell_selected", callable_mp(this, &CreateDialog::_favorite_selected));
|
favorites->connect("cell_selected", callable_mp(this, &CreateDialog::_favorite_selected));
|
||||||
favorites->connect("item_activated", callable_mp(this, &CreateDialog::_favorite_activated));
|
favorites->connect("item_activated", callable_mp(this, &CreateDialog::_favorite_activated));
|
||||||
favorites->add_theme_constant_override("draw_guides", 1);
|
favorites->add_theme_constant_override("draw_guides", 1);
|
||||||
#ifndef _MSC_VER
|
// Cannot forward drag data to a non control, must be fixed.
|
||||||
#warning cannot forward drag data to a non control, must be fixed
|
|
||||||
#endif
|
|
||||||
//favorites->set_drag_forwarding(this);
|
//favorites->set_drag_forwarding(this);
|
||||||
fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
|
fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
|
||||||
|
|
||||||
|
@ -1015,9 +1015,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||||||
preset_vb->add_child(mc);
|
preset_vb->add_child(mc);
|
||||||
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
presets = memnew(ItemList);
|
presets = memnew(ItemList);
|
||||||
#ifndef _MSC_VER
|
// TODO: Must reimplement drag forwarding.
|
||||||
#warning must reimplement drag forward
|
|
||||||
#endif
|
|
||||||
//presets->set_drag_forwarding(this);
|
//presets->set_drag_forwarding(this);
|
||||||
mc->add_child(presets);
|
mc->add_child(presets);
|
||||||
presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset));
|
presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset));
|
||||||
|
@ -4773,9 +4773,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||||||
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||||
display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||||
view_menu->set_disable_shortcuts(true);
|
view_menu->set_disable_shortcuts(true);
|
||||||
#ifndef _MSC_VER
|
|
||||||
#warning this needs to be fixed
|
// TODO: Re-evaluate with new OpenGL3 renderer, and implement.
|
||||||
#endif
|
|
||||||
//if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
|
//if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
|
||||||
if (false) {
|
if (false) {
|
||||||
// Alternate display modes only work when using the Vulkan renderer; make this explicit.
|
// Alternate display modes only work when using the Vulkan renderer; make this explicit.
|
||||||
|
@ -2590,10 +2590,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
|
|||||||
Mesh::PRIMITIVE_TRIANGLES, // 4 TRIANGLES
|
Mesh::PRIMITIVE_TRIANGLES, // 4 TRIANGLES
|
||||||
Mesh::PRIMITIVE_TRIANGLE_STRIP, // 5 TRIANGLE_STRIP
|
Mesh::PRIMITIVE_TRIANGLE_STRIP, // 5 TRIANGLE_STRIP
|
||||||
Mesh::PRIMITIVE_TRIANGLES, // 6 TRIANGLE_FAN fan not supported, should be converted
|
Mesh::PRIMITIVE_TRIANGLES, // 6 TRIANGLE_FAN fan not supported, should be converted
|
||||||
#ifndef _MSC_VER
|
// TODO: Line loop and triangle fan are not supported and need to be converted to lines and triangles.
|
||||||
#warning line loop and triangle fan are not supported and need to be converted to lines and triangles
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
primitive = primitives2[mode];
|
primitive = primitives2[mode];
|
||||||
|
@ -150,9 +150,8 @@ public:
|
|||||||
env->DeleteLocalRef(arr);
|
env->DeleteLocalRef(arr);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
// TODO: This is missing 64 bits arrays, I have no idea how to do it in JNI.
|
||||||
#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
|
|
||||||
#endif
|
|
||||||
case Variant::DICTIONARY: {
|
case Variant::DICTIONARY: {
|
||||||
jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
|
jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
|
||||||
ret = _jobject_to_variant(env, obj);
|
ret = _jobject_to_variant(env, obj);
|
||||||
|
@ -167,9 +167,8 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
|
|||||||
v.obj = arr;
|
v.obj = arr;
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
#ifndef _MSC_VER
|
|
||||||
#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
|
// TODO: This is missing 64 bits arrays, I have no idea how to do it in JNI.
|
||||||
#endif
|
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
v.val.i = 0;
|
v.val.i = 0;
|
||||||
|
@ -1202,16 +1202,6 @@ float DisplayServerX11::screen_get_refresh_rate(int p_screen) const {
|
|||||||
return SCREEN_REFRESH_RATE_FALLBACK;
|
return SCREEN_REFRESH_RATE_FALLBACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisplayServerX11::screen_is_touchscreen(int p_screen) const {
|
|
||||||
_THREAD_SAFE_METHOD_
|
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#warning Need to get from proper window
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return DisplayServer::screen_is_touchscreen(p_screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DBUS_ENABLED
|
#ifdef DBUS_ENABLED
|
||||||
void DisplayServerX11::screen_set_keep_on(bool p_enable) {
|
void DisplayServerX11::screen_set_keep_on(bool p_enable) {
|
||||||
if (screen_is_kept_on() == p_enable) {
|
if (screen_is_kept_on() == p_enable) {
|
||||||
|
@ -349,7 +349,6 @@ public:
|
|||||||
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
||||||
|
|
||||||
#if defined(DBUS_ENABLED)
|
#if defined(DBUS_ENABLED)
|
||||||
virtual void screen_set_keep_on(bool p_enable) override;
|
virtual void screen_set_keep_on(bool p_enable) override;
|
||||||
|
@ -561,20 +561,6 @@ float DisplayServerWindows::screen_get_refresh_rate(int p_screen) const {
|
|||||||
return data.rate;
|
return data.rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#warning touchscreen not working
|
|
||||||
#endif
|
|
||||||
return DisplayServer::screen_is_touchscreen(p_screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DisplayServerWindows::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
|
|
||||||
}
|
|
||||||
|
|
||||||
DisplayServer::ScreenOrientation DisplayServerWindows::screen_get_orientation(int p_screen) const {
|
|
||||||
return SCREEN_LANDSCAPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DisplayServerWindows::screen_set_keep_on(bool p_enable) {
|
void DisplayServerWindows::screen_set_keep_on(bool p_enable) {
|
||||||
if (keep_screen_on == p_enable) {
|
if (keep_screen_on == p_enable) {
|
||||||
return;
|
return;
|
||||||
|
@ -516,10 +516,6 @@ public:
|
|||||||
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||||
virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
||||||
|
|
||||||
virtual void screen_set_orientation(ScreenOrientation p_orientation, int p_screen = SCREEN_OF_MAIN_WINDOW) override;
|
|
||||||
virtual ScreenOrientation screen_get_orientation(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
||||||
|
|
||||||
virtual void screen_set_keep_on(bool p_enable) override; //disable screensaver
|
virtual void screen_set_keep_on(bool p_enable) override; //disable screensaver
|
||||||
virtual bool screen_is_kept_on() const override;
|
virtual bool screen_is_kept_on() const override;
|
||||||
|
@ -192,10 +192,8 @@ void Bone2D::_notification(int p_what) {
|
|||||||
cache_transform = tmp_trans;
|
cache_transform = tmp_trans;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
// Bone2D Editor gizmo drawing:
|
// Bone2D Editor gizmo drawing.
|
||||||
#ifndef _MSC_VER
|
// TODO: Bone2D gizmo drawing needs to be moved to an editor plugin.
|
||||||
#warning TODO Bone2D gizmo drawing needs to be moved to an editor plugin
|
|
||||||
#endif
|
|
||||||
case NOTIFICATION_DRAW: {
|
case NOTIFICATION_DRAW: {
|
||||||
// Only draw the gizmo in the editor!
|
// Only draw the gizmo in the editor!
|
||||||
if (Engine::get_singleton()->is_editor_hint() == false) {
|
if (Engine::get_singleton()->is_editor_hint() == false) {
|
||||||
|
@ -309,9 +309,7 @@ bool Sprite2D::is_pixel_opaque(const Point2 &p_point) const {
|
|||||||
q.y = 1.0f - q.y;
|
q.y = 1.0f - q.y;
|
||||||
}
|
}
|
||||||
q = q * src_rect.size + src_rect.position;
|
q = q * src_rect.size + src_rect.position;
|
||||||
#ifndef _MSC_VER
|
// TODO: This need to be obtained from CanvasItem new repeat mode (but it needs to guess it from hierarchy, need to add a function for that).
|
||||||
#warning this need to be obtained from CanvasItem new repeat mode (but it needs to guess it from hierarchy, need to add a function for that)
|
|
||||||
#endif
|
|
||||||
bool is_repeat = false;
|
bool is_repeat = false;
|
||||||
bool is_mirrored_repeat = false;
|
bool is_mirrored_repeat = false;
|
||||||
if (is_repeat) {
|
if (is_repeat) {
|
||||||
|
@ -1403,9 +1403,7 @@ void ColorPicker::_screen_pick_pressed() {
|
|||||||
screen->show();
|
screen->show();
|
||||||
}
|
}
|
||||||
screen->move_to_front();
|
screen->move_to_front();
|
||||||
#ifndef _MSC_VER
|
// TODO: show modal no longer works, needs to be converted to a popup.
|
||||||
#warning show modal no longer works, needs to be converted to a popup
|
|
||||||
#endif
|
|
||||||
//screen->show_modal();
|
//screen->show_modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5239,9 +5239,7 @@ bool Animation::_fetch_compressed(uint32_t p_compressed_track, double p_time, Ve
|
|||||||
|
|
||||||
double page_base_time = compression.pages[page_index].time_offset;
|
double page_base_time = compression.pages[page_index].time_offset;
|
||||||
const uint8_t *page_data = compression.pages[page_index].data.ptr();
|
const uint8_t *page_data = compression.pages[page_index].data.ptr();
|
||||||
#ifndef _MSC_VER
|
// Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported.
|
||||||
#warning Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported
|
|
||||||
#endif
|
|
||||||
const uint32_t *indices = (const uint32_t *)page_data;
|
const uint32_t *indices = (const uint32_t *)page_data;
|
||||||
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
||||||
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
||||||
@ -5384,9 +5382,7 @@ void Animation::_get_compressed_key_indices_in_range(uint32_t p_compressed_track
|
|||||||
|
|
||||||
double page_base_time = compression.pages[page_index].time_offset;
|
double page_base_time = compression.pages[page_index].time_offset;
|
||||||
const uint8_t *page_data = compression.pages[page_index].data.ptr();
|
const uint8_t *page_data = compression.pages[page_index].data.ptr();
|
||||||
#ifndef _MSC_VER
|
// Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported.
|
||||||
#warning Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported
|
|
||||||
#endif
|
|
||||||
const uint32_t *indices = (const uint32_t *)page_data;
|
const uint32_t *indices = (const uint32_t *)page_data;
|
||||||
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
||||||
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
||||||
@ -5456,9 +5452,7 @@ int Animation::_get_compressed_key_count(uint32_t p_compressed_track) const {
|
|||||||
|
|
||||||
for (uint32_t i = 0; i < compression.pages.size(); i++) {
|
for (uint32_t i = 0; i < compression.pages.size(); i++) {
|
||||||
const uint8_t *page_data = compression.pages[i].data.ptr();
|
const uint8_t *page_data = compression.pages[i].data.ptr();
|
||||||
#ifndef _MSC_VER
|
// Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported.
|
||||||
#warning Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported
|
|
||||||
#endif
|
|
||||||
const uint32_t *indices = (const uint32_t *)page_data;
|
const uint32_t *indices = (const uint32_t *)page_data;
|
||||||
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
||||||
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
||||||
@ -5492,9 +5486,7 @@ bool Animation::_fetch_compressed_by_index(uint32_t p_compressed_track, int p_in
|
|||||||
|
|
||||||
for (uint32_t i = 0; i < compression.pages.size(); i++) {
|
for (uint32_t i = 0; i < compression.pages.size(); i++) {
|
||||||
const uint8_t *page_data = compression.pages[i].data.ptr();
|
const uint8_t *page_data = compression.pages[i].data.ptr();
|
||||||
#ifndef _MSC_VER
|
// Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported.
|
||||||
#warning Little endian assumed. No major big endian hardware exists any longer, but in case it does it will need to be supported
|
|
||||||
#endif
|
|
||||||
const uint32_t *indices = (const uint32_t *)page_data;
|
const uint32_t *indices = (const uint32_t *)page_data;
|
||||||
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
const uint16_t *time_keys = (const uint16_t *)&page_data[indices[p_compressed_track * 3 + 0]];
|
||||||
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
uint32_t time_key_count = indices[p_compressed_track * 3 + 1];
|
||||||
|
@ -1576,9 +1576,8 @@ void ArrayMesh::_recompute_aabb() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef _MSC_VER
|
|
||||||
#warning need to add binding to add_surface using future MeshSurfaceData object
|
// TODO: Need to add binding to add_surface using future MeshSurfaceData object.
|
||||||
#endif
|
|
||||||
void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, const Vector<uint8_t> &p_attribute_array, const Vector<uint8_t> &p_skin_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<uint8_t> &p_blend_shape_data, const Vector<AABB> &p_bone_aabbs, const Vector<RS::SurfaceData::LOD> &p_lods) {
|
void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, const Vector<uint8_t> &p_attribute_array, const Vector<uint8_t> &p_skin_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<uint8_t> &p_blend_shape_data, const Vector<AABB> &p_bone_aabbs, const Vector<RS::SurfaceData::LOD> &p_lods) {
|
||||||
_create_if_empty();
|
_create_if_empty();
|
||||||
|
|
||||||
|
@ -1509,11 +1509,10 @@ bool VisualShader::_get(const StringName &p_name, Variant &r_ret) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VisualShader::reset_state() {
|
void VisualShader::reset_state() {
|
||||||
#ifndef _MSC_VER
|
// TODO: Everything needs to be cleared here.
|
||||||
#warning everything needs to be cleared here
|
|
||||||
#endif
|
|
||||||
emit_changed();
|
emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
|
void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||||
//mode
|
//mode
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, PNAME("mode"), PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog"));
|
p_list->push_back(PropertyInfo(Variant::INT, PNAME("mode"), PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog"));
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "pipeline_cache_rd.h"
|
#include "pipeline_cache_rd.h"
|
||||||
|
|
||||||
#include "core/os/memory.h"
|
#include "core/os/memory.h"
|
||||||
|
|
||||||
RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD::FramebufferFormatID p_framebuffer_format_id, bool p_wireframe, uint32_t p_render_pass, uint32_t p_bool_specializations) {
|
RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD::FramebufferFormatID p_framebuffer_format_id, bool p_wireframe, uint32_t p_render_pass, uint32_t p_bool_specializations) {
|
||||||
@ -70,9 +71,7 @@ RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PipelineCacheRD::_clear() {
|
void PipelineCacheRD::_clear() {
|
||||||
#ifndef _MSC_VER
|
// TODO: Clear should probably recompile all the variants already compiled instead to avoid stalls? Needs discussion.
|
||||||
#warning Clear should probably recompile all the variants already compiled instead to avoid stalls? needs discussion
|
|
||||||
#endif
|
|
||||||
if (versions) {
|
if (versions) {
|
||||||
for (uint32_t i = 0; i < version_count; i++) {
|
for (uint32_t i = 0; i < version_count; i++) {
|
||||||
//shader may be gone, so this may not be valid
|
//shader may be gone, so this may not be valid
|
||||||
|
@ -1075,10 +1075,7 @@ void RendererCanvasRenderRD::_render_items(RID p_to_render_target, int p_item_co
|
|||||||
clear_colors.push_back(texture_storage->render_target_get_clear_request_color(p_to_render_target));
|
clear_colors.push_back(texture_storage->render_target_get_clear_request_color(p_to_render_target));
|
||||||
texture_storage->render_target_disable_clear_request(p_to_render_target);
|
texture_storage->render_target_disable_clear_request(p_to_render_target);
|
||||||
}
|
}
|
||||||
#ifndef _MSC_VER
|
// TODO: Obtain from framebuffer format eventually when this is implemented.
|
||||||
#warning TODO obtain from framebuffer format eventually when this is implemented
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fb_uniform_set = texture_storage->render_target_get_framebuffer_uniform_set(p_to_render_target);
|
fb_uniform_set = texture_storage->render_target_get_framebuffer_uniform_set(p_to_render_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,10 +102,8 @@ void RendererCompositorRD::begin_frame(double frame_step) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RendererCompositorRD::end_frame(bool p_swap_buffers) {
|
void RendererCompositorRD::end_frame(bool p_swap_buffers) {
|
||||||
#ifndef _MSC_VER
|
// TODO: Likely pass a bool to swap buffers to avoid display?
|
||||||
#warning TODO: likely pass a bool to swap buffers to avoid display?
|
RD::get_singleton()->swap_buffers();
|
||||||
#endif
|
|
||||||
RD::get_singleton()->swap_buffers(); //probably should pass some bool to avoid display?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererCompositorRD::initialize() {
|
void RendererCompositorRD::initialize() {
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "particles_storage.h"
|
#include "particles_storage.h"
|
||||||
|
|
||||||
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
|
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
|
||||||
#include "servers/rendering/rendering_server_globals.h"
|
#include "servers/rendering/rendering_server_globals.h"
|
||||||
#include "texture_storage.h"
|
#include "texture_storage.h"
|
||||||
@ -1334,10 +1335,7 @@ void ParticlesStorage::update_particles() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
// TODO: Should use display refresh rate for all this.
|
||||||
#warning Should use display refresh rate for all this
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float screen_hz = 60;
|
float screen_hz = 60;
|
||||||
|
|
||||||
int fixed_fps = 0;
|
int fixed_fps = 0;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "texture_storage.h"
|
#include "texture_storage.h"
|
||||||
|
|
||||||
#include "../effects/copy_effects.h"
|
#include "../effects/copy_effects.h"
|
||||||
#include "../framebuffer_cache_rd.h"
|
#include "../framebuffer_cache_rd.h"
|
||||||
#include "material_storage.h"
|
#include "material_storage.h"
|
||||||
@ -1496,9 +1497,7 @@ Ref<Image> TextureStorage::_validate_texture_format(const Ref<Image> &p_image, T
|
|||||||
} break;
|
} break;
|
||||||
case Image::FORMAT_RGBE9995: {
|
case Image::FORMAT_RGBE9995: {
|
||||||
r_format.format = RD::DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32;
|
r_format.format = RD::DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32;
|
||||||
#ifndef _MSC_VER
|
// TODO: Need to make a function in Image to swap bits for this.
|
||||||
#warning TODO need to make a function in Image to swap bits for this
|
|
||||||
#endif
|
|
||||||
r_format.swizzle_r = RD::TEXTURE_SWIZZLE_IDENTITY;
|
r_format.swizzle_r = RD::TEXTURE_SWIZZLE_IDENTITY;
|
||||||
r_format.swizzle_g = RD::TEXTURE_SWIZZLE_IDENTITY;
|
r_format.swizzle_g = RD::TEXTURE_SWIZZLE_IDENTITY;
|
||||||
r_format.swizzle_b = RD::TEXTURE_SWIZZLE_IDENTITY;
|
r_format.swizzle_b = RD::TEXTURE_SWIZZLE_IDENTITY;
|
||||||
|
Loading…
Reference in New Issue
Block a user