radv: enable tessellation shaders.
authorDave Airlie <airlied@redhat.com>
Thu, 30 Mar 2017 07:48:49 +0000 (08:48 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 31 Mar 2017 21:17:25 +0000 (07:17 +1000)
This enables tessellation shaders and sets some values for
the maximums.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c

index 4d685646a621df8a678e76adba6933e7855ca41a..5c48be1d11ad25aa3c20956080d649cae5ad37a9 100644 (file)
@@ -452,7 +452,7 @@ void radv_GetPhysicalDeviceFeatures(
                .imageCubeArray                           = true,
                .independentBlend                         = true,
                .geometryShader                           = true,
-               .tessellationShader                       = false,
+               .tessellationShader                       = true,
                .sampleRateShading                        = false,
                .dualSrcBlend                             = true,
                .logicOp                                  = true,
@@ -565,14 +565,14 @@ void radv_GetPhysicalDeviceProperties(
                .maxVertexInputAttributeOffset            = 2047,
                .maxVertexInputBindingStride              = 2048,
                .maxVertexOutputComponents                = 128,
-               .maxTessellationGenerationLevel           = 0,
-               .maxTessellationPatchSize                 = 0,
-               .maxTessellationControlPerVertexInputComponents = 0,
-               .maxTessellationControlPerVertexOutputComponents = 0,
-               .maxTessellationControlPerPatchOutputComponents = 0,
-               .maxTessellationControlTotalOutputComponents = 0,
-               .maxTessellationEvaluationInputComponents = 0,
-               .maxTessellationEvaluationOutputComponents = 0,
+               .maxTessellationGenerationLevel           = 64,
+               .maxTessellationPatchSize                 = 32,
+               .maxTessellationControlPerVertexInputComponents = 128,
+               .maxTessellationControlPerVertexOutputComponents = 128,
+               .maxTessellationControlPerPatchOutputComponents = 120,
+               .maxTessellationControlTotalOutputComponents = 4096,
+               .maxTessellationEvaluationInputComponents = 128,
+               .maxTessellationEvaluationOutputComponents = 128,
                .maxGeometryShaderInvocations             = 32,
                .maxGeometryInputComponents               = 64,
                .maxGeometryOutputComponents              = 128,
index c2dd498b07819e8899ecd101e2099eb943c42d19..cf11362eade948f761f7078b44a46f06235af678 100644 (file)
@@ -212,6 +212,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                        .float64 = true,
                        .image_read_without_format = true,
                        .image_write_without_format = true,
+                       .tessellation = true,
                };
                entry_point = spirv_to_nir(spirv, module->size / 4,
                                           spec_entries, num_spec_entries,