Beispiel #1
0
void DoCPState(PointerWrap& p)
{
  p.DoArray(g_main_cp_state.array_bases);
  p.DoArray(g_main_cp_state.array_strides);
  p.Do(g_main_cp_state.matrix_index_a);
  p.Do(g_main_cp_state.matrix_index_b);
  p.Do(g_main_cp_state.vtx_desc.Hex);
  p.DoArray(g_main_cp_state.vtx_attr);
  p.DoMarker("CP Memory");
  if (p.mode == PointerWrap::MODE_READ)
  {
    CopyPreprocessCPStateFromMain();
    g_main_cp_state.bases_dirty = true;
  }
}
Beispiel #2
0
void DoCPState(PointerWrap& p)
{
	// We don't save g_preprocess_cp_state separately because the GPU should be
	// synced around state save/load.
	p.DoArray(g_main_cp_state.array_bases);
	p.DoArray(g_main_cp_state.array_strides);
	p.Do(g_main_cp_state.matrix_index_a);
	p.Do(g_main_cp_state.matrix_index_b);
	p.Do(g_main_cp_state.vtx_desc.Hex);
	p.DoArray(g_main_cp_state.vtx_attr);
	p.DoMarker("CP Memory");
	if (p.mode == PointerWrap::MODE_READ)
	{
		CopyPreprocessCPStateFromMain();
		g_main_cp_state.bases_dirty = true;
	}
}
Beispiel #3
0
void Fifo_UpdateWantDeterminism(bool want)
{
	// We are paused (or not running at all yet), so
	// it should be safe to change this.
	const SConfig& param = SConfig::GetInstance();
	bool gpu_thread = false;
	switch (param.m_GPUDeterminismMode)
	{
		case GPU_DETERMINISM_AUTO:
			gpu_thread = want;

			// Hack: For now movies are an exception to this being on (but not
			// to wanting determinism in general).  Once vertex arrays are
			// fixed, there should be no reason to want this off for movies by
			// default, so this can be removed.
			if (!NetPlay::IsNetPlayRunning())
				gpu_thread = false;

			break;
		case GPU_DETERMINISM_NONE:
			gpu_thread = false;
			break;
		case GPU_DETERMINISM_FAKE_COMPLETION:
			gpu_thread = true;
			break;
	}

	gpu_thread = gpu_thread && param.bCPUThread;

	if (g_use_deterministic_gpu_thread != gpu_thread)
	{
		g_use_deterministic_gpu_thread = gpu_thread;
		if (gpu_thread)
		{
			// These haven't been updated in non-deterministic mode.
			s_video_buffer_seen_ptr = s_video_buffer_pp_read_ptr = s_video_buffer_read_ptr;
			CopyPreprocessCPStateFromMain();
			VertexLoaderManager::MarkAllDirty();
		}
	}
}