mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-20 03:20:33 +01:00
kk: enable shaderDrawParameters
Currently draw_id is always 0 since we don't support multidraw yet. Reviewed-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
This commit is contained in:
parent
8c9e9555e8
commit
d3424de889
4 changed files with 10 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ static const char *sysval_table[SYSTEM_VALUE_MAX] = {
|
|||
[SYSTEM_VALUE_SAMPLE_MASK_IN] = "uint gl_SampleMask [[sample_mask]]",
|
||||
[SYSTEM_VALUE_AMPLIFICATION_ID_KK] =
|
||||
"uint mtl_AmplificationID [[amplification_id]]",
|
||||
[SYSTEM_VALUE_FIRST_VERTEX] = "uint gl_FirstVertex [[base_vertex]]",
|
||||
/* These are functions and not shader input variables */
|
||||
[SYSTEM_VALUE_HELPER_INVOCATION] = "",
|
||||
};
|
||||
|
|
@ -950,6 +951,9 @@ intrinsic_to_msl(struct nir_to_msl_ctx *ctx, nir_intrinsic_instr *instr)
|
|||
case nir_intrinsic_load_point_coord:
|
||||
P(ctx, "gl_PointCoord;\n");
|
||||
break;
|
||||
case nir_intrinsic_load_first_vertex:
|
||||
P(ctx, "gl_FirstVertex;\n");
|
||||
break;
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
P(ctx, "gl_VertexID;\n");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct kk_root_descriptor_table {
|
|||
uint64_t attrib_base[KK_MAX_ATTRIBS];
|
||||
uint32_t attrib_clamps[KK_MAX_ATTRIBS];
|
||||
float blend_constant[4];
|
||||
uint32_t draw_id;
|
||||
} draw;
|
||||
struct {
|
||||
uint32_t base_group[3];
|
||||
|
|
|
|||
|
|
@ -409,6 +409,9 @@ try_lower_intrin(nir_builder *b, nir_intrinsic_instr *intrin,
|
|||
case nir_intrinsic_load_push_constant:
|
||||
return lower_load_push_constant(b, intrin, ctx);
|
||||
|
||||
case nir_intrinsic_load_draw_id:
|
||||
return lower_sysval_to_root_table(b, intrin, draw.draw_id);
|
||||
|
||||
case nir_intrinsic_image_deref_load:
|
||||
case nir_intrinsic_image_deref_sparse_load:
|
||||
case nir_intrinsic_image_deref_store:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ kk_get_device_extensions(const struct kk_instance *instance,
|
|||
.KHR_multiview = true,
|
||||
.KHR_relaxed_block_layout = true,
|
||||
.KHR_sampler_ycbcr_conversion = true,
|
||||
.KHR_shader_draw_parameters = false,
|
||||
.KHR_shader_draw_parameters = true,
|
||||
.KHR_storage_buffer_storage_class = true,
|
||||
.KHR_variable_pointers = true,
|
||||
|
||||
|
|
@ -174,6 +174,7 @@ kk_get_device_features(
|
|||
|
||||
/* Vulkan 1.1 */
|
||||
.multiview = true,
|
||||
.shaderDrawParameters = true,
|
||||
.storageBuffer16BitAccess = true,
|
||||
.storageInputOutput16 = false,
|
||||
.storagePushConstant16 = true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue