} VkTexMipmapMode;
typedef enum {
- VK_TEX_ADDRESS_WRAP = 0,
- VK_TEX_ADDRESS_MIRROR = 1,
- VK_TEX_ADDRESS_CLAMP = 2,
- VK_TEX_ADDRESS_MIRROR_ONCE = 3,
- VK_TEX_ADDRESS_CLAMP_BORDER = 4,
- VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_WRAP,
- VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_CLAMP_BORDER,
- VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_CLAMP_BORDER - VK_TEX_ADDRESS_WRAP + 1),
+ VK_TEX_ADDRESS_MODE_WRAP = 0,
+ VK_TEX_ADDRESS_MODE_MIRROR = 1,
+ VK_TEX_ADDRESS_MODE_CLAMP = 2,
+ VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 3,
+ VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 4,
+ VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_MODE_WRAP,
+ VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_MODE_CLAMP_BORDER,
+ VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_MODE_CLAMP_BORDER - VK_TEX_ADDRESS_MODE_WRAP + 1),
VK_TEX_ADDRESS_MAX_ENUM = 0x7FFFFFFF
-} VkTexAddress;
+} VkTexAddressMode;
typedef enum {
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
VkTexFilter magFilter;
VkTexFilter minFilter;
VkTexMipmapMode mipMode;
- VkTexAddress addressU;
- VkTexAddress addressV;
- VkTexAddress addressW;
+ VkTexAddressMode addressModeU;
+ VkTexAddressMode addressModeV;
+ VkTexAddressMode addressModeW;
float mipLodBias;
float maxAnisotropy;
VkBool32 compareEnable;
};
static const uint32_t vk_to_gen_tex_address[] = {
- [VK_TEX_ADDRESS_WRAP] = TCM_WRAP,
- [VK_TEX_ADDRESS_MIRROR] = TCM_MIRROR,
- [VK_TEX_ADDRESS_CLAMP] = TCM_CLAMP,
- [VK_TEX_ADDRESS_MIRROR_ONCE] = TCM_MIRROR_ONCE,
- [VK_TEX_ADDRESS_CLAMP_BORDER] = TCM_CLAMP_BORDER,
+ [VK_TEX_ADDRESS_MODE_WRAP] = TCM_WRAP,
+ [VK_TEX_ADDRESS_MODE_MIRROR] = TCM_MIRROR,
+ [VK_TEX_ADDRESS_MODE_CLAMP] = TCM_CLAMP,
+ [VK_TEX_ADDRESS_MODE_MIRROR_ONCE] = TCM_MIRROR_ONCE,
+ [VK_TEX_ADDRESS_MODE_CLAMP_BORDER] = TCM_CLAMP_BORDER,
};
static const uint32_t vk_to_gen_compare_op[] = {
.UAddressMagFilterRoundingEnable = 0,
.TrilinearFilterQuality = 0,
.NonnormalizedCoordinateEnable = 0,
- .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressU],
- .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressV],
- .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressW],
+ .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
+ .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
+ .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],
};
GEN7_SAMPLER_STATE_pack(NULL, sampler->state, &sampler_state);
};
static const uint32_t vk_to_gen_tex_address[] = {
- [VK_TEX_ADDRESS_WRAP] = TCM_WRAP,
- [VK_TEX_ADDRESS_MIRROR] = TCM_MIRROR,
- [VK_TEX_ADDRESS_CLAMP] = TCM_CLAMP,
- [VK_TEX_ADDRESS_MIRROR_ONCE] = TCM_MIRROR_ONCE,
- [VK_TEX_ADDRESS_CLAMP_BORDER] = TCM_CLAMP_BORDER,
+ [VK_TEX_ADDRESS_MODE_WRAP] = TCM_WRAP,
+ [VK_TEX_ADDRESS_MODE_MIRROR] = TCM_MIRROR,
+ [VK_TEX_ADDRESS_MODE_CLAMP] = TCM_CLAMP,
+ [VK_TEX_ADDRESS_MODE_MIRROR_ONCE] = TCM_MIRROR_ONCE,
+ [VK_TEX_ADDRESS_MODE_CLAMP_BORDER] = TCM_CLAMP_BORDER,
};
static const uint32_t vk_to_gen_compare_op[] = {
.UAddressMagFilterRoundingEnable = 0,
.TrilinearFilterQuality = 0,
.NonnormalizedCoordinateEnable = 0,
- .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressU],
- .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressV],
- .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressW],
+ .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
+ .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
+ .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],
};
GEN8_SAMPLER_STATE_pack(NULL, sampler->state, &sampler_state);