linux compile fixes

This commit is contained in:
baldurk
2016-01-02 00:34:04 +01:00
parent 55f866bfd5
commit c746957fb2
9 changed files with 27 additions and 22 deletions
+1 -1
View File
@@ -30,5 +30,5 @@ obj/
symsrv.yes
ipch/
*.shfbproj_*
renderdoc/driver/vulkan/renderdoc_capture.json
renderdocui/3rdparty/ironpython/pythonlibs.zip
+1 -1
View File
@@ -182,7 +182,7 @@ void EventBrowser::on_timeDraws_clicked()
uint32_t counters[] = { eCounter_EventGPUDuration };
rdctype::array<CounterResult> results;
r->FetchCounters(m_Core->CurFrame(), 0, ~0U, counters, 1, &results);
r->FetchCounters(m_Core->CurFrame(), counters, 1, &results);
GUIInvoke::blockcall([this, results]() {
SetDrawcallTimes(ui->events->topLevelItem(0), results);
+2
View File
@@ -78,6 +78,8 @@ data/spv/minmaxresult.compo \
data/spv/outline.frago \
data/spv/debuguniforms.ho \
data/spv/texsample.ho \
data/spv/quadwrite.frago \
data/spv/quadresolve.frago \
data/sourcecodepro.ttfo
.PHONY: all
+2 -2
View File
@@ -237,7 +237,7 @@ void VkInitParams::Set(const VkInstanceCreateInfo* pCreateInfo, ResourceId inst)
}
WrappedVulkan::WrappedVulkan(const char *logFilename)
: m_RenderState(m_CreationInfo)
: m_RenderState(&m_CreationInfo)
{
#if defined(RELEASE)
const bool debugSerialiser = false;
@@ -1813,7 +1813,7 @@ void WrappedVulkan::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t
RDCASSERT(m_PartialReplayData.resultPartialCmdBuffer == VK_NULL_HANDLE);
m_PartialReplayData.partialParent = ResourceId();
m_PartialReplayData.baseEvent = 0;
m_RenderState = VulkanRenderState(m_CreationInfo);
m_RenderState = VulkanRenderState(&m_CreationInfo);
m_RenderState.m_ResourceManager = GetResourceManager();
}
+2 -2
View File
@@ -2135,7 +2135,7 @@ struct QuadOverdrawCallback : public DrawcallCallback
, m_pDebug(vk->GetDebugManager())
, m_FrameID(frameID)
, m_Events(events)
, m_PrevState(VulkanCreationInfo())
, m_PrevState(NULL)
{ m_pDriver->SetDrawcallCB(this); }
~QuadOverdrawCallback()
{ m_pDriver->SetDrawcallCB(NULL); }
@@ -2160,7 +2160,7 @@ struct QuadOverdrawCallback : public DrawcallCallback
// if we don't get a hit, create a modified pipeline
if(pipe == VK_NULL_HANDLE)
{
VulkanCreationInfo &c = pipestate.m_CreationInfo;
VulkanCreationInfo &c = *pipestate.m_CreationInfo;
VulkanCreationInfo::Pipeline &p = c.m_Pipeline[pipestate.graphics.pipeline];
+12 -12
View File
@@ -26,7 +26,7 @@
#include "vk_info.h"
#include "vk_resources.h"
VulkanRenderState::VulkanRenderState(VulkanCreationInfo &createInfo)
VulkanRenderState::VulkanRenderState(VulkanCreationInfo *createInfo)
: m_CreationInfo(createInfo)
{
compute.pipeline = graphics.pipeline = renderPass = framebuffer = ResourceId();
@@ -95,14 +95,14 @@ void VulkanRenderState::BeginRenderPassAndApplyState(VkCommandBuffer cmd)
VkClearValue empty[16] = {0};
RDCASSERT(ARRAY_COUNT(empty) >= m_CreationInfo.m_RenderPass[renderPass].attachments.size());
RDCASSERT(ARRAY_COUNT(empty) >= m_CreationInfo->m_RenderPass[renderPass].attachments.size());
VkRenderPassBeginInfo rpbegin = {
VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, NULL,
Unwrap(m_CreationInfo.m_RenderPass[renderPass].loadRP),
Unwrap(m_CreationInfo->m_RenderPass[renderPass].loadRP),
Unwrap(GetResourceManager()->GetCurrentHandle<VkFramebuffer>(framebuffer)),
renderArea,
(uint32_t)m_CreationInfo.m_RenderPass[renderPass].attachments.size(), empty,
(uint32_t)m_CreationInfo->m_RenderPass[renderPass].attachments.size(), empty,
};
ObjDisp(cmd)->CmdBeginRenderPass(Unwrap(cmd), &rpbegin, VK_SUBPASS_CONTENTS_INLINE);
@@ -142,21 +142,21 @@ void VulkanRenderState::BindPipeline(VkCommandBuffer cmd)
{
ObjDisp(cmd)->CmdBindPipeline(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS, Unwrap(GetResourceManager()->GetCurrentHandle<VkPipeline>(graphics.pipeline)));
ResourceId pipeLayoutId = m_CreationInfo.m_Pipeline[graphics.pipeline].layout;
ResourceId pipeLayoutId = m_CreationInfo->m_Pipeline[graphics.pipeline].layout;
VkPipelineLayout layout = GetResourceManager()->GetCurrentHandle<VkPipelineLayout>(pipeLayoutId);
const vector<VkPushConstantRange> &pushRanges = m_CreationInfo.m_PipelineLayout[pipeLayoutId].pushRanges;
const vector<VkPushConstantRange> &pushRanges = m_CreationInfo->m_PipelineLayout[pipeLayoutId].pushRanges;
// only set push constant ranges that the layout uses
for(size_t i=0; i < pushRanges.size(); i++)
ObjDisp(cmd)->CmdPushConstants(Unwrap(cmd), Unwrap(layout), pushRanges[i].stageFlags, pushRanges[i].offset, pushRanges[i].size, pushconsts+pushRanges[i].offset);
const vector<ResourceId> &descSetLayouts = m_CreationInfo.m_PipelineLayout[pipeLayoutId].descSetLayouts;
const vector<ResourceId> &descSetLayouts = m_CreationInfo->m_PipelineLayout[pipeLayoutId].descSetLayouts;
// only iterate over the desc sets that this layout actually uses, not all that were bound
for(size_t i=0; i < descSetLayouts.size(); i++)
{
const DescSetLayout &descLayout = m_CreationInfo.m_DescSetLayout[ descSetLayouts[i] ];
const DescSetLayout &descLayout = m_CreationInfo->m_DescSetLayout[ descSetLayouts[i] ];
if(i < graphics.descSets.size() && graphics.descSets[i] != ResourceId())
{
@@ -176,20 +176,20 @@ void VulkanRenderState::BindPipeline(VkCommandBuffer cmd)
{
ObjDisp(cmd)->CmdBindPipeline(Unwrap(cmd), VK_PIPELINE_BIND_POINT_COMPUTE, Unwrap(GetResourceManager()->GetCurrentHandle<VkPipeline>(compute.pipeline)));
ResourceId pipeLayoutId = m_CreationInfo.m_Pipeline[compute.pipeline].layout;
ResourceId pipeLayoutId = m_CreationInfo->m_Pipeline[compute.pipeline].layout;
VkPipelineLayout layout = GetResourceManager()->GetCurrentHandle<VkPipelineLayout>(pipeLayoutId);
const vector<VkPushConstantRange> &pushRanges = m_CreationInfo.m_PipelineLayout[pipeLayoutId].pushRanges;
const vector<VkPushConstantRange> &pushRanges = m_CreationInfo->m_PipelineLayout[pipeLayoutId].pushRanges;
// only set push constant ranges that the layout uses
for(size_t i=0; i < pushRanges.size(); i++)
ObjDisp(cmd)->CmdPushConstants(Unwrap(cmd), Unwrap(layout), pushRanges[i].stageFlags, pushRanges[i].offset, pushRanges[i].size, pushconsts+pushRanges[i].offset);
const vector<ResourceId> &descSetLayouts = m_CreationInfo.m_PipelineLayout[pipeLayoutId].descSetLayouts;
const vector<ResourceId> &descSetLayouts = m_CreationInfo->m_PipelineLayout[pipeLayoutId].descSetLayouts;
for(size_t i=0; i < descSetLayouts.size(); i++)
{
const DescSetLayout &descLayout = m_CreationInfo.m_DescSetLayout[ descSetLayouts[i] ];
const DescSetLayout &descLayout = m_CreationInfo->m_DescSetLayout[ descSetLayouts[i] ];
if(compute.descSets[i] != ResourceId())
{
+2 -2
View File
@@ -33,7 +33,7 @@ class VulkanResourceManager;
struct VulkanRenderState
{
VulkanRenderState(VulkanCreationInfo &createInfo);
VulkanRenderState(VulkanCreationInfo *createInfo);
VulkanRenderState &operator =(const VulkanRenderState &o);
void BeginRenderPassAndApplyState(VkCommandBuffer cmd);
void BindPipeline(VkCommandBuffer cmd);
@@ -80,7 +80,7 @@ struct VulkanRenderState
VulkanResourceManager *GetResourceManager() { return m_ResourceManager; }
VulkanResourceManager *m_ResourceManager;
VulkanCreationInfo &m_CreationInfo;
VulkanCreationInfo *m_CreationInfo;
};
@@ -855,6 +855,9 @@ static VkResourceRecord *GetObjRecord(VkDbgObjectType objType, uint64_t object)
return GetRecord((VkSwapchainKHR)object);
case VK_OBJECT_TYPE_COMMAND_POOL:
return GetRecord((VkCommandPool)object);
case VK_OBJECT_TYPE_NUM:
case VK_OBJECT_TYPE_MAX_ENUM:
return NULL;
}
return NULL;
}
+2 -2
View File
@@ -54,7 +54,7 @@ static map<string, string> EnvStringToEnvMap(const char **envstring)
string name;
string value;
name.assign(e, equals);
name.assign(*e, equals);
value = equals+1;
ret[name] = value;
@@ -257,7 +257,7 @@ uint32_t Process::LaunchAndInjectIntoProcess(const char *app, const char *workin
}
// turn environment string to a UTF-8 map
map<string, string> env = EnvStringToEnvMap(environ);
map<string, string> env = EnvStringToEnvMap((const char **)environ);
vector<EnvironmentModification> &modifications = GetEnvModifications();
string libpath;