Rebase against 1c8c9308e74abe5e5d85dfe722dea10e60092e7c

This commit is contained in:
Alistair Leslie-Hughes
2018-03-15 09:54:36 +11:00
parent cea60071d1
commit ebe4142fc3
10 changed files with 67 additions and 571 deletions

View File

@@ -1,12 +1,12 @@
From e9f05f59ca4858a809dc21dee963ca8835515a4d Mon Sep 17 00:00:00 2001
From 8c57d27baaddc04866fcebda9040bc1b521d1fe0 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] wined3d: Create dummy 1d textures and surfaces.
---
dlls/wined3d/resource.c | 1 +
dlls/wined3d/texture.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 164 insertions(+)
dlls/wined3d/texture.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 163 insertions(+)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 97f7aec..f340217 100644
@@ -21,7 +21,7 @@ index 97f7aec..f340217 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 c520995..e901c32 100644
index 6323f87..2371df9 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1776,6 +1776,45 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
@@ -70,7 +70,7 @@ index c520995..e901c32 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)
@@ -2182,6 +2221,126 @@ static const struct wined3d_resource_ops texture_resource_ops =
@@ -2182,6 +2221,125 @@ static const struct wined3d_resource_ops texture_resource_ops =
texture_resource_sub_resource_unmap,
};
@@ -170,7 +170,6 @@ index c520995..e901c32 100644
+ struct wined3d_surface *surface;
+
+ surface = &surfaces[idx];
+ surface->container = texture;
+
+ sub_resource = &texture->sub_resources[idx];
+ sub_resource->locations = WINED3D_LOCATION_DISCARDED;
@@ -197,7 +196,7 @@ index c520995..e901c32 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)
@@ -3090,6 +3249,10 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -3089,6 +3247,10 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
switch (desc->resource_type)
{
@@ -209,5 +208,5 @@ index c520995..e901c32 100644
hr = texture_init(object, desc, layer_count, level_count, flags, device, parent, parent_ops);
break;
--
2.7.4
1.9.1