i965: Move hardware feature flags to brw_device_info.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 26 Sep 2013 18:55:36 +0000 (11:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 13 Oct 2013 07:10:44 +0000 (00:10 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_device_info.c
src/mesa/drivers/dri/i965/brw_device_info.h

index f60da501878b8bfe1ab031cc364803cf39a70843..04045a584a572b591815e63dddd18d968b9f533c 100644 (file)
@@ -366,6 +366,9 @@ brwCreateContext(gl_api api,
    brw->has_llc = devinfo->has_llc;
    brw->has_hiz = devinfo->has_hiz_and_separate_stencil;
    brw->has_separate_stencil = devinfo->has_hiz_and_separate_stencil;
+   brw->has_pln = devinfo->has_pln;
+   brw->has_compr4 = devinfo->has_compr4;
+   brw->has_surface_tile_offset = devinfo->has_surface_tile_offset;
    brw->has_negative_rhw_bug = devinfo->has_negative_rhw_bug;
    brw->needs_unlit_centroid_workaround =
       devinfo->needs_unlit_centroid_workaround;
@@ -437,11 +440,7 @@ brwCreateContext(gl_api api,
    if (brw->is_g4x || brw->gen >= 5) {
       brw->CMD_VF_STATISTICS = GM45_3DSTATE_VF_STATISTICS;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
-      brw->has_surface_tile_offset = true;
-      if (brw->gen < 6)
-         brw->has_compr4 = true;
       brw->has_aa_line_parameters = true;
-      brw->has_pln = true;
   } else {
       brw->CMD_VF_STATISTICS = GEN4_3DSTATE_VF_STATISTICS;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_965;
index a215917d4b3dd3997b99d1baf7ddc8634246f4b4..b4723560fa00cec4b9a97711ebe39a8f877ef17e 100644 (file)
@@ -39,6 +39,8 @@ static const struct brw_device_info brw_device_info_i965 = {
 
 static const struct brw_device_info brw_device_info_g4x = {
    .gen = 4,
+   .has_pln = true,
+   .has_compr4 = true,
    .needs_unlit_centroid_workaround = true,
    .is_g4x = true,
    .max_vs_threads = 32,
@@ -51,6 +53,9 @@ static const struct brw_device_info brw_device_info_g4x = {
 
 static const struct brw_device_info brw_device_info_ilk = {
    .gen = 5,
+   .has_pln = true,
+   .has_compr4 = true,
+   .has_surface_tile_offset = true,
    .needs_unlit_centroid_workaround = true,
    .max_vs_threads = 72,
    .max_gs_threads = 32,
@@ -65,6 +70,8 @@ static const struct brw_device_info brw_device_info_snb_gt1 = {
    .gt = 2,
    .has_hiz_and_separate_stencil = true,
    .has_llc = true,
+   .has_pln = true,
+   .has_surface_tile_offset = true,
    .needs_unlit_centroid_workaround = true,
    .max_vs_threads = 24,
    .max_gs_threads = 21, /* conservative; 24 if rendering disabled. */
@@ -82,6 +89,8 @@ static const struct brw_device_info brw_device_info_snb_gt2 = {
    .gt = 2,
    .has_hiz_and_separate_stencil = true,
    .has_llc = true,
+   .has_pln = true,
+   .has_surface_tile_offset = true,
    .needs_unlit_centroid_workaround = true,
    .max_vs_threads = 60,
    .max_gs_threads = 60,
@@ -99,6 +108,8 @@ static const struct brw_device_info brw_device_info_snb_gt2 = {
    .has_hiz_and_separate_stencil = true,            \
    .must_use_separate_stencil = true,               \
    .has_llc = true,                                 \
+   .has_pln = true,                                 \
+   .has_surface_tile_offset = true,                 \
    .needs_unlit_centroid_workaround = true
 
 static const struct brw_device_info brw_device_info_ivb_gt1 = {
index 39f4d5733e360562380cceeda8971b0ed103999b..66ec9359bc7c07065eebd092112d1242b9b1366e 100644 (file)
@@ -40,6 +40,10 @@ struct brw_device_info
 
    bool has_llc;
 
+   bool has_pln;
+   bool has_compr4;
+   bool has_surface_tile_offset;
+
    /**
     * Quirks:
     *  @{