aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-09-20 13:16:26 -0700
committerJason Ekstrand <[email protected]>2018-03-07 12:13:47 -0800
commitbd1279bd9fc9b7d9b4a2f74e096d771dde80f01b (patch)
tree1fc179c92dbc661a0efee018d162e7b22335cdeb /src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
parentaf461986dba36e6ac625764290312b7cbbd8f4a8 (diff)
Get rid of a bunch of KHR suffixes
Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_nir_lower_ycbcr_textures.c')
-rw-r--r--src/intel/vulkan/anv_nir_lower_ycbcr_textures.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
index ad793ee0a0c..ebf1fd9c267 100644
--- a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
+++ b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
@@ -40,9 +40,9 @@ y_range(nir_builder *b,
VkSamplerYcbcrRangeKHR range)
{
switch (range) {
- case VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR:
+ case VK_SAMPLER_YCBCR_RANGE_ITU_FULL:
return y_channel;
- case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR:
+ case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW:
return nir_fmul(b,
nir_fadd(b,
nir_fmul(b, y_channel,
@@ -62,10 +62,10 @@ chroma_range(nir_builder *b,
VkSamplerYcbcrRangeKHR range)
{
switch (range) {
- case VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR:
+ case VK_SAMPLER_YCBCR_RANGE_ITU_FULL:
return nir_fadd(b, chroma_channel,
nir_imm_float(b, -pow(2, bpc - 1) / (pow(2, bpc) - 1.0f)));
- case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR:
+ case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW:
return nir_fmul(b,
nir_fadd(b,
nir_fmul(b, chroma_channel,
@@ -82,7 +82,7 @@ static const nir_const_value *
ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model)
{
switch (model) {
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR: {
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601: {
static const nir_const_value bt601[3] = {
{ .f32 = { 1.402f, 1.0f, 0.0f, 0.0f } },
{ .f32 = { -0.714136286201022f, 1.0f, -0.344136286201022f, 0.0f } },
@@ -91,7 +91,7 @@ ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model)
return bt601;
}
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR: {
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709: {
static const nir_const_value bt709[3] = {
{ .f32 = { 1.5748031496063f, 1.0f, 0.0, 0.0f } },
{ .f32 = { -0.468125209181067f, 1.0f, -0.187327487470334f, 0.0f } },
@@ -100,7 +100,7 @@ ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model)
return bt709;
}
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR: {
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020: {
static const nir_const_value bt2020[3] = {
{ .f32 = { 1.4746f, 1.0f, 0.0f, 0.0f } },
{ .f32 = { -0.571353126843658f, 1.0f, -0.164553126843658f, 0.0f } },
@@ -133,7 +133,7 @@ convert_ycbcr(struct ycbcr_state *state,
bpcs[2], conversion->ycbcr_range),
nir_imm_float(b, 1.0f));
- if (conversion->ycbcr_model == VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR)
+ if (conversion->ycbcr_model == VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY)
return expanded_channels;
const nir_const_value *conversion_matrix =
@@ -206,7 +206,7 @@ implicit_downsampled_coords(struct ycbcr_state *state,
for (c = 0; c < ARRAY_SIZE(conversion->chroma_offsets); c++) {
if (plane_format->denominator_scales[c] > 1 &&
- conversion->chroma_offsets[c] == VK_CHROMA_LOCATION_COSITED_EVEN_KHR) {
+ conversion->chroma_offsets[c] == VK_CHROMA_LOCATION_COSITED_EVEN) {
comp[c] = implicit_downsampled_coord(b,
nir_channel(b, old_coords, c),
nir_channel(b, image_size, c),
@@ -430,7 +430,7 @@ try_lower_tex_ycbcr(struct anv_pipeline_layout *layout,
}
nir_ssa_def *result = nir_vec(builder, swizzled_comp, 4);
- if (state.conversion->ycbcr_model != VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR)
+ if (state.conversion->ycbcr_model != VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY)
result = convert_ycbcr(&state, result, swizzled_bpcs);
nir_ssa_def_rewrite_uses(&tex->dest.ssa, nir_src_for_ssa(result));