i965: rename max_hs_* variables to max_tcs_*
authorTimothy Arceri <timothy.arceri@collabora.com>
Sun, 2 Oct 2016 23:39:28 +0000 (10:39 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Mon, 3 Oct 2016 04:29:51 +0000 (15:29 +1100)
Using consistent naming allows us to create macros more easily.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/common/gen_device_info.c
src/intel/common/gen_device_info.h
src/intel/vulkan/anv_allocator.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/gen7_hs_state.c
src/mesa/drivers/dri/i965/gen7_urb.c
src/mesa/drivers/dri/i965/gen8_hs_state.c

index 615605c18baaf357b7bafcbb4353b99aac07e764..b12bfad6ea3bafc4130c2cabd1dfee79f333d6ef 100644 (file)
@@ -118,7 +118,7 @@ static const struct gen_device_info gen_device_info_ivb_gt1 = {
    GEN7_FEATURES, .is_ivybridge = true, .gt = 1,
    .num_slices = 1,
    .max_vs_threads = 36,
-   .max_hs_threads = 36,
+   .max_tcs_threads = 36,
    .max_ds_threads = 36,
    .max_gs_threads = 36,
    .max_wm_threads = 48,
@@ -127,7 +127,7 @@ static const struct gen_device_info gen_device_info_ivb_gt1 = {
       .size = 128,
       .min_vs_entries = 32,
       .max_vs_entries = 512,
-      .max_hs_entries = 32,
+      .max_tcs_entries = 32,
       .min_ds_entries = 10,
       .max_ds_entries = 288,
       .max_gs_entries = 192,
@@ -138,7 +138,7 @@ static const struct gen_device_info gen_device_info_ivb_gt2 = {
    GEN7_FEATURES, .is_ivybridge = true, .gt = 2,
    .num_slices = 1,
    .max_vs_threads = 128,
-   .max_hs_threads = 128,
+   .max_tcs_threads = 128,
    .max_ds_threads = 128,
    .max_gs_threads = 128,
    .max_wm_threads = 172,
@@ -147,7 +147,7 @@ static const struct gen_device_info gen_device_info_ivb_gt2 = {
       .size = 256,
       .min_vs_entries = 32,
       .max_vs_entries = 704,
-      .max_hs_entries = 64,
+      .max_tcs_entries = 64,
       .min_ds_entries = 10,
       .max_ds_entries = 448,
       .max_gs_entries = 320,
@@ -159,7 +159,7 @@ static const struct gen_device_info gen_device_info_byt = {
    .num_slices = 1,
    .has_llc = false,
    .max_vs_threads = 36,
-   .max_hs_threads = 36,
+   .max_tcs_threads = 36,
    .max_ds_threads = 36,
    .max_gs_threads = 36,
    .max_wm_threads = 48,
@@ -168,7 +168,7 @@ static const struct gen_device_info gen_device_info_byt = {
       .size = 128,
       .min_vs_entries = 32,
       .max_vs_entries = 512,
-      .max_hs_entries = 32,
+      .max_tcs_entries = 32,
       .min_ds_entries = 10,
       .max_ds_entries = 288,
       .max_gs_entries = 192,
@@ -185,7 +185,7 @@ static const struct gen_device_info gen_device_info_hsw_gt1 = {
    HSW_FEATURES, .gt = 1,
    .num_slices = 1,
    .max_vs_threads = 70,
-   .max_hs_threads = 70,
+   .max_tcs_threads = 70,
    .max_ds_threads = 70,
    .max_gs_threads = 70,
    .max_wm_threads = 102,
@@ -194,7 +194,7 @@ static const struct gen_device_info gen_device_info_hsw_gt1 = {
       .size = 128,
       .min_vs_entries = 32,
       .max_vs_entries = 640,
-      .max_hs_entries = 64,
+      .max_tcs_entries = 64,
       .min_ds_entries = 10,
       .max_ds_entries = 384,
       .max_gs_entries = 256,
@@ -205,7 +205,7 @@ static const struct gen_device_info gen_device_info_hsw_gt2 = {
    HSW_FEATURES, .gt = 2,
    .num_slices = 1,
    .max_vs_threads = 280,
-   .max_hs_threads = 256,
+   .max_tcs_threads = 256,
    .max_ds_threads = 280,
    .max_gs_threads = 256,
    .max_wm_threads = 204,
@@ -214,7 +214,7 @@ static const struct gen_device_info gen_device_info_hsw_gt2 = {
       .size = 256,
       .min_vs_entries = 64,
       .max_vs_entries = 1664,
-      .max_hs_entries = 128,
+      .max_tcs_entries = 128,
       .min_ds_entries = 10,
       .max_ds_entries = 960,
       .max_gs_entries = 640,
@@ -225,7 +225,7 @@ static const struct gen_device_info gen_device_info_hsw_gt3 = {
    HSW_FEATURES, .gt = 3,
    .num_slices = 2,
    .max_vs_threads = 280,
-   .max_hs_threads = 256,
+   .max_tcs_threads = 256,
    .max_ds_threads = 280,
    .max_gs_threads = 256,
    .max_wm_threads = 408,
@@ -234,7 +234,7 @@ static const struct gen_device_info gen_device_info_hsw_gt3 = {
       .size = 512,
       .min_vs_entries = 64,
       .max_vs_entries = 1664,
-      .max_hs_entries = 128,
+      .max_tcs_entries = 128,
       .min_ds_entries = 10,
       .max_ds_entries = 960,
       .max_gs_entries = 640,
@@ -251,7 +251,7 @@ static const struct gen_device_info gen_device_info_hsw_gt3 = {
    .supports_simd16_3src = true,                    \
    .has_surface_tile_offset = true,                 \
    .max_vs_threads = 504,                           \
-   .max_hs_threads = 504,                           \
+   .max_tcs_threads = 504,                          \
    .max_ds_threads = 504,                           \
    .max_gs_threads = 504,                           \
    .max_wm_threads = 384
@@ -264,7 +264,7 @@ static const struct gen_device_info gen_device_info_bdw_gt1 = {
       .size = 192,
       .min_vs_entries = 64,
       .max_vs_entries = 2560,
-      .max_hs_entries = 504,
+      .max_tcs_entries = 504,
       .min_ds_entries = 34,
       .max_ds_entries = 1536,
       .max_gs_entries = 960,
@@ -279,7 +279,7 @@ static const struct gen_device_info gen_device_info_bdw_gt2 = {
       .size = 384,
       .min_vs_entries = 64,
       .max_vs_entries = 2560,
-      .max_hs_entries = 504,
+      .max_tcs_entries = 504,
       .min_ds_entries = 34,
       .max_ds_entries = 1536,
       .max_gs_entries = 960,
@@ -294,7 +294,7 @@ static const struct gen_device_info gen_device_info_bdw_gt3 = {
       .size = 384,
       .min_vs_entries = 64,
       .max_vs_entries = 2560,
-      .max_hs_entries = 504,
+      .max_tcs_entries = 504,
       .min_ds_entries = 34,
       .max_ds_entries = 1536,
       .max_gs_entries = 960,
@@ -306,7 +306,7 @@ static const struct gen_device_info gen_device_info_chv = {
    .has_llc = false,
    .num_slices = 1,
    .max_vs_threads = 80,
-   .max_hs_threads = 80,
+   .max_tcs_threads = 80,
    .max_ds_threads = 80,
    .max_gs_threads = 80,
    .max_wm_threads = 128,
@@ -315,7 +315,7 @@ static const struct gen_device_info gen_device_info_chv = {
       .size = 192,
       .min_vs_entries = 34,
       .max_vs_entries = 640,
-      .max_hs_entries = 80,
+      .max_tcs_entries = 80,
       .min_ds_entries = 34,
       .max_ds_entries = 384,
       .max_gs_entries = 256,
@@ -333,7 +333,7 @@ static const struct gen_device_info gen_device_info_chv = {
    .has_surface_tile_offset = true,                 \
    .max_vs_threads = 336,                           \
    .max_gs_threads = 336,                           \
-   .max_hs_threads = 336,                           \
+   .max_tcs_threads = 336,                          \
    .max_ds_threads = 336,                           \
    .max_wm_threads = 64 * 9,                        \
    .max_cs_threads = 56,                            \
@@ -341,7 +341,7 @@ static const struct gen_device_info gen_device_info_chv = {
       .size = 384,                                  \
       .min_vs_entries = 64,                         \
       .max_vs_entries = 1856,                       \
-      .max_hs_entries = 672,                        \
+      .max_tcs_entries = 672,                       \
       .min_ds_entries = 34,                         \
       .max_ds_entries = 1120,                       \
       .max_gs_entries = 640,                        \
@@ -385,7 +385,7 @@ static const struct gen_device_info gen_device_info_bxt = {
 
    .num_slices = 1,
    .max_vs_threads = 112,
-   .max_hs_threads = 112,
+   .max_tcs_threads = 112,
    .max_ds_threads = 112,
    .max_gs_threads = 112,
    .max_wm_threads = 64 * 3,
@@ -394,7 +394,7 @@ static const struct gen_device_info gen_device_info_bxt = {
       .size = 192,
       .min_vs_entries = 34,
       .max_vs_entries = 704,
-      .max_hs_entries = 256,
+      .max_tcs_entries = 256,
       .max_ds_entries = 416,
       .max_gs_entries = 256,
    }
@@ -408,7 +408,7 @@ static const struct gen_device_info gen_device_info_bxt_2x6 = {
 
    .num_slices = 1,
    .max_vs_threads = 56, /* XXX: guess */
-   .max_hs_threads = 56, /* XXX: guess */
+   .max_tcs_threads = 56, /* XXX: guess */
    .max_ds_threads = 56,
    .max_gs_threads = 56,
    .max_wm_threads = 64 * 2,
@@ -417,7 +417,7 @@ static const struct gen_device_info gen_device_info_bxt_2x6 = {
       .size = 128,
       .min_vs_entries = 34,
       .max_vs_entries = 352,
-      .max_hs_entries = 128,
+      .max_tcs_entries = 128,
       .max_ds_entries = 208,
       .max_gs_entries = 128,
    }
index 8b68a011ea4933d38a726c7f1d8d701c45df4f41..40258d4239f1d55eaf4fc2389eece9cc8dcaa389 100644 (file)
@@ -94,7 +94,7 @@ struct gen_device_info
     */
    unsigned num_slices;
    unsigned max_vs_threads;   /**< Maximum Vertex Shader threads */
-   unsigned max_hs_threads;   /**< Maximum Hull Shader threads */
+   unsigned max_tcs_threads;  /**< Maximum Hull Shader threads */
    unsigned max_ds_threads;   /**< Maximum Domain Shader threads */
    unsigned max_gs_threads;   /**< Maximum Geometry Shader threads. */
    /**
@@ -135,7 +135,7 @@ struct gen_device_info
       unsigned size;
       unsigned min_vs_entries;
       unsigned max_vs_entries;
-      unsigned max_hs_entries;
+      unsigned max_tcs_entries;
       unsigned min_ds_entries;
       unsigned max_ds_entries;
       unsigned max_gs_entries;
index 83a701e0b0d17543141231f33c3f8b9e3c7cbfac..65fd38b1a0461cdf770e414abe9a273bb7d4ee93 100644 (file)
@@ -949,7 +949,7 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
 
       uint32_t max_threads[] = {
          [MESA_SHADER_VERTEX]           = devinfo->max_vs_threads,
-         [MESA_SHADER_TESS_CTRL]        = devinfo->max_hs_threads,
+         [MESA_SHADER_TESS_CTRL]        = devinfo->max_tcs_threads,
          [MESA_SHADER_TESS_EVAL]        = devinfo->max_ds_threads,
          [MESA_SHADER_GEOMETRY]         = devinfo->max_gs_threads,
          [MESA_SHADER_FRAGMENT]         = devinfo->max_wm_threads,
index d62ad662b498c4ef3c5df4b6fba0cb0d8d20067e..1f1b1a575d2c71a6e4f9601d1586440ac68ebb9c 100644 (file)
@@ -298,7 +298,7 @@ brw_codegen_tcs_prog(struct brw_context *brw,
    /* Scratch space is used for register spilling */
    brw_alloc_stage_scratch(brw, stage_state,
                            prog_data.base.base.total_scratch,
-                           devinfo->max_hs_threads);
+                           devinfo->max_tcs_threads);
 
    brw_upload_cache(&brw->cache, BRW_CACHE_TCS_PROG,
                     key, sizeof(*key),
index 759655b1966c0cc01603fa5f68fcbacb17f58ad6..932bfb1416948fb27f9eff5f02ea456d111fc2dd 100644 (file)
@@ -78,7 +78,7 @@ gen7_upload_hs_state(struct brw_context *brw)
                           GEN7_HS_SAMPLER_COUNT) |
                 SET_FIELD(prog_data->base.binding_table.size_bytes / 4,
                           GEN7_HS_BINDING_TABLE_ENTRY_COUNT) |
-                (devinfo->max_hs_threads - 1));
+                (devinfo->max_tcs_threads - 1));
       OUT_BATCH(GEN7_HS_ENABLE |
                 GEN7_HS_STATISTICS_ENABLE |
                 SET_FIELD(brw->tcs.prog_data->instances - 1,
index 7eb587ca67140f9d9160192d22abc31e65bde955..fb87a94caa3f17ac22d215d3807a11fa697bb20c 100644 (file)
@@ -313,7 +313,7 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
          DIV_ROUND_UP(hs_granularity * hs_entry_size_bytes,
                       chunk_size_bytes);
       hs_wants =
-         DIV_ROUND_UP(devinfo->urb.max_hs_entries * hs_entry_size_bytes,
+         DIV_ROUND_UP(devinfo->urb.max_tcs_entries * hs_entry_size_bytes,
                       chunk_size_bytes) - hs_chunks;
 
       ds_chunks =
@@ -378,7 +378,7 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
     * than the maximum allowed amount, so correct for that.
     */
    nr_vs_entries = MIN2(nr_vs_entries, devinfo->urb.max_vs_entries);
-   nr_hs_entries = MIN2(nr_hs_entries, devinfo->urb.max_hs_entries);
+   nr_hs_entries = MIN2(nr_hs_entries, devinfo->urb.max_tcs_entries);
    nr_ds_entries = MIN2(nr_ds_entries, devinfo->urb.max_ds_entries);
    nr_gs_entries = MIN2(nr_gs_entries, devinfo->urb.max_gs_entries);
 
index 7b9f6341e6c142644f20fd232c05a309d3ff6e89..14af89aaf324a00d723b7af0593a66f2ccbebfee 100644 (file)
@@ -45,7 +45,7 @@ gen8_upload_hs_state(struct brw_context *brw)
                           GEN7_HS_BINDING_TABLE_ENTRY_COUNT));
       OUT_BATCH(GEN7_HS_ENABLE |
                 GEN7_HS_STATISTICS_ENABLE |
-                (devinfo->max_hs_threads - 1) << GEN8_HS_MAX_THREADS_SHIFT |
+                (devinfo->max_tcs_threads - 1) << GEN8_HS_MAX_THREADS_SHIFT |
                 SET_FIELD(brw->tcs.prog_data->instances - 1,
                           GEN7_HS_INSTANCE_COUNT));
       OUT_BATCH(stage_state->prog_offset);