mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Merge pull request #16816 from unknownbrackets/metal-align-verts
Vulkan: Force align verts to 4 on Apple devices
This commit is contained in:
commit
03f64a0216
@ -1254,7 +1254,7 @@ void VertexDecoder::SetVertexType(u32 fmt, const VertexDecoderOptions &options,
|
||||
decOff += DecFmtSize(decFmt.posfmt);
|
||||
}
|
||||
|
||||
decFmt.stride = decOff;
|
||||
decFmt.stride = options.alignOutputToWord ? align(decOff, 4) : decOff;
|
||||
|
||||
decFmt.ComputeID();
|
||||
|
||||
|
@ -324,6 +324,7 @@ struct VertexDecoderOptions {
|
||||
bool expandAllWeightsToFloat;
|
||||
bool expand8BitNormalsToFloat;
|
||||
bool applySkinInDecode;
|
||||
bool alignOutputToWord;
|
||||
};
|
||||
|
||||
class VertexDecoder {
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
@ -70,6 +71,9 @@ DrawEngineVulkan::DrawEngineVulkan(Draw::DrawContext *draw)
|
||||
: draw_(draw), vai_(1024) {
|
||||
decOptions_.expandAllWeightsToFloat = false;
|
||||
decOptions_.expand8BitNormalsToFloat = false;
|
||||
#if PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(IOS)
|
||||
decOptions_.alignOutputToWord = true;
|
||||
#endif
|
||||
|
||||
// Allocate nicely aligned memory. Maybe graphics drivers will appreciate it.
|
||||
// All this is a LOT of memory, need to see if we can cut down somehow.
|
||||
|
Loading…
x
Reference in New Issue
Block a user