forked from MoonsideGames/Refresh
hack to fix sub buffer index issue
parent
14993a4f22
commit
87920c0048
|
@ -286,8 +286,7 @@ typedef enum REFRESH_ColorComponentFlagBits
|
|||
REFRESH_COLORCOMPONENT_R_BIT = 0x00000001,
|
||||
REFRESH_COLORCOMPONENT_G_BIT = 0x00000002,
|
||||
REFRESH_COLORCOMPONENT_B_BIT = 0x00000004,
|
||||
REFRESH_COLORCOMPONENT_A_BIT = 0x00000008,
|
||||
REFRESH_COLORCOMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
REFRESH_COLORCOMPONENT_A_BIT = 0x00000008
|
||||
} REFRESH_ColorComponentFlagBits;
|
||||
|
||||
typedef uint32_t REFRESH_ColorComponentFlags;
|
||||
|
@ -430,7 +429,7 @@ typedef struct REFRESH_StencilOpState
|
|||
REFRESH_StencilOp failOp;
|
||||
REFRESH_StencilOp passOp;
|
||||
REFRESH_StencilOp depthFailOp;
|
||||
REFRESH_StencilOp compareOp;
|
||||
REFRESH_CompareOp compareOp;
|
||||
uint32_t compareMask;
|
||||
uint32_t writeMask;
|
||||
uint32_t reference;
|
||||
|
|
|
@ -4251,10 +4251,10 @@ static void VULKAN_INTERNAL_SetBufferData(
|
|||
uint8_t* mapPointer;
|
||||
VkResult vulkanResult;
|
||||
|
||||
#define SUBBUF vulkanBuffer->subBuffers[renderer->frameIndex]
|
||||
#define SUBBUF vulkanBuffer->subBuffers[0] // FIXME: testing
|
||||
|
||||
/* Buffer already bound, time to die */
|
||||
if (vulkanBuffer->subBuffers[renderer->frameIndex]->bound)
|
||||
if (SUBBUF->bound)
|
||||
{
|
||||
REFRESH_LogError("Buffer already bound. It is an error to write data to a buffer after binding before calling Present.");
|
||||
return;
|
||||
|
@ -4643,10 +4643,10 @@ static void VULKAN_BeginRenderPass(
|
|||
|
||||
for (i = 0; i < colorClearCount; i += 1)
|
||||
{
|
||||
clearValues[i].color.float32[0] = pColorClearValues[i].r / 256.0f;
|
||||
clearValues[i].color.float32[1] = pColorClearValues[i].g / 256.0f;
|
||||
clearValues[i].color.float32[2] = pColorClearValues[i].b / 256.0f;
|
||||
clearValues[i].color.float32[3] = pColorClearValues[i].a / 256.0f;
|
||||
clearValues[i].color.float32[0] = pColorClearValues[i].r / 255.0f;
|
||||
clearValues[i].color.float32[1] = pColorClearValues[i].g / 255.0f;
|
||||
clearValues[i].color.float32[2] = pColorClearValues[i].b / 255.0f;
|
||||
clearValues[i].color.float32[3] = pColorClearValues[i].a / 255.0f;
|
||||
}
|
||||
|
||||
if (depthStencilClearValue != NULL)
|
||||
|
@ -4753,7 +4753,7 @@ static void VULKAN_BindVertexBuffers(
|
|||
for (i = 0; i < bindingCount; i += 1)
|
||||
{
|
||||
currentBuffer = (VulkanBuffer*) pBuffers[i];
|
||||
buffers[i] = currentBuffer->subBuffers[renderer->frameIndex]->buffer;
|
||||
buffers[i] = currentBuffer->subBuffers[0]->buffer; // FIXME: testing
|
||||
VULKAN_INTERNAL_MarkAsBound(renderer, currentBuffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue