summaryrefslogtreecommitdiffstats
path: root/Graphics
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-11-17 03:38:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-11-17 03:38:10 +0000
commit68db615cd5f5ef731ca7018b251b43106c5a9f47 (patch)
treecd135e3fde86ff21a0329cbb9ea84fc5394e4ca2 /Graphics
parentUpdate readme.md (diff)
downloadDiligentCore-68db615cd5f5ef731ca7018b251b43106c5a9f47.tar.gz
DiligentCore-68db615cd5f5ef731ca7018b251b43106c5a9f47.zip
Fixed Android build issues
Diffstat (limited to 'Graphics')
-rw-r--r--Graphics/GraphicsEngine/include/ResourceMappingImpl.h2
-rw-r--r--Graphics/GraphicsEngine/include/StateObjectsRegistry.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/readme.md2
-rw-r--r--Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h4
-rw-r--r--Graphics/GraphicsTools/src/GraphicsUtilities.cpp1
5 files changed, 6 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngine/include/ResourceMappingImpl.h b/Graphics/GraphicsEngine/include/ResourceMappingImpl.h
index 39bc0f0a..0996144e 100644
--- a/Graphics/GraphicsEngine/include/ResourceMappingImpl.h
+++ b/Graphics/GraphicsEngine/include/ResourceMappingImpl.h
@@ -126,7 +126,7 @@ namespace Diligent
ThreadingTools::LockHelper Lock();
ThreadingTools::LockFlag m_LockFlag;
- typedef std::pair<ResMappingHashKey, RefCntAutoPtr<IDeviceObject> > HashTableElem;
+ typedef std::pair<const ResMappingHashKey, RefCntAutoPtr<IDeviceObject> > HashTableElem;
std::unordered_map< ResMappingHashKey, RefCntAutoPtr<IDeviceObject>, std::hash<ResMappingHashKey>, std::equal_to<ResMappingHashKey>, STDAllocatorRawMem<HashTableElem> > m_HashTable;
};
}
diff --git a/Graphics/GraphicsEngine/include/StateObjectsRegistry.h b/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
index 1a05ced7..febad5c6 100644
--- a/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
+++ b/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
@@ -198,7 +198,7 @@ namespace Diligent
Atomics::AtomicLong m_NumDeletedObjects;
/// Hash map that stores weak pointers to the referenced objects
- typedef std::pair< ResourceDescType, RefCntWeakPtr<IDeviceObject> > HashMapElem;
+ typedef std::pair< const ResourceDescType, RefCntWeakPtr<IDeviceObject> > HashMapElem;
std::unordered_map<ResourceDescType, RefCntWeakPtr<IDeviceObject>, std::hash<ResourceDescType>, std::equal_to<ResourceDescType>, STDAllocatorRawMem<HashMapElem> > m_DescToObjHashMap;
/// Registry name used for debug output
diff --git a/Graphics/GraphicsEngineD3D12/readme.md b/Graphics/GraphicsEngineD3D12/readme.md
index 21b5885a..b541dedc 100644
--- a/Graphics/GraphicsEngineD3D12/readme.md
+++ b/Graphics/GraphicsEngineD3D12/readme.md
@@ -47,7 +47,7 @@ Below are some of the methods that provide access to internal D3D12 objects:
| Function | Description |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| `ID3D12Resource* IBufferD3D12::GetD3D12Buffer(size_t &DataStartByteOffset, Uint32 ContextId)` | returns a pointer to the ID3D12Resource interface of the internal Direct3D12 buffer object. Note that dynamic buffers are suballocated from dynamic heap, and every context has its own dynamic heap. Offset from the beginning of the dynamic heap for a context identified by ContextId is returned in DataStartByteOffset parameter |
-| `void IBufferD3D12::SetD3D12ResourceState(D3D12_RESOURCE_STATES state)` | sets the buffer usage state. This method should be used when an application transitions the buffer to inform diligent engine about the current usage state |
+| `void IBufferD3D12::SetD3D12ResourceState(D3D12_RESOURCE_STATES state)` | sets the buffer usage state. This method should be used when an application transitions the buffer to inform diligent engine about the current usage state |
| `D3D12_CPU_DESCRIPTOR_HANDLE IBufferViewD3D12::GetCPUDescriptorHandle()` | returns CPU descriptor handle of the buffer view |
| `ID3D12Resource* ITextureD3D12::GetD3D12Texture()` | returns a pointer to the ID3D12Resource interface of the internal Direct3D12 texture object |
| `void ITextureD3D12::SetD3D12ResourceState(D3D12_RESOURCE_STATES state)` | sets the texture usage state. This method should be used when an application transitions the texture to inform diligent engine about the current usage state |
diff --git a/Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h b/Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h
index 17381758..8285125b 100644
--- a/Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h
+++ b/Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h
@@ -68,7 +68,7 @@ namespace Diligent
std::map<OffsetType,
FreeBlockInfo,
std::less<OffsetType>, // Standard ordering
- STDAllocatorRawMem<std::pair<OffsetType, FreeBlockInfo>> // Raw memory allocator
+ STDAllocatorRawMem<std::pair<const OffsetType, FreeBlockInfo>> // Raw memory allocator
>;
// Type of the map that keeps memory blocks sorted by their sizes
@@ -76,7 +76,7 @@ namespace Diligent
std::multimap<OffsetType,
TFreeBlocksByOffsetMap::iterator,
std::less<OffsetType>, // Standard ordering
- STDAllocatorRawMem<std::pair<OffsetType, TFreeBlocksByOffsetMap::iterator>> // Raw memory allocator
+ STDAllocatorRawMem<std::pair<const OffsetType, TFreeBlocksByOffsetMap::iterator>> // Raw memory allocator
>;
struct FreeBlockInfo
diff --git a/Graphics/GraphicsTools/src/GraphicsUtilities.cpp b/Graphics/GraphicsTools/src/GraphicsUtilities.cpp
index 9b5beb4f..23089571 100644
--- a/Graphics/GraphicsTools/src/GraphicsUtilities.cpp
+++ b/Graphics/GraphicsTools/src/GraphicsUtilities.cpp
@@ -26,6 +26,7 @@
#include "DebugUtilities.h"
#include <algorithm>
#include <functional>
+#include <math.h>
#define PI_F 3.1415926f