1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 16:31:31 +00:00

It makes more sense not to retain the previous texture builder run until vertex storage is confirmed.

This commit is contained in:
Thomas Harte 2017-07-07 23:21:25 -04:00
parent bfbe12b94b
commit c7fa2ed11a

View File

@ -140,12 +140,12 @@ void CRT::advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bo
bool is_output_segment = ((is_output_run && next_run_length) && !horizontal_flywheel_->is_in_retrace() && !vertical_flywheel_->is_in_retrace());
uint8_t *next_run = nullptr;
if(is_output_segment && !openGL_output_builder_.composite_output_buffer_is_full()) {
openGL_output_builder_.texture_builder.retain_latest();
next_run = openGL_output_builder_.array_builder.get_input_storage(SourceVertexSize);
}
if(next_run) {
// output_y and texture locations will be written later; we won't necessarily know what it is outside of the locked region
openGL_output_builder_.texture_builder.retain_latest();
source_output_position_x1() = (uint16_t)horizontal_flywheel_->get_current_output_position();
source_phase() = colour_burst_phase_;
source_amplitude() = colour_burst_amplitude_;