GL_ARB_texture_rgb10_a2ui provides support for the GL_RGB10_A2UI format, and nothing else.
Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/wined3d/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 3379b7386cfe..c6ae308eb105 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1566,7 +1566,7 @@ static const struct wined3d_format_texture_info format_texture_info[] = {WINED3DFMT_R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_8_8_8_8_REV, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, - ARB_TEXTURE_RGB10_A2UI, NULL}, + EXT_TEXTURE_INTEGER, NULL}, {WINED3DFMT_R8G8B8A8_SINT, GL_RGBA8I, GL_RGBA8I, 0, GL_RGBA_INTEGER, GL_BYTE, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET,
The enums are the same between the two extensions. The 24-8 packed depth/stencil format is the only thing provided by the latter.
Remove some redundant code.
Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/wined3d/adapter_gl.c | 5 +++++ dlls/wined3d/utils.c | 32 ++++++-------------------------- 2 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 29496f2556ea..48a135ce07c1 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3752,6 +3752,11 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, WARN("Disabling ARB_texture_multisample because immutable storage is not supported.\n"); gl_info->supported[ARB_TEXTURE_MULTISAMPLE] = FALSE; } + if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] && !gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) + { + TRACE(" IMPLIED: GL_EXT_packed_depth_stencil (by GL_ARB_framebuffer_object).\n"); + gl_info->supported[EXT_PACKED_DEPTH_STENCIL] = TRUE; + }
wined3d_adapter_init_limits(gl_info);
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index c6ae308eb105..7cb70e8d5fb8 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1795,29 +1795,20 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW, ARB_DEPTH_TEXTURE, NULL}, - {WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 4, - WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - EXT_PACKED_DEPTH_STENCIL, convert_s1_uint_d15_unorm}, {WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - ARB_FRAMEBUFFER_OBJECT, convert_s1_uint_d15_unorm}, + EXT_PACKED_DEPTH_STENCIL, convert_s1_uint_d15_unorm}, {WINED3DFMT_D24_UNORM_S8_UINT, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW, ARB_DEPTH_TEXTURE, NULL}, - {WINED3DFMT_D24_UNORM_S8_UINT, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, - WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING - | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - EXT_PACKED_DEPTH_STENCIL, NULL}, {WINED3DFMT_D24_UNORM_S8_UINT, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - ARB_FRAMEBUFFER_OBJECT, NULL}, + EXT_PACKED_DEPTH_STENCIL, NULL}, {WINED3DFMT_X8D24_UNORM, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 4, WINED3DFMT_FLAG_DEPTH, @@ -1831,14 +1822,10 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW, ARB_DEPTH_TEXTURE, NULL}, - {WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 4, - WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - EXT_PACKED_DEPTH_STENCIL, convert_s4x4_uint_d24_unorm}, {WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, - ARB_FRAMEBUFFER_OBJECT, convert_s4x4_uint_d24_unorm}, + EXT_PACKED_DEPTH_STENCIL, convert_s4x4_uint_d24_unorm}, {WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, WINED3DFMT_FLAG_DEPTH, @@ -1885,16 +1872,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_RG, GL_UNSIGNED_BYTE, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, ARB_TEXTURE_COMPRESSION_RGTC, NULL}, - {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, - WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING - | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - EXT_PACKED_DEPTH_STENCIL, NULL}, {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - ARB_FRAMEBUFFER_OBJECT, NULL}, + EXT_PACKED_DEPTH_STENCIL, NULL}, {WINED3DFMT_NULL, 0, 0, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FBO_ATTACHABLE, @@ -2591,8 +2573,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for BOOL match = TRUE; GLuint rb;
- if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] - || gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) + if (gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) { gl_info->fbo_ops.glGenRenderbuffers(1, &rb); gl_info->fbo_ops.glBindRenderbuffer(GL_RENDERBUFFER, rb); @@ -2698,8 +2679,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for } }
- if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] - || gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) + if (gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) { gl_info->fbo_ops.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); gl_info->fbo_ops.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
On Tue, 12 May 2020 at 11:30, Chip Davis cdavis@codeweavers.com wrote:
GL_ARB_texture_rgb10_a2ui provides support for the GL_RGB10_A2UI format, and nothing else.
It adds support for using UNSIGNED_INT_8_8_8_8_REV with TexImage*() and integer formats. See "Modify Section 3.7.4 ..." in the ARB_texture_rgb10_a2ui spec, or (more explicitly) issue 4 in that same spec.
May 13, 2020 9:49 AM, "Henri Verbeet" hverbeet@gmail.com wrote:
On Tue, 12 May 2020 at 11:30, Chip Davis cdavis@codeweavers.com wrote:
GL_ARB_texture_rgb10_a2ui provides support for the GL_RGB10_A2UI format, and nothing else.
It adds support for using UNSIGNED_INT_8_8_8_8_REV with TexImage*() and integer formats. See "Modify Section 3.7.4 ..." in the ARB_texture_rgb10_a2ui spec, or (more explicitly) issue 4 in that same spec.
You are correct, sir.
But why is that pixel format using a packed data type when (GL_RGBA_INTEGER, GL_UNSIGNED_BYTE) should be adequate?
Chip
On Wed, 13 May 2020 at 19:29, Chip Davis cdavis@codeweavers.com wrote:
May 13, 2020 9:49 AM, "Henri Verbeet" hverbeet@gmail.com wrote:
On Tue, 12 May 2020 at 11:30, Chip Davis cdavis@codeweavers.com wrote:
GL_ARB_texture_rgb10_a2ui provides support for the GL_RGB10_A2UI format, and nothing else.
It adds support for using UNSIGNED_INT_8_8_8_8_REV with TexImage*() and integer formats. See "Modify Section 3.7.4 ..." in the ARB_texture_rgb10_a2ui spec, or (more explicitly) issue 4 in that same spec.
You are correct, sir.
But why is that pixel format using a packed data type when (GL_RGBA_INTEGER, GL_UNSIGNED_BYTE) should be adequate?
Big-endian CPUs, probably. Not that that's particularly relevant these days, but IIRC that's the main reason to avoid GL_UNSIGNED_BYTE, at least traditionally.
Am 13.05.2020 um 17:40 schrieb Henri Verbeet hverbeet@gmail.com:
Big-endian CPUs, probably. Not that that's particularly relevant these days, but IIRC that's the main reason to avoid GL_UNSIGNED_BYTE, at least traditionally.
And at least once upon a time only packed types were fast and using a seemingly equivalent GL_UNSIGNED_BYTE format resulted in no-op conversion or PBOs not working properly or something along those lines.