Rebase against 1ddf2b4db8c42da36bdccd43dc336eee6ba03cce.

This commit is contained in:
Sebastian Lackner
2017-03-10 03:25:38 +01:00
parent 3b1cd79e05
commit 0ef6532241
23 changed files with 541 additions and 1734 deletions

View File

@@ -1,4 +1,4 @@
From 6a1701127f6f8f1c885cb787249496179a69b06b Mon Sep 17 00:00:00 2001
From 16e895f9770039a4d9129d577698c8dcec90334e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 23 Aug 2016 22:54:14 +0200
Subject: wined3d: Create dummy 1d textures.
@@ -10,10 +10,10 @@ Subject: wined3d: Create dummy 1d textures.
3 files changed, 40 insertions(+)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index cd0057e1591..a4820d337c0 100644
index a423fac2079..65853209864 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1531,6 +1531,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
@@ -1514,6 +1514,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
checkGLcall("glActiveTexture");
@@ -21,8 +21,8 @@ index cd0057e1591..a4820d337c0 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
@@ -1543,7 +1544,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_textures.tex_cube);
@@ -1529,7 +1530,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, device->dummy_textures.tex_cube_array);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ {
@@ -32,7 +32,7 @@ index cd0057e1591..a4820d337c0 100644
if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT])
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, device->dummy_textures.tex_buffer);
@@ -2426,6 +2430,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
@@ -2411,6 +2415,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
case GL_NONE:
/* nothing to do */
break;
@@ -48,10 +48,10 @@ index cd0057e1591..a4820d337c0 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
checkGLcall("glBindTexture");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7898527f6c0..b5a42905d33 100644
index eef9818affd..5b598e2f3a4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -624,6 +624,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@@ -628,6 +628,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
* to each texture stage when the currently set D3D texture is NULL. */
context_active_texture(context, gl_info, 0);
@@ -69,7 +69,7 @@ index 7898527f6c0..b5a42905d33 100644
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d);
checkGLcall("glGenTextures");
TRACE("Dummy 2D texture given name %u.\n", device->dummy_textures.tex_2d);
@@ -682,6 +693,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@@ -704,6 +715,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
if (gl_info->supported[EXT_TEXTURE_ARRAY])
{
@@ -87,7 +87,7 @@ index 7898527f6c0..b5a42905d33 100644
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_array);
checkGLcall("glGenTextures");
TRACE("Dummy 2D array texture given name %u.\n", device->dummy_textures.tex_2d_array);
@@ -729,7 +751,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
@@ -751,7 +773,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_buffer);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
@@ -96,9 +96,9 @@ index 7898527f6c0..b5a42905d33 100644
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d_array);
+ }
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube);
@@ -741,6 +766,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY])
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube_array);
@@ -766,6 +791,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_rect);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d);
@@ -107,10 +107,10 @@ index 7898527f6c0..b5a42905d33 100644
checkGLcall("Delete dummy textures");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 051836c7414..a71ea9e73ef 100644
index cdc240058a2..34d8f18d698 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2582,10 +2582,12 @@ struct wined3d_device
@@ -2666,11 +2666,13 @@ struct wined3d_device
/* Textures for when no other textures are mapped */
struct
{
@@ -119,6 +119,7 @@ index 051836c7414..a71ea9e73ef 100644
GLuint tex_rect;
GLuint tex_3d;
GLuint tex_cube;
GLuint tex_cube_array;
+ GLuint tex_1d_array;
GLuint tex_2d_array;
GLuint tex_buffer;