- compile fixes for mac os

This commit is contained in:
Rachael Alexanderson 2023-09-16 12:18:50 -04:00 committed by Christoph Oelckers
parent 9d197e848d
commit bb111fa96d
4 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,4 @@
#include <cmath>
#include "engineerrors.h"
#include "textures.h"

View file

@ -196,7 +196,7 @@ void VulkanRenderDevice::InitializeState()
for (int threadIndex = 0; threadIndex < MaxThreads; threadIndex++)
{
#ifdef __APPLE__
mRenderState.push_back(std::make_unique<VkRenderStateMolten>(this));
mRenderState.push_back(std::make_unique<VkRenderStateMolten>(this, 0));
#else
mRenderState.push_back(std::make_unique<VkRenderState>(this, 0));
#endif

View file

@ -110,10 +110,10 @@ class VSMatrix {
{
#ifdef NO_SSE
FVector4 result;
result.x = mMatrix[0 * 4 + 0] * v.X + mMatrix[1 * 4 + 0] * v.Y + mMatrix[2 * 4 + 0] * v.Z + mMatrix[3 * 4 + 0] * v.W;
result.y = mMatrix[0 * 4 + 1] * v.X + mMatrix[1 * 4 + 1] * v.Y + mMatrix[2 * 4 + 1] * v.Z + mMatrix[3 * 4 + 1] * v.W;
result.z = mMatrix[0 * 4 + 2] * v.X + mMatrix[1 * 4 + 2] * v.Y + mMatrix[2 * 4 + 2] * v.Z + mMatrix[3 * 4 + 2] * v.W;
result.w = mMatrix[0 * 4 + 3] * v.X + mMatrix[1 * 4 + 3] * v.Y + mMatrix[2 * 4 + 3] * v.Z + mMatrix[3 * 4 + 3] * v.W;
result.X = mMatrix[0 * 4 + 0] * v.X + mMatrix[1 * 4 + 0] * v.Y + mMatrix[2 * 4 + 0] * v.Z + mMatrix[3 * 4 + 0] * v.W;
result.Y = mMatrix[0 * 4 + 1] * v.X + mMatrix[1 * 4 + 1] * v.Y + mMatrix[2 * 4 + 1] * v.Z + mMatrix[3 * 4 + 1] * v.W;
result.Z = mMatrix[0 * 4 + 2] * v.X + mMatrix[1 * 4 + 2] * v.Y + mMatrix[2 * 4 + 2] * v.Z + mMatrix[3 * 4 + 2] * v.W;
result.W = mMatrix[0 * 4 + 3] * v.X + mMatrix[1 * 4 + 3] * v.Y + mMatrix[2 * 4 + 3] * v.Z + mMatrix[3 * 4 + 3] * v.W;
return result;
#else
__m128 m0 = _mm_loadu_ps(mMatrix);