mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 13:50:09 +01:00
kk: Add multiViewport and EXT_shader_viewport_index_layer support
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38518>
This commit is contained in:
parent
15f170e369
commit
abc719f01f
4 changed files with 15 additions and 3 deletions
|
|
@ -487,7 +487,7 @@ Vulkan 1.2 -- all DONE: anv, hk, nvk, panvk/v10+, pvr, tu, vn
|
|||
VK_EXT_sampler_filter_minmax DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn)
|
||||
VK_EXT_scalar_block_layout DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, vn, v3dv/vc7+)
|
||||
VK_EXT_separate_stencil_usage DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_EXT_shader_viewport_index_layer DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
|
||||
VK_EXT_shader_viewport_index_layer DONE (anv, hasvk, kk, lvp, nvk, radv, tu, vn)
|
||||
|
||||
Vulkan 1.3 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv, tu, vn, v3dv
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ static const char *VARYING_SLOT_NAME[NUM_TOTAL_VARYING_SLOTS] = {
|
|||
[VARYING_SLOT_PSIZ] = "point_size",
|
||||
[VARYING_SLOT_PRIMITIVE_ID] = "primitive_id",
|
||||
[VARYING_SLOT_LAYER] = "layer",
|
||||
[VARYING_SLOT_VIEWPORT] = "viewport_index",
|
||||
[VARYING_SLOT_VAR0] = "vary_00",
|
||||
[VARYING_SLOT_VAR1] = "vary_01",
|
||||
[VARYING_SLOT_VAR2] = "vary_02",
|
||||
|
|
@ -101,6 +102,7 @@ static const char *VARYING_SLOT_SEMANTIC[NUM_TOTAL_VARYING_SLOTS] = {
|
|||
[VARYING_SLOT_PSIZ] = "[[point_size]]",
|
||||
[VARYING_SLOT_PRIMITIVE_ID] = "[[primitive_id]]",
|
||||
[VARYING_SLOT_LAYER] = "[[render_target_array_index]]",
|
||||
[VARYING_SLOT_VIEWPORT] = "[[viewport_array_index]]",
|
||||
[VARYING_SLOT_VAR0] = "[[user(vary_00)]]",
|
||||
[VARYING_SLOT_VAR1] = "[[user(vary_01)]]",
|
||||
[VARYING_SLOT_VAR2] = "[[user(vary_02)]]",
|
||||
|
|
|
|||
|
|
@ -217,6 +217,14 @@ msl_ensure_vertex_position_output(nir_shader *nir)
|
|||
static bool
|
||||
msl_fs_io_types(nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
||||
{
|
||||
if (intr->intrinsic == nir_intrinsic_load_input) {
|
||||
struct nir_io_semantics io = nir_intrinsic_io_semantics(intr);
|
||||
if (io.location == VARYING_SLOT_VIEWPORT) {
|
||||
nir_intrinsic_set_dest_type(intr, nir_type_uint32);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (intr->intrinsic == nir_intrinsic_store_output) {
|
||||
struct nir_io_semantics io = nir_intrinsic_io_semantics(intr);
|
||||
if (io.location == FRAG_RESULT_SAMPLE_MASK) {
|
||||
|
|
@ -256,7 +264,8 @@ msl_vs_io_types(nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
|||
{
|
||||
if (intr->intrinsic == nir_intrinsic_store_output) {
|
||||
struct nir_io_semantics io = nir_intrinsic_io_semantics(intr);
|
||||
if (io.location == VARYING_SLOT_LAYER) {
|
||||
if (io.location == VARYING_SLOT_LAYER ||
|
||||
io.location == VARYING_SLOT_VIEWPORT) {
|
||||
nir_intrinsic_set_src_type(intr, nir_type_uint32);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ kk_get_device_extensions(const struct kk_instance *instance,
|
|||
.EXT_sampler_filter_minmax = false,
|
||||
.EXT_scalar_block_layout = true,
|
||||
.EXT_separate_stencil_usage = true,
|
||||
.EXT_shader_viewport_index_layer = false,
|
||||
.EXT_shader_viewport_index_layer = true,
|
||||
|
||||
/* Vulkan 1.3 */
|
||||
.KHR_copy_commands2 = true,
|
||||
|
|
@ -161,6 +161,7 @@ kk_get_device_features(
|
|||
.imageCubeArray = true,
|
||||
.independentBlend = true,
|
||||
.logicOp = true,
|
||||
.multiViewport = true,
|
||||
.robustBufferAccess = true,
|
||||
.samplerAnisotropy = true,
|
||||
.shaderInt16 = true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue