anv/cnl: Generate and use gen10 functions
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 26 May 2017 16:11:20 +0000 (09:11 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 22 Jun 2017 21:17:45 +0000 (14:17 -0700)
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_blorp.c
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py

index a869eebc241ffb47d22af09887a4a7703801ed0c..d28ea9092861ff443482702c0d9eecef6801997c 100644 (file)
@@ -111,6 +111,9 @@ anv_device_init_blorp(struct anv_device *device)
    case 9:
       device->blorp.exec = gen9_blorp_exec;
       break;
+   case 10:
+      device->blorp.exec = gen10_blorp_exec;
+      break;
    default:
       unreachable("Unknown hardware generation");
    }
index 120b864df461b6bc1b7fcbc1dee2553f8200198c..7317674843b37deb2edd60bee17babe348e91bc2 100644 (file)
@@ -335,6 +335,8 @@ anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
       return gen8_cmd_buffer_emit_state_base_address(cmd_buffer);
    case 9:
       return gen9_cmd_buffer_emit_state_base_address(cmd_buffer);
+   case 10:
+      return gen10_cmd_buffer_emit_state_base_address(cmd_buffer);
    default:
       unreachable("unsupported gen\n");
    }
index 2423aa3468f4119dd7ef41b40649769168a4cadc..5505befcfabc95f0aa0d231d5372914cdf210f4a 100644 (file)
@@ -1231,6 +1231,8 @@ VkResult anv_CreateDevice(
       break;
    case 9:
       result = gen9_init_device_state(device);
+   case 10:
+      result = gen10_init_device_state(device);
       break;
    default:
       /* Shouldn't get here as we don't create physical devices for any other
index 2168b7f64f0f3d62ad1db6298af253fc96d66338..f1b4b0c95e14b4bb8bb99f505a0cf1ff2a4d29e5 100644 (file)
@@ -91,6 +91,7 @@ TEMPLATE_H = Template(textwrap.dedent("""\
       ${type_} gen75_${name}(${args});
       ${type_} gen8_${name}(${args});
       ${type_} gen9_${name}(${args});
+      ${type_} gen10_${name}(${args});
       % if guard is not None:
     #endif // ${guard}
       % endif
@@ -152,7 +153,7 @@ TEMPLATE_C = Template(textwrap.dedent(u"""\
      * either pick the correct entry point.
      */
 
-    % for layer in ['anv', 'gen7', 'gen75', 'gen8', 'gen9']:
+    % for layer in ['anv', 'gen7', 'gen75', 'gen8', 'gen9', 'gen10']:
       % for type_, name, args, _, _, guard in entrypoints:
         % if guard is not None:
     #ifdef ${guard}
@@ -184,6 +185,10 @@ TEMPLATE_C = Template(textwrap.dedent(u"""\
        }
 
        switch (devinfo->gen) {
+       case 10:
+          if (gen10_layer.entrypoints[index])
+             return gen10_layer.entrypoints[index];
+          /* fall through */
        case 9:
           if (gen9_layer.entrypoints[index])
              return gen9_layer.entrypoints[index];