summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-04-03 02:53:19 +1000
committer Vas Crabb <vas@vastheman.com>2022-04-03 02:53:19 +1000
commitc4f9ff9790382c1c5b99a2ffbb2a14e04d4c7cea (patch)
tree80a1185e2dbed843500eda4e740dfac9f03eba1b /src/osd
parent5255f96203e4dc58ba660f74a64e6b640016a604 (diff)
-util/corealloc.h: Reduced make_unique_clear to a single variant for POD arrays.
* Enabled GCC lifetime dead store elimination optimisation. * emu/device.h: Don't pre-clear memory for drivers. Ivan Vangelista fixed at least the majority of things that crashed outright, and Robbbert initialised variables that coverity complained about. It's unlikely anything will break due to this. * sound/discrete.h: Explicitly initialise members of discrete "devices" to zero. I don't see a way around doing this in headers due to the macro soup used to build the constructors. * sound/mos6581.cpp: Moved creation of the SID core to device_start and explictly initialised members of the SID core structures. These structures are in internal headers, so they won't cause downstream recompiles. -Lua engine: Made I/O port manager type_seq a bit more tolerant of omitted arguments.
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp2
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h156
2 files changed, 79 insertions, 79 deletions
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 599da82c8d3..35ace744eb3 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -505,7 +505,7 @@ bool shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r
snap_width = winoptions.d3d_snap_width();
snap_height = winoptions.d3d_snap_height();
- this->options = make_unique_clear<hlsl_options>().release();
+ this->options = new hlsl_options;
this->options->params_init = false;
// copy last options if initialized
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index 5a34d9830df..f72197cb7b1 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -175,92 +175,92 @@ class movie_recorder;
/* in the future this will be moved into an OSD/emu shared buffer */
struct hlsl_options
{
- bool params_init;
- bool params_dirty;
- int shadow_mask_tile_mode;
- float shadow_mask_alpha;
- char shadow_mask_texture[1024];
- int shadow_mask_count_x;
- int shadow_mask_count_y;
- float shadow_mask_u_size;
- float shadow_mask_v_size;
- float shadow_mask_u_offset;
- float shadow_mask_v_offset;
- float distortion;
- float cubic_distortion;
- float distort_corner;
- float round_corner;
- float smooth_border;
- float reflection;
- float vignetting;
- float scanline_alpha;
- float scanline_scale;
- float scanline_height;
- float scanline_variation;
- float scanline_bright_scale;
- float scanline_bright_offset;
- float scanline_jitter;
- float hum_bar_alpha;
- float defocus[2];
- float converge_x[3];
- float converge_y[3];
- float radial_converge_x[3];
- float radial_converge_y[3];
- float red_ratio[3];
- float grn_ratio[3];
- float blu_ratio[3];
- float offset[3];
- float scale[3];
- float power[3];
- float floor[3];
- float phosphor[3];
- float saturation;
- int chroma_mode;
- float chroma_a[2];
- float chroma_b[2];
- float chroma_c[2];
- float chroma_conversion_gain[3];
- float chroma_y_gain[3];
+ bool params_init = false;
+ bool params_dirty = false;
+ int shadow_mask_tile_mode = 0;
+ float shadow_mask_alpha = 0.0;
+ char shadow_mask_texture[1024]{ 0 };
+ int shadow_mask_count_x = 0;
+ int shadow_mask_count_y = 0;
+ float shadow_mask_u_size = 0.0;
+ float shadow_mask_v_size = 0.0;
+ float shadow_mask_u_offset = 0.0;
+ float shadow_mask_v_offset = 0.0;
+ float distortion = 0.0;
+ float cubic_distortion = 0.0;
+ float distort_corner = 0.0;
+ float round_corner = 0.0;
+ float smooth_border = 0.0;
+ float reflection = 0.0;
+ float vignetting = 0.0;
+ float scanline_alpha = 0.0;
+ float scanline_scale = 0.0;
+ float scanline_height = 0.0;
+ float scanline_variation = 0.0;
+ float scanline_bright_scale = 0.0;
+ float scanline_bright_offset = 0.0;
+ float scanline_jitter = 0.0;
+ float hum_bar_alpha = 0.0;
+ float defocus[2]{ 0.0 };
+ float converge_x[3]{ 0.0 };
+ float converge_y[3]{ 0.0 };
+ float radial_converge_x[3]{ 0.0 };
+ float radial_converge_y[3]{ 0.0 };
+ float red_ratio[3]{ 0.0 };
+ float grn_ratio[3]{ 0.0 };
+ float blu_ratio[3]{ 0.0 };
+ float offset[3]{ 0.0 };
+ float scale[3]{ 0.0 };
+ float power[3]{ 0.0 };
+ float floor[3]{ 0.0 };
+ float phosphor[3]{ 0.0 };
+ float saturation = 0.0;
+ int chroma_mode = 0;
+ float chroma_a[2]{ 0.0 };
+ float chroma_b[2]{ 0.0 };
+ float chroma_c[2]{ 0.0 };
+ float chroma_conversion_gain[3]{ 0.0 };
+ float chroma_y_gain[3]{ 0.0 };
// NTSC
- int yiq_enable;
- float yiq_jitter;
- float yiq_cc;
- float yiq_a;
- float yiq_b;
- float yiq_o;
- float yiq_p;
- float yiq_n;
- float yiq_y;
- float yiq_i;
- float yiq_q;
- float yiq_scan_time;
- int yiq_phase_count;
+ int yiq_enable = 0;
+ float yiq_jitter = 0.0;
+ float yiq_cc = 0.0;
+ float yiq_a = 0.0;
+ float yiq_b = 0.0;
+ float yiq_o = 0.0;
+ float yiq_p = 0.0;
+ float yiq_n = 0.0;
+ float yiq_y = 0.0;
+ float yiq_i = 0.0;
+ float yiq_q = 0.0;
+ float yiq_scan_time = 0.0;
+ int yiq_phase_count = 0;
// Vectors
- float vector_beam_smooth;
- float vector_length_scale;
- float vector_length_ratio;
+ float vector_beam_smooth = 0.0;
+ float vector_length_scale = 0.0;
+ float vector_length_ratio = 0.0;
// Bloom
- int bloom_blend_mode;
- float bloom_scale;
- float bloom_overdrive[3];
- float bloom_level0_weight;
- float bloom_level1_weight;
- float bloom_level2_weight;
- float bloom_level3_weight;
- float bloom_level4_weight;
- float bloom_level5_weight;
- float bloom_level6_weight;
- float bloom_level7_weight;
- float bloom_level8_weight;
+ int bloom_blend_mode = 0;
+ float bloom_scale = 0.0;
+ float bloom_overdrive[3]{ 0.0 };
+ float bloom_level0_weight = 0.0;
+ float bloom_level1_weight = 0.0;
+ float bloom_level2_weight = 0.0;
+ float bloom_level3_weight = 0.0;
+ float bloom_level4_weight = 0.0;
+ float bloom_level5_weight = 0.0;
+ float bloom_level6_weight = 0.0;
+ float bloom_level7_weight = 0.0;
+ float bloom_level8_weight = 0.0;
// Final
- char lut_texture[1024];
- int lut_enable;
- char ui_lut_texture[1024];
- int ui_lut_enable;
+ char lut_texture[1024]{ 0 };
+ int lut_enable = 0;
+ char ui_lut_texture[1024]{ 0 };
+ int ui_lut_enable = 0;
};
struct slider_desc