mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Improve Windows vulkan draw performance by reducing the size of a struct.
This commit is contained in:
@@ -298,9 +298,12 @@ struct BufferBindings
|
||||
|
||||
struct VertexAttributeInfo
|
||||
{
|
||||
uint8 bufferIndex;
|
||||
DataFormat format : 8;
|
||||
uint16 offsetFromVertex;
|
||||
uint8 packedFormat;
|
||||
uint8 bufferIndex;
|
||||
|
||||
void setFormat(DataFormat format) { packedFormat = (uint8)format; }
|
||||
DataFormat getFormat() const { return (DataFormat)packedFormat; }
|
||||
};
|
||||
|
||||
struct VertexBufferLayout
|
||||
@@ -335,7 +338,7 @@ struct VertexAttributes
|
||||
enableBits |= (1u << index);
|
||||
|
||||
attribs[index].bufferIndex = bufferindex;
|
||||
attribs[index].format = format;
|
||||
attribs[index].setFormat(format);
|
||||
attribs[index].offsetFromVertex = offsetfromvertex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user