Merge pull request #46 from GloriousEggroll/testing

winebuild-Fake_Dlls, wined3d-1DTextures
This commit is contained in:
GloriousEggroll 2018-02-20 18:21:53 -05:00 committed by GitHub
commit 1943caeef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 67 deletions

View File

@ -64,9 +64,9 @@ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 86e5047facb..8b9df0cc7c0 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -59,6 +59,8 @@ static struct _KUSER_SHARED_DATA user_sh
struct _KUSER_SHARED_DATA *user_shared_data_external;
@@ -60,6 +60,8 @@ struct _KUSER_SHARED_DATA *user_shared_data_external;
struct _KUSER_SHARED_DATA *user_shared_data = &user_shared_data_internal;
static const WCHAR default_windirW[] = {'C',':','\\','w','i','n','d','o','w','s',0};
+extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
+

View File

@ -11,119 +11,111 @@ Subject: wined3d: Create dummy 1d textures.
3 files changed, 40 insertions(+)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index a423fac2079..65853209864 100644
index 9b6c19ef65..b09b08c690 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1514,6 +1514,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
@@ -1736,6 +1736,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
{
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
checkGLcall("glActiveTexture");
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, textures->tex_1d);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, textures->tex_2d);
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
@@ -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);
@@ -1751,8 +1752,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, textures->tex_cube_array);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ {
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_ARRAY, device->dummy_textures.tex_2d_array);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, textures->tex_1d_array);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_ARRAY, textures->tex_2d_array);
-
+ }
if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT])
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, device->dummy_textures.tex_buffer);
@@ -2411,6 +2415,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, textures->tex_buffer);
@@ -2735,6 +2738,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
case GL_NONE:
/* nothing to do */
break;
+ case GL_TEXTURE_1D:
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, textures->tex_1d);
+ checkGLcall("glBindTexture");
+ break;
+ case GL_TEXTURE_1D_ARRAY:
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, textures->tex_1d_array);
+ checkGLcall("glBindTexture");
+ break;
case GL_TEXTURE_2D:
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
checkGLcall("glBindTexture");
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, textures->tex_2d);
break;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index eef9818affd..5b598e2f3a4 100644
index 6e275e1cff..16626040f4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -628,6 +628,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@@ -617,6 +617,12 @@ 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);
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_1d);
+ checkGLcall("glGenTextures");
+ TRACE("Dummy 1D texture given name %u.\n", device->dummy_textures.tex_1d);
+
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
+ checkGLcall("glBindTexture");
+
+ gl_info->gl_ops.gl.p_glGenTextures(1, &textures->tex_1d);
+ TRACE("Dummy 1D texture given name %u.\n", textures->tex_1d);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, textures->tex_1d);
+ gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA8, 1, 0,
+ GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
+ checkGLcall("glTexImage1D");
+
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);
@@ -704,6 +715,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
gl_info->gl_ops.gl.p_glGenTextures(1, &textures->tex_2d);
TRACE("Dummy 2D texture given name %u.\n", textures->tex_2d);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, textures->tex_2d);
@@ -668,6 +674,13 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
if (gl_info->supported[EXT_TEXTURE_ARRAY])
{
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_1d_array);
+ checkGLcall("glGenTextures");
+ TRACE("Dummy 1D array texture given name %u.\n", device->dummy_textures.tex_1d_array);
+
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
+ checkGLcall("glBindTexture");
+
+ gl_info->gl_ops.gl.p_glGenTextures(1, &textures->tex_1d_array);
+ TRACE("Dummy 1D array texture given name %u.\n", textures->tex_1d_array);
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, textures->tex_1d_array);
+ gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_1D_ARRAY, 0, GL_RGBA8, 1, 1, 0,
+ GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
+ checkGLcall("glTexImage2D");
+
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);
@@ -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);
gl_info->gl_ops.gl.p_glGenTextures(1, &textures->tex_2d_array);
TRACE("Dummy 2D array texture given name %u.\n", textures->tex_2d_array);
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_ARRAY, textures->tex_2d_array);
@@ -735,7 +748,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_buffer);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ {
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_array);
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d_array);
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_1d_array);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_2d_array);
+ }
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, &dummy_textures->tex_cube_array);
@@ -750,6 +766,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_rect);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d);
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_2d);
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->tex_1d);
checkGLcall("Delete dummy textures");
checkGLcall("delete dummy textures");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index cdc240058a2..34d8f18d698 100644
index 7a606a7a42..ce563345f6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2666,11 +2666,13 @@ struct wined3d_device
/* Textures for when no other textures are mapped */
struct
{
+ GLuint tex_1d;
GLuint tex_2d;
GLuint tex_rect;
GLuint tex_3d;
GLuint tex_cube;
GLuint tex_cube_array;
+ GLuint tex_1d_array;
GLuint tex_2d_array;
GLuint tex_buffer;
} dummy_textures;
@@ -2863,11 +2863,13 @@ struct wined3d_state
struct wined3d_dummy_textures
{
GLuint tex_2d;
+ GLuint tex_1d;
GLuint tex_rect;
GLuint tex_3d;
GLuint tex_cube;
GLuint tex_cube_array;
GLuint tex_2d_array;
+ GLuint tex_1d_array;
GLuint tex_buffer;
GLuint tex_2d_ms;
GLuint tex_2d_ms_array;
--
2.11.0