KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage,Fail
KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2,Crash
-dEQP-GLES31.functional.texture.border_clamp.range_clamp.linear_srgb_color,Fail
-dEQP-GLES31.functional.texture.border_clamp.range_clamp.nearest_srgb_color,Fail
# Turnip has maxFragmentInputComponents = 124, while GL requires
# gl_MaxFragmentInputComponents >= 128
memcpy(&cbci.customBorderColor, &state->border_color, sizeof(union pipe_color_union));
} else {
cbci.format = zink_get_format(screen, state->border_color_format);
- for (unsigned i = 0; i < 4; i++)
+ for (unsigned i = 0; i < 4; i++) {
zink_format_clamp_channel_color(util_format_description(state->border_color_format), (void*)&cbci.customBorderColor, &state->border_color, i);
+ zink_format_clamp_channel_srgb(util_format_description(state->border_color_format), (void*)&cbci.customBorderColor, (void*)&cbci.customBorderColor, i);
+ }
}
}
cbci.pNext = sci.pNext;
break;
}
}
+
+void
+zink_format_clamp_channel_srgb(const struct util_format_description *desc, union pipe_color_union *dst, const union pipe_color_union *src, unsigned i)
+{
+ if (desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB)
+ return;
+ switch (desc->channel[i].type) {
+ case UTIL_FORMAT_TYPE_SIGNED:
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ dst->f[i] = CLAMP(src->f[i], 0.0, 1.0);
+ break;
+ default:
+ break;
+ }
+}
zink_format_get_emulated_alpha(enum pipe_format format);
void
zink_format_clamp_channel_color(const struct util_format_description *desc, union pipe_color_union *dst, const union pipe_color_union *src, unsigned i);
+void
+zink_format_clamp_channel_srgb(const struct util_format_description *desc, union pipe_color_union *dst, const union pipe_color_union *src, unsigned i);
#endif