ReactOS 0.4.17-dev-966-gf06eace
sampler.c
Go to the documentation of this file.
1/*
2 * Copyright 2012, 2015 Henri Verbeet for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 *
18 */
19
20#include "wined3d_private.h"
21#include "wined3d_gl.h"
22#include "wined3d_vk.h"
23
25
27{
28 unsigned int refcount = InterlockedIncrement(&sampler->refcount);
29
30 TRACE("%p increasing refcount to %u.\n", sampler, refcount);
31
32 return refcount;
33}
34
36{
37 unsigned int refcount = wined3d_atomic_decrement_mutex_lock(&sampler->refcount);
38
39 TRACE("%p decreasing refcount to %u.\n", sampler, refcount);
40
41 if (!refcount)
42 {
43 sampler->parent_ops->wined3d_object_destroyed(sampler->parent);
44 sampler->device->adapter->adapter_ops->adapter_destroy_sampler(sampler);
46 }
47
48 return refcount;
49}
50
52{
53 TRACE("sampler %p.\n", sampler);
54
55 return sampler->parent;
56}
57
59 const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
60{
61 TRACE("sampler %p, device %p, desc %p, parent %p, parent_ops %p.\n",
62 sampler, device, desc, parent, parent_ops);
63
64 TRACE(" Address modes: U %#x, V %#x, W %#x.\n", desc->address_u, desc->address_v, desc->address_w);
65 TRACE(" Border colour: {%.8e, %.8e, %.8e, %.8e}.\n",
66 desc->border_color[0], desc->border_color[1], desc->border_color[2], desc->border_color[3]);
67 TRACE(" Filters: mag %#x, min %#x, mip %#x.\n", desc->mag_filter, desc->min_filter, desc->mip_filter);
68 TRACE(" LOD bias: %.8e.\n", desc->lod_bias);
69 TRACE(" Minimum LOD: %.8e.\n", desc->min_lod);
70 TRACE(" Maximum LOD: %.8e.\n", desc->max_lod);
71 TRACE(" Base mip level: %u.\n", desc->mip_base_level);
72 TRACE(" Maximum anisotropy: %u.\n", desc->max_anisotropy);
73 TRACE(" Comparison: %d.\n", desc->compare);
74 TRACE(" Comparison func: %#x.\n", desc->comparison_func);
75 TRACE(" SRGB decode: %d.\n", desc->srgb_decode);
76
77 sampler->refcount = 1;
78 sampler->device = device;
79 sampler->parent = parent;
80 sampler->parent_ops = parent_ops;
81 sampler->desc = *desc;
82}
83
84static void wined3d_sampler_gl_cs_init(void *object)
85{
86 struct wined3d_sampler_gl *sampler_gl = object;
87 const struct wined3d_sampler_desc *desc;
88 const struct wined3d_gl_info *gl_info;
91
92 TRACE("sampler_gl %p.\n", sampler_gl);
93
94 context = context_acquire(sampler_gl->s.device, NULL, 0);
96
97 desc = &sampler_gl->s.desc;
98 GL_EXTCALL(glGenSamplers(1, &name));
99 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_WRAP_S,
100 gl_info->wrap_lookup[desc->address_u - WINED3D_TADDRESS_WRAP]));
101 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_WRAP_T,
102 gl_info->wrap_lookup[desc->address_v - WINED3D_TADDRESS_WRAP]));
103 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_WRAP_R,
104 gl_info->wrap_lookup[desc->address_w - WINED3D_TADDRESS_WRAP]));
105 GL_EXTCALL(glSamplerParameterfv(name, GL_TEXTURE_BORDER_COLOR, &desc->border_color[0]));
106 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_MAG_FILTER,
107 wined3d_gl_mag_filter(desc->mag_filter)));
108 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_MIN_FILTER,
109 wined3d_gl_min_mip_filter(desc->min_filter, desc->mip_filter)));
110 GL_EXTCALL(glSamplerParameterf(name, GL_TEXTURE_LOD_BIAS, desc->lod_bias));
111 GL_EXTCALL(glSamplerParameterf(name, GL_TEXTURE_MIN_LOD, desc->min_lod));
112 GL_EXTCALL(glSamplerParameterf(name, GL_TEXTURE_MAX_LOD, desc->max_lod));
114 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_MAX_ANISOTROPY, desc->max_anisotropy));
115 if (desc->compare)
117 GL_EXTCALL(glSamplerParameteri(name, GL_TEXTURE_COMPARE_FUNC,
118 wined3d_gl_compare_func(desc->comparison_func)));
119 if ((context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL)
120 && gl_info->supported[EXT_TEXTURE_SRGB_DECODE] && !desc->srgb_decode)
122 checkGLcall("sampler creation");
123
124 TRACE("Created sampler %u.\n", name);
125 sampler_gl->name = name;
126
128}
129
131 const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
132{
133 TRACE("sampler_gl %p, device %p, desc %p, parent %p, parent_ops %p.\n",
134 sampler_gl, device, desc, parent, parent_ops);
135
136 wined3d_sampler_init(&sampler_gl->s, device, desc, parent, parent_ops);
137
138 if (wined3d_adapter_gl(device->adapter)->gl_info.supported[ARB_SAMPLER_OBJECTS])
140}
141
143{
144 switch (f)
145 {
146 default:
147 ERR("Invalid filter type %#x.\n", f);
149 return VK_FILTER_NEAREST;
151 return VK_FILTER_LINEAR;
152 }
153}
154
156{
157 switch (f)
158 {
159 default:
160 ERR("Invalid filter type %#x.\n", f);
166 }
167}
168
170{
171 switch (a)
172 {
173 default:
174 ERR("Invalid address mode %#x.\n", a);
185 }
186}
187
189{
190 unsigned int i;
191
192 static const struct
193 {
194 struct wined3d_color wined3d_colour;
195 VkBorderColor vk_colour;
196 }
197 colours[] =
198 {
199 {{0.0f, 0.0f, 0.0f, 0.0f}, VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK},
200 {{0.0f, 0.0f, 0.0f, 1.0f}, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK},
201 {{1.0f, 1.0f, 1.0f, 1.0f}, VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE},
202 };
203
204 for (i = 0; i < ARRAY_SIZE(colours); ++i)
205 {
206 if (!memcmp(&colours[i], colour, sizeof(*colour)))
207 return colours[i].vk_colour;
208 }
209
210 FIXME("Unhandled border colour {%.8e, %.8e, %.8e, %.8e}.\n", colour->r, colour->g, colour->b, colour->a);
211
213}
214
215static void wined3d_sampler_vk_cs_init(void *object)
216{
217 struct wined3d_sampler_vk *sampler_vk = object;
218 const struct wined3d_sampler_desc *desc;
219 const struct wined3d_d3d_info *d3d_info;
220 struct VkSamplerCreateInfo sampler_desc;
221 const struct wined3d_vk_info *vk_info;
222 struct wined3d_context_vk *context_vk;
223 struct wined3d_device_vk *device_vk;
224 VkSampler vk_sampler;
225 VkResult vr;
226
227 TRACE("sampler_vk %p.\n", sampler_vk);
228
229 context_vk = wined3d_context_vk(context_acquire(sampler_vk->s.device, NULL, 0));
230 device_vk = wined3d_device_vk(context_vk->c.device);
231 d3d_info = context_vk->c.d3d_info;
232 vk_info = context_vk->vk_info;
233
234 desc = &sampler_vk->s.desc;
236 sampler_desc.pNext = NULL;
237 sampler_desc.flags = 0;
238 sampler_desc.magFilter = vk_filter_from_wined3d(desc->mag_filter);
239 sampler_desc.minFilter = vk_filter_from_wined3d(desc->min_filter);
240 sampler_desc.mipmapMode = vk_mipmap_mode_from_wined3d(desc->mip_filter);
241 sampler_desc.addressModeU = vk_address_mode_from_wined3d(desc->address_u);
242 sampler_desc.addressModeV = vk_address_mode_from_wined3d(desc->address_v);
243 sampler_desc.addressModeW = vk_address_mode_from_wined3d(desc->address_w);
244 sampler_desc.mipLodBias = desc->lod_bias;
245 sampler_desc.anisotropyEnable = desc->max_anisotropy != 1;
246 sampler_desc.maxAnisotropy = desc->max_anisotropy;
247 sampler_desc.compareEnable = !!desc->compare;
248 sampler_desc.compareOp = vk_compare_op_from_wined3d(desc->comparison_func);
249 sampler_desc.minLod = desc->min_lod;
250 sampler_desc.maxLod = desc->max_lod;
252 sampler_desc.unnormalizedCoordinates = VK_FALSE;
253
254 if (desc->address_u == WINED3D_TADDRESS_BORDER || desc->address_v == WINED3D_TADDRESS_BORDER
255 || desc->address_w == WINED3D_TADDRESS_BORDER)
256 sampler_desc.borderColor = vk_border_colour_from_wined3d((const struct wined3d_color *)desc->border_color);
257 if (desc->mip_base_level)
258 FIXME("Unhandled mip_base_level %u.\n", desc->mip_base_level);
259 if ((d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL) && !desc->srgb_decode)
260 FIXME("Unhandled srgb_decode %#x.\n", desc->srgb_decode);
261
262 vr = VK_CALL(vkCreateSampler(device_vk->vk_device, &sampler_desc, NULL, &vk_sampler));
264 if (vr < 0)
265 {
266 ERR("Failed to create Vulkan sampler, vr %s.\n", wined3d_debug_vkresult(vr));
267 return;
268 }
269
270 TRACE("Created sampler 0x%s.\n", wine_dbgstr_longlong(vk_sampler));
271
272 sampler_vk->vk_image_info.sampler = vk_sampler;
273 sampler_vk->vk_image_info.imageView = VK_NULL_HANDLE;
275}
276
278 const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
279{
280 TRACE("sampler_vk %p, device %p, desc %p, parent %p, parent_ops %p.\n",
281 sampler_vk, device, desc, parent, parent_ops);
282
283 wined3d_sampler_init(&sampler_vk->s, device, desc, parent, parent_ops);
285}
286
288 void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler)
289{
290 TRACE("device %p, desc %p, parent %p, parent_ops %p, sampler %p.\n",
291 device, desc, parent, parent_ops, sampler);
292
293 if (desc->address_u < WINED3D_TADDRESS_WRAP || desc->address_u > WINED3D_TADDRESS_MIRROR_ONCE
294 || desc->address_v < WINED3D_TADDRESS_WRAP || desc->address_v > WINED3D_TADDRESS_MIRROR_ONCE
295 || desc->address_w < WINED3D_TADDRESS_WRAP || desc->address_w > WINED3D_TADDRESS_MIRROR_ONCE)
297
298 if (desc->mag_filter < WINED3D_TEXF_POINT || desc->mag_filter > WINED3D_TEXF_LINEAR
299 || desc->min_filter < WINED3D_TEXF_POINT || desc->min_filter > WINED3D_TEXF_LINEAR
300 || desc->mip_filter > WINED3D_TEXF_LINEAR)
302
303 return device->adapter->adapter_ops->adapter_create_sampler(device, desc, parent, parent_ops, sampler);
304}
305
306static void texture_gl_apply_base_level(struct wined3d_texture_gl *texture_gl,
307 const struct wined3d_sampler_desc *desc, const struct wined3d_gl_info *gl_info)
308{
309 struct gl_texture *gl_tex;
310
311 gl_tex = wined3d_texture_gl_get_gl_texture(texture_gl, texture_gl->t.flags & WINED3D_TEXTURE_IS_SRGB);
312 if (desc->mip_base_level != gl_tex->sampler_desc.mip_base_level)
313 {
314 gl_info->gl_ops.gl.p_glTexParameteri(texture_gl->target, GL_TEXTURE_BASE_LEVEL, desc->mip_base_level);
315 gl_tex->sampler_desc.mip_base_level = desc->mip_base_level;
316 }
317}
318
319/* This function relies on the correct texture being bound and loaded. */
320void wined3d_sampler_gl_bind(struct wined3d_sampler_gl *sampler_gl, unsigned int unit,
321 struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl)
322{
323 const struct wined3d_gl_info *gl_info = context_gl->gl_info;
324
325 if (gl_info->supported[ARB_SAMPLER_OBJECTS])
326 {
327 GL_EXTCALL(glBindSampler(unit, sampler_gl->name));
328 checkGLcall("bind sampler");
329 }
330 else if (texture_gl)
331 {
332 wined3d_texture_gl_apply_sampler_desc(texture_gl, &sampler_gl->s.desc, context_gl);
333 }
334 else
335 {
336 ERR("Could not apply sampler state.\n");
337 }
338
339 if (texture_gl)
340 texture_gl_apply_base_level(texture_gl, &sampler_gl->s.desc, gl_info);
341}
#define InterlockedIncrement
Definition: armddk.h:53
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
VkCompareOp vk_compare_op_from_wined3d(enum wined3d_cmp_func op)
Definition: context_vk.c:30
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
Definition: cs.c:2304
#define NULL
Definition: types.h:112
void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_context_gl *context_gl)
Definition: texture.c:1418
const char * wined3d_debug_vkresult(VkResult vr)
Definition: utils.c:5463
#define CDECL
Definition: compat.h:29
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
r parent
Definition: btrfs.c:3010
GLenum wined3d_gl_compare_func(enum wined3d_cmp_func f)
Definition: ffp_gl.c:138
#define GL_TEXTURE_MIN_FILTER
Definition: gl.h:649
#define GL_TEXTURE_BORDER_COLOR
Definition: gl.h:656
#define GL_TEXTURE_WRAP_R
Definition: gl.h:1518
#define GL_TEXTURE_WRAP_S
Definition: gl.h:646
#define GL_TEXTURE_BASE_LEVEL
Definition: gl.h:1503
unsigned int GLuint
Definition: gl.h:159
#define GL_TEXTURE_MAX_LOD
Definition: gl.h:1502
#define GL_TEXTURE_WRAP_T
Definition: gl.h:647
#define GL_TEXTURE_MAG_FILTER
Definition: gl.h:648
#define GL_TEXTURE_MIN_LOD
Definition: gl.h:1501
#define GL_SKIP_DECODE_EXT
Definition: glext.h:5291
#define GL_TEXTURE_COMPARE_FUNC
Definition: glext.h:300
#define GL_COMPARE_R_TO_TEXTURE
Definition: glext.h:326
#define GL_TEXTURE_LOD_BIAS
Definition: glext.h:295
GLuint sampler
Definition: glext.h:7283
#define GL_TEXTURE_SRGB_DECODE_EXT
Definition: glext.h:5289
GLfloat f
Definition: glext.h:7540
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define GL_TEXTURE_COMPARE_MODE
Definition: glext.h:299
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
png_const_structrp png_const_inforp int * unit
Definition: png.h:2392
static VkFilter vk_filter_from_wined3d(enum wined3d_texture_filter_type f)
Definition: sampler.c:142
ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
Definition: sampler.c:26
void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: sampler.c:130
static void wined3d_sampler_gl_cs_init(void *object)
Definition: sampler.c:84
void *CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
Definition: sampler.c:51
void wined3d_sampler_gl_bind(struct wined3d_sampler_gl *sampler_gl, unsigned int unit, struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl)
Definition: sampler.c:320
static void texture_gl_apply_base_level(struct wined3d_texture_gl *texture_gl, const struct wined3d_sampler_desc *desc, const struct wined3d_gl_info *gl_info)
Definition: sampler.c:306
HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler)
Definition: sampler.c:287
static void wined3d_sampler_init(struct wined3d_sampler *sampler, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: sampler.c:58
static VkSamplerMipmapMode vk_mipmap_mode_from_wined3d(enum wined3d_texture_filter_type f)
Definition: sampler.c:155
static VkBorderColor vk_border_colour_from_wined3d(const struct wined3d_color *colour)
Definition: sampler.c:188
static void wined3d_sampler_vk_cs_init(void *object)
Definition: sampler.c:215
static VkSamplerAddressMode vk_address_mode_from_wined3d(enum wined3d_texture_address a)
Definition: sampler.c:169
void wined3d_sampler_vk_init(struct wined3d_sampler_vk *sampler_vk, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: sampler.c:277
ULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
Definition: sampler.c:35
#define TRACE(s)
Definition: solgame.cpp:4
VkImageLayout imageLayout
Definition: vulkan.h:8266
VkBool32 unnormalizedCoordinates
Definition: vulkan.h:13870
VkSamplerAddressMode addressModeU
Definition: vulkan.h:13859
VkBool32 anisotropyEnable
Definition: vulkan.h:13863
VkBorderColor borderColor
Definition: vulkan.h:13869
const void * pNext
Definition: vulkan.h:13854
VkBool32 compareEnable
Definition: vulkan.h:13865
VkSamplerMipmapMode mipmapMode
Definition: vulkan.h:13858
VkFilter magFilter
Definition: vulkan.h:13856
VkFilter minFilter
Definition: vulkan.h:13857
VkSamplerAddressMode addressModeW
Definition: vulkan.h:13861
VkSamplerCreateFlags flags
Definition: vulkan.h:13855
VkCompareOp compareOp
Definition: vulkan.h:13866
VkStructureType sType
Definition: vulkan.h:13853
VkSamplerAddressMode addressModeV
Definition: vulkan.h:13860
Definition: http.c:7252
Definition: devices.h:37
struct wined3d_sampler_desc sampler_desc
Definition: wined3d_gl.h:928
Definition: name.c:39
struct wined3d_gl_info gl_info
Definition: wined3d_gl.h:800
const struct wined3d_gl_info * gl_info
Definition: wined3d_gl.h:603
uint32_t wined3d_creation_flags
VkDevice vk_device
Definition: wined3d_vk.h:825
struct wined3d_vk_info vk_info
Definition: wined3d_vk.h:830
struct wined3d_context_vk context_vk
Definition: wined3d_vk.h:823
BOOL supported[WINED3D_GL_EXT_COUNT]
Definition: wined3d_gl.h:347
struct opengl_funcs gl_ops
Definition: wined3d_gl.h:353
GLint wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP+1]
Definition: wined3d_gl.h:348
struct wined3d_sampler s
Definition: wined3d_gl.h:1029
struct wined3d_sampler s
Definition: wined3d_vk.h:903
VkDescriptorImageInfo vk_image_info
Definition: wined3d_vk.h:905
struct wined3d_texture t
Definition: wined3d_gl.h:941
uint32_t ULONG
Definition: typedefs.h:59
@ VK_IMAGE_LAYOUT_UNDEFINED
Definition: vulkan.h:3451
VkBorderColor
Definition: vulkan.h:1887
@ VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE
Definition: vulkan.h:1892
@ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
Definition: vulkan.h:1888
@ VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK
Definition: vulkan.h:1890
VkSamplerMipmapMode
Definition: vulkan.h:4733
@ VK_SAMPLER_MIPMAP_MODE_NEAREST
Definition: vulkan.h:4734
@ VK_SAMPLER_MIPMAP_MODE_LINEAR
Definition: vulkan.h:4735
#define VK_FALSE
Definition: vulkan.h:56
VkFilter
Definition: vulkan.h:2806
@ VK_FILTER_NEAREST
Definition: vulkan.h:2807
@ VK_FILTER_LINEAR
Definition: vulkan.h:2808
VkResult
Definition: vulkan.h:4639
VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler)
VkSamplerAddressMode
Definition: vulkan.h:4712
@ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
Definition: vulkan.h:4714
@ VK_SAMPLER_ADDRESS_MODE_REPEAT
Definition: vulkan.h:4713
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
Definition: vulkan.h:4715
@ VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
Definition: vulkan.h:4717
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
Definition: vulkan.h:4716
#define VK_NULL_HANDLE
Definition: vulkan.h:861
@ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Definition: vulkan.h:4995
#define GL_TEXTURE_MAX_ANISOTROPY
Definition: wgl.h:4461
wined3d_texture_filter_type
Definition: wined3d.h:704
@ WINED3D_TEXF_NONE
Definition: wined3d.h:705
@ WINED3D_TEXF_POINT
Definition: wined3d.h:706
@ WINED3D_TEXF_LINEAR
Definition: wined3d.h:707
wined3d_texture_address
Definition: wined3d.h:657
@ WINED3D_TADDRESS_BORDER
Definition: wined3d.h:661
@ WINED3D_TADDRESS_MIRROR_ONCE
Definition: wined3d.h:662
@ WINED3D_TADDRESS_WRAP
Definition: wined3d.h:658
@ WINED3D_TADDRESS_MIRROR
Definition: wined3d.h:659
@ WINED3D_TADDRESS_CLAMP
Definition: wined3d.h:660
#define WINED3DERR_INVALIDCALL
Definition: wined3d.h:44
#define WINED3D_SRGB_READ_WRITE_CONTROL
Definition: wined3d.h:1330
@ ARB_TEXTURE_FILTER_ANISOTROPIC
Definition: wined3d_gl.h:134
@ EXT_TEXTURE_SRGB_DECODE
Definition: wined3d_gl.h:203
@ ARB_SAMPLER_OBJECTS
Definition: wined3d_gl.h:106
static GLenum wined3d_gl_mag_filter(enum wined3d_texture_filter_type mag_filter)
Definition: wined3d_gl.h:377
#define GL_EXTCALL(f)
Definition: wined3d_gl.h:360
static struct gl_texture * wined3d_texture_gl_get_gl_texture(struct wined3d_texture_gl *texture_gl, bool srgb)
Definition: wined3d_gl.h:959
static GLenum wined3d_gl_min_mip_filter(enum wined3d_texture_filter_type min_filter, enum wined3d_texture_filter_type mip_filter)
Definition: wined3d_gl.h:382
#define checkGLcall(A)
Definition: wined3d_gl.h:402
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
static ULONG wined3d_atomic_decrement_mutex_lock(volatile LONG *refcount)
static void context_release(struct wined3d_context *context)
static struct wined3d_context * context_acquire(struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
#define WINED3D_TEXTURE_IS_SRGB
#define VK_CALL(f)
Definition: wined3d_vk.h:272