Merge pull request #2134 from vlj/dx12-fix

Dx12 fixes
This commit is contained in:
vlj 2016-09-12 20:38:56 +02:00 committed by GitHub
commit d43edb19d2
4 changed files with 8 additions and 5 deletions

View File

@ -455,10 +455,10 @@ DXGI_FORMAT get_vertex_attribute_format(rsx::vertex_base_type type, u8 size)
{
switch (size)
{
case 1: return DXGI_FORMAT_R16G16B16A16_SNORM;
case 1:
case 2:
case 3:
case 4: fmt::throw_exception("Unsupported CMP vertex format with size > 1" HERE);
case 3: fmt::throw_exception("Unsupported CMP vertex format with size > 1" HERE);
case 4: return DXGI_FORMAT_R16G16B16A16_SNORM;
}
break;
}

View File

@ -356,7 +356,7 @@ void D3D12GSRender::end()
.Offset((INT)currentDescriptorIndex + vertex_buffer_count, m_descriptor_stride_srv_cbv_uav)
);
if (m_transform_constants_dirty)
if (m_transform_constants_dirty && !g_cfg_rsx_debug_output)
{
m_current_transform_constants_buffer_descriptor_id = (u32)currentDescriptorIndex + 1 + vertex_buffer_count;
upload_and_bind_vertex_shader_constants(currentDescriptorIndex + 1 + vertex_buffer_count);

View File

@ -23,6 +23,8 @@ void data_cache::protect_data(u64 key, u32 start, size_t size)
bool data_cache::invalidate_address(u32 addr)
{
// In case 2 threads write to texture memory
std::lock_guard<std::mutex> lock(m_mut);
bool handled = false;
auto It = m_protected_ranges.begin(), E = m_protected_ranges.end();
for (; It != E;)
@ -33,7 +35,6 @@ bool data_cache::invalidate_address(u32 addr)
u32 protectedRangeStart = std::get<1>(protectedTexture), protectedRangeSize = std::get<2>(protectedTexture);
if (addr >= protectedRangeStart && addr <= protectedRangeSize + protectedRangeStart)
{
std::lock_guard<std::mutex> lock(m_mut);
u64 texadrr = std::get<0>(protectedTexture);
m_address_to_data[texadrr].first.m_is_dirty = true;

View File

@ -38,6 +38,8 @@ public:
u8 size() const
{
if (decode_reg().type() == rsx::vertex_base_type::cmp)
return 4;
return decode_reg().size();
}