30 TRACE(
"%p increasing refcount to %u.\n",
sampler, refcount);
39 TRACE(
"%p decreasing refcount to %u.\n",
sampler, refcount);
44 sampler->device->adapter->adapter_ops->adapter_destroy_sampler(
sampler);
61 TRACE(
"sampler %p, device %p, desc %p, parent %p, parent_ops %p.\n",
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);
80 sampler->parent_ops = parent_ops;
92 TRACE(
"sampler_gl %p.\n", sampler_gl);
97 desc = &sampler_gl->
s.desc;
133 TRACE(
"sampler_gl %p, device %p, desc %p, parent %p, parent_ops %p.\n",
147 ERR(
"Invalid filter type %#x.\n",
f);
160 ERR(
"Invalid filter type %#x.\n",
f);
174 ERR(
"Invalid address mode %#x.\n",
a);
206 if (!
memcmp(&colours[
i], colour,
sizeof(*colour)))
207 return colours[
i].vk_colour;
210 FIXME(
"Unhandled border colour {%.8e, %.8e, %.8e, %.8e}.\n", colour->
r, colour->
g, colour->
b, colour->
a);
224 VkSampler vk_sampler;
227 TRACE(
"sampler_vk %p.\n", sampler_vk);
234 desc = &sampler_vk->
s.desc;
237 sampler_desc.
flags = 0;
257 if (
desc->mip_base_level)
258 FIXME(
"Unhandled mip_base_level %u.\n",
desc->mip_base_level);
260 FIXME(
"Unhandled srgb_decode %#x.\n",
desc->srgb_decode);
280 TRACE(
"sampler_vk %p, device %p, desc %p, parent %p, parent_ops %p.\n",
290 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, sampler %p.\n",
336 ERR(
"Could not apply sampler state.\n");
#define InterlockedIncrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
VkCompareOp vk_compare_op_from_wined3d(enum wined3d_cmp_func op)
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
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)
const char * wined3d_debug_vkresult(VkResult vr)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
GLenum wined3d_gl_compare_func(enum wined3d_cmp_func f)
#define GL_TEXTURE_MIN_FILTER
#define GL_TEXTURE_BORDER_COLOR
#define GL_TEXTURE_WRAP_R
#define GL_TEXTURE_WRAP_S
#define GL_TEXTURE_BASE_LEVEL
#define GL_TEXTURE_MAX_LOD
#define GL_TEXTURE_WRAP_T
#define GL_TEXTURE_MAG_FILTER
#define GL_TEXTURE_MIN_LOD
#define GL_SKIP_DECODE_EXT
#define GL_TEXTURE_COMPARE_FUNC
#define GL_COMPARE_R_TO_TEXTURE
#define GL_TEXTURE_LOD_BIAS
#define GL_TEXTURE_SRGB_DECODE_EXT
GLboolean GLboolean GLboolean GLboolean a
#define GL_TEXTURE_COMPARE_MODE
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
D3D11_SHADER_VARIABLE_DESC desc
png_const_structrp png_const_inforp int * unit
static VkFilter vk_filter_from_wined3d(enum wined3d_texture_filter_type f)
ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
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)
static void wined3d_sampler_gl_cs_init(void *object)
void *CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
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)
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)
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)
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)
static VkSamplerMipmapMode vk_mipmap_mode_from_wined3d(enum wined3d_texture_filter_type f)
static VkBorderColor vk_border_colour_from_wined3d(const struct wined3d_color *colour)
static void wined3d_sampler_vk_cs_init(void *object)
static VkSamplerAddressMode vk_address_mode_from_wined3d(enum wined3d_texture_address a)
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)
ULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
VkImageLayout imageLayout
VkBool32 unnormalizedCoordinates
VkSamplerAddressMode addressModeU
VkBool32 anisotropyEnable
VkBorderColor borderColor
VkSamplerMipmapMode mipmapMode
VkSamplerAddressMode addressModeW
VkSamplerCreateFlags flags
VkSamplerAddressMode addressModeV
struct wined3d_sampler_desc sampler_desc
struct wined3d_gl_info gl_info
const struct wined3d_gl_info * gl_info
uint32_t wined3d_creation_flags
struct wined3d_vk_info vk_info
struct wined3d_context_vk context_vk
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
GLint wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP+1]
VkDescriptorImageInfo vk_image_info
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE
@ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
@ VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK
@ VK_SAMPLER_MIPMAP_MODE_NEAREST
@ VK_SAMPLER_MIPMAP_MODE_LINEAR
VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler)
@ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
@ VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
@ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
#define GL_TEXTURE_MAX_ANISOTROPY
wined3d_texture_filter_type
@ WINED3D_TADDRESS_BORDER
@ WINED3D_TADDRESS_MIRROR_ONCE
@ WINED3D_TADDRESS_MIRROR
#define WINED3DERR_INVALIDCALL
#define WINED3D_SRGB_READ_WRITE_CONTROL
@ ARB_TEXTURE_FILTER_ANISOTROPIC
@ EXT_TEXTURE_SRGB_DECODE
static GLenum wined3d_gl_mag_filter(enum wined3d_texture_filter_type mag_filter)
static struct gl_texture * wined3d_texture_gl_get_gl_texture(struct wined3d_texture_gl *texture_gl, bool srgb)
static GLenum wined3d_gl_min_mip_filter(enum wined3d_texture_filter_type min_filter, enum wined3d_texture_filter_type mip_filter)
void WINAPI wined3d_mutex_unlock(void)
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