vk: Further reduce diff to master
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Fri, 4 Sep 2015 18:46:43 +0000 (11:46 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Fri, 4 Sep 2015 23:17:01 +0000 (16:17 -0700)
Now that we don't compile GLSL, we can roll back a few more hacks and
unexport some things from the backend compiler.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_extensions.c
src/vulkan/anv_compiler.cpp

index 020df05b2a8c2efd11edce853ffc0a9ac8a2b5ae..907b2a07353fbc5428df026ef876944638698706 100644 (file)
@@ -311,7 +311,7 @@ brw_init_driver_functions(struct brw_context *brw,
       functions->GetSamplePosition = gen6_get_sample_position;
 }
 
-void
+static void
 brw_initialize_context_constants(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
@@ -390,8 +390,7 @@ brw_initialize_context_constants(struct brw_context *brw)
    int max_samples;
    const int *msaa_modes = intel_supported_msaa_modes(brw->intelScreen);
    const int clamp_max_samples =
-      brw->optionCache.info != NULL ?
-         driQueryOptioni(&brw->optionCache, "clamp_max_samples") : -1;
+      driQueryOptioni(&brw->optionCache, "clamp_max_samples");
 
    if (clamp_max_samples < 0) {
       max_samples = msaa_modes[0];
index 54813c51d50da01f8329eb786ec2119c9e4c8f84..49ff428b13a2eb1cc47a0c6bd53baf427e9b6fc1 100644 (file)
@@ -2075,9 +2075,6 @@ gen6_upload_push_constants(struct brw_context *brw,
                            struct brw_stage_state *stage_state,
                            enum aub_state_struct_type type);
 
-void
-brw_initialize_context_constants(struct brw_context *brw);
-
 bool
 gen9_use_linear_1d_layout(const struct brw_context *brw,
                           const struct intel_mipmap_tree *mt);
index 1a246d3ea3aa37a9941aebc81c235e37769c2eec..4365b719801d998cb9bef4db564beca0728bdbf8 100644 (file)
@@ -275,17 +275,14 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.EXT_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
       ctx->Extensions.EXT_timer_query = true;
 
-      if (brw->bufmgr) {
-         if (brw->gen == 5 || can_write_oacontrol(brw)) {
-            ctx->Extensions.AMD_performance_monitor = true;
-            ctx->Extensions.INTEL_performance_query = true;
-         }
+      if (brw->gen == 5 || can_write_oacontrol(brw)) {
+         ctx->Extensions.AMD_performance_monitor = true;
+         ctx->Extensions.INTEL_performance_query = true;
       }
    }
 
    if (brw->gen >= 6) {
       ctx->Extensions.ARB_blend_func_extended =
-         brw->optionCache.info == NULL ||
          !driQueryOptionb(&brw->optionCache, "disable_blend_func_extended");
       ctx->Extensions.ARB_conditional_render_inverted = true;
       ctx->Extensions.ARB_draw_buffers_blend = true;
@@ -308,9 +305,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.EXT_transform_feedback = true;
       ctx->Extensions.OES_depth_texture_cube_map = true;
 
-      /* Test if the kernel has the ioctl. */
-      if (brw->intelScreen->hw_has_timestamp)
-         ctx->Extensions.ARB_timer_query = true;
+      ctx->Extensions.ARB_timer_query = brw->intelScreen->hw_has_timestamp;
 
       /* Only enable this in core profile because other parts of Mesa behave
        * slightly differently when the extension is enabled.
@@ -335,8 +330,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_texture_compression_bptc = true;
       ctx->Extensions.ARB_texture_view = true;
 
-      if (brw->bufmgr &&
-          can_do_pipelined_register_writes(brw)) {
+      if (can_do_pipelined_register_writes(brw)) {
          ctx->Extensions.ARB_draw_indirect = true;
          ctx->Extensions.ARB_transform_feedback2 = true;
          ctx->Extensions.ARB_transform_feedback3 = true;
@@ -365,9 +359,7 @@ intelInitExtensions(struct gl_context *ctx)
    if (ctx->API != API_OPENGL_CORE)
       ctx->Extensions.ARB_color_buffer_float = true;
 
-   if (ctx->Mesa_DXTn ||
-       (brw->optionCache.info != NULL &&
-        driQueryOptionb(&brw->optionCache, "force_s3tc_enable")))
+   if (ctx->Mesa_DXTn || driQueryOptionb(&brw->optionCache, "force_s3tc_enable"))
       ctx->Extensions.EXT_texture_compression_s3tc = true;
 
    ctx->Extensions.ANGLE_texture_compression_dxt = true;
index ab6d64897a5e52d4221cf40b7f531815c6e2a9c6..5f189c7ce8e4f1a99c69966cffdf9e5478772060 100644 (file)
@@ -676,8 +676,6 @@ anv_compiler_create(struct anv_device *device)
 
    compiler->device = device;
 
-   compiler->brw->optionCache.info = NULL;
-   compiler->brw->bufmgr = NULL;
    compiler->brw->gen = devinfo->gen;
    compiler->brw->is_g4x = devinfo->is_g4x;
    compiler->brw->is_baytrail = devinfo->is_baytrail;
@@ -709,15 +707,9 @@ anv_compiler_create(struct anv_device *device)
    ctx = &compiler->brw->ctx;
    _mesa_init_shader_object_functions(&ctx->Driver);
 
-   _mesa_init_constants(&ctx->Const, API_OPENGL_CORE);
-
-   /* Set dd::NewShader */
-   brwInitFragProgFuncs(&ctx->Driver);
-
+   /* brw_select_clip_planes() needs this for bogus reasons. */
    ctx->_Shader = &compiler->pipeline;
 
-   compiler->brw->precompile = false;
-
    return compiler;
 
  fail: