Merge branch '12.0-development' into metal

This commit is contained in:
Alex Szpakowski
2022-01-05 21:12:22 -04:00
506 changed files with 706 additions and 539 deletions
+6 -4
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -151,7 +151,9 @@ bool Buffer::load(const void *initialdata)
glGenTextures(1, &texture);
gl.bindBufferTextureToUnit(texture, 0, false, true);
glTexBuffer(target, getGLFormat(getDataMember(0).decl.format), buffer);
GLenum glformat = getGLFormat(getDataMember(0).decl.format);
glTexBuffer(target, glformat, buffer);
}
return (glGetError() == GL_NO_ERROR);
@@ -164,7 +166,7 @@ bool Buffer::supportsOrphan() const
void *Buffer::map(MapType /*map*/, size_t offset, size_t size)
{
if (size == 0)
if (size == 0 || isImmutable())
return nullptr;
Range r(offset, size);
@@ -227,7 +229,7 @@ void Buffer::unmap(size_t usedoffset, size_t usedsize)
void Buffer::fill(size_t offset, size_t size, const void *data)
{
if (size == 0)
if (size == 0 || isImmutable())
return;
size_t buffersize = getSize();
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+3 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -1657,11 +1657,12 @@ void Graphics::initCapabilities()
capabilities.features[FEATURE_GLSL4] = GLAD_ES_VERSION_3_1 || (gl.isCoreProfile() && GLAD_VERSION_4_3);
capabilities.features[FEATURE_INSTANCING] = gl.isInstancingSupported();
capabilities.features[FEATURE_TEXEL_BUFFER] = gl.isBufferUsageSupported(BUFFERUSAGE_TEXEL);
capabilities.features[FEATURE_INDEX_BUFFER_32BIT] = GLAD_VERSION_1_1 || GLAD_ES_VERSION_3_0 || GLAD_OES_element_index_uint;
capabilities.features[FEATURE_COPY_BUFFER] = gl.isCopyBufferSupported();
capabilities.features[FEATURE_COPY_BUFFER_TO_TEXTURE] = gl.isCopyBufferToTextureSupported();
capabilities.features[FEATURE_COPY_TEXTURE_TO_BUFFER] = gl.isCopyTextureToBufferSupported();
capabilities.features[FEATURE_COPY_RENDER_TARGET_TO_BUFFER] = gl.isCopyRenderTargetToBufferSupported();
static_assert(FEATURE_MAX_ENUM == 15, "Graphics::initCapabilities must be updated when adding a new graphics feature!");
static_assert(FEATURE_MAX_ENUM == 16, "Graphics::initCapabilities must be updated when adding a new graphics feature!");
capabilities.limits[LIMIT_POINT_SIZE] = gl.getMaxPointSize();
capabilities.limits[LIMIT_TEXTURE_SIZE] = gl.getMax2DTextureSize();
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+2 -3
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -1479,8 +1479,7 @@ bool OpenGL::isBufferUsageSupported(BufferUsage usage) const
case BUFFERUSAGE_INDEX:
return true;
case BUFFERUSAGE_TEXEL:
// Not supported in ES until 3.2, which we don't support shaders for...
return GLAD_VERSION_3_1;
return GLAD_VERSION_3_1 || GLAD_ES_VERSION_3_2;
case BUFFERUSAGE_SHADER_STORAGE:
return (GLAD_VERSION_4_3 && isCoreProfile()) || GLAD_ES_VERSION_3_1;
case BUFFERUSAGE_MAX_ENUM:
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2021 LOVE Development Team
* Copyright (c) 2006-2022 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages