Updated wined3d-1DTextures patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-02-22 16:23:14 +11:00
parent a85bb970af
commit 97461b276c

View File

@ -1,18 +1,18 @@
From b403de3b7d07a2323c866267261219e9c4eae9bc Mon Sep 17 00:00:00 2001
From a6d09ccfa16bcc9a55161d167f144724b5acc5a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 25 Aug 2016 19:24:47 +0200
Subject: [PATCH 04/17] wined3d: Create dummy 1d textures and surfaces.
Subject: [PATCH] wined3d: Create dummy 1d textures and surfaces.
---
dlls/wined3d/resource.c | 1 +
dlls/wined3d/texture.c | 174 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 175 insertions(+)
dlls/wined3d/texture.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 168 insertions(+)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index e318888..d3878cc 100644
index 97f7aec4e1..f3402179ac 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -76,6 +76,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -75,6 +75,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource_types[] =
{
{WINED3D_RTYPE_BUFFER, 0, WINED3D_GL_RES_TYPE_BUFFER},
@ -21,10 +21,10 @@ index e318888..d3878cc 100644
{WINED3D_RTYPE_TEXTURE_2D, 0, WINED3D_GL_RES_TYPE_TEX_RECT},
{WINED3D_RTYPE_TEXTURE_2D, 0, WINED3D_GL_RES_TYPE_RB},
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 2a172ee..f81d7cf 100644
index 354b62f622..5e2f68b482 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1649,6 +1649,45 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
@@ -1637,6 +1637,45 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
context, box, data, row_pitch, slice_pitch);
}
@ -70,7 +70,7 @@ index 2a172ee..f81d7cf 100644
static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_box *box,
const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch)
@@ -2022,6 +2399,131 @@ static const struct wined3d_resource_ops texture_resource_ops =
@@ -2035,6 +2074,130 @@ static const struct wined3d_resource_ops texture_resource_ops =
texture_resource_sub_resource_unmap,
};
@ -175,7 +175,6 @@ index 2a172ee..f81d7cf 100644
+ surface->texture_level = i;
+ surface->texture_layer = j;
+ list_init(&surface->renderbuffers);
+ list_init(&surface->overlays);
+
+ sub_resource = &texture->sub_resources[idx];
+ sub_resource->locations = WINED3D_LOCATION_DISCARDED;
@ -202,7 +201,7 @@ index 2a172ee..f81d7cf 100644
static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
unsigned int layer_count, unsigned int level_count, DWORD flags, struct wined3d_device *device,
void *parent, const struct wined3d_parent_ops *parent_ops)
@@ -2994,6 +3164,10 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -2952,6 +3115,10 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
switch (desc->resource_type)
{
@ -214,5 +213,5 @@ index 2a172ee..f81d7cf 100644
hr = texture_init(object, desc, layer_count, level_count, flags, device, parent, parent_ops);
break;
--
1.9.1
2.16.1