vk: Remove various hacks/scaffolding code
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 3 Sep 2015 19:04:03 +0000 (12:04 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 3 Sep 2015 19:17:13 +0000 (12:17 -0700)
Since we switched away from calling brwCreateContext() there's a bit of
hacky support we can now delete.  This reduces our diff to upstream master.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
configure.ac
src/mesa/drivers/dri/common/dri_test.c
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_state_cache.c
src/mesa/drivers/dri/i965/intel_debug.c
src/mesa/drivers/dri/i965/intel_screen.c

index 5828885e92af9dc0a9f2a92a8bfe18323de5ae4b..e8919caa74b8a77736cd25a156a59a93cde4de6c 100644 (file)
@@ -1162,10 +1162,6 @@ AC_ARG_ENABLE([driglx-direct],
     [driglx_direct="$enableval"],
     [driglx_direct="yes"])
 
-# Check for libcaca
-PKG_CHECK_EXISTS([caca], [have_libcaca=yes], [have_libcaca=no])
-AM_CONDITIONAL([HAVE_LIBCACA], [test x$have_libcaca = xyes])
-
 dnl
 dnl libGL configuration per driver
 dnl
index 310e7617e2f43cedd6943748351ad3dcd7fc9751..57bfa5b9394b0e9ca90a5f11bcb1a77402d077f1 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdlib.h>
 #include "main/glheader.h"
 #include "main/compiler.h"
 #include "glapi/glapi.h"
@@ -34,14 +33,12 @@ _glapi_check_multithread(void)
 
 PUBLIC void
 _glapi_set_context(void *context)
-{
-        _glapi_Context = context;
-}
+{}
 
 PUBLIC void *
 _glapi_get_context(void)
 {
-        return _glapi_Context;
+       return 0;
 }
 
 PUBLIC void
@@ -87,7 +84,7 @@ _glapi_set_nop_handler(_glapi_nop_handler_proc func)
 PUBLIC struct _glapi_table *
 _glapi_new_nop_table(unsigned num_entries)
 {
-        return malloc(16);
+       return NULL;
 }
 
 #ifndef NO_MAIN
index 0ee5ab2bdee61d335fb9a3cdbb8414b6e2f3e659..020df05b2a8c2efd11edce853ffc0a9ac8a2b5ae 100644 (file)
@@ -815,7 +815,6 @@ brwCreateContext(gl_api api,
 
    intel_batchbuffer_init(brw);
 
-#if 0
    if (brw->gen >= 6) {
       /* Create a new hardware context.  Using a hardware context means that
        * our GPU state will be saved/restored on context switch, allowing us
@@ -840,7 +839,6 @@ brwCreateContext(gl_api api,
    }
 
    brw_init_state(brw);
-#endif
 
    intelInitExtensions(ctx);
 
@@ -908,10 +906,8 @@ brwCreateContext(gl_api api,
 
    _mesa_compute_version(ctx);
 
-#if 0
    _mesa_initialize_dispatch_tables(ctx);
    _mesa_initialize_vbo_vtxfmt(ctx);
-#endif
 
    if (ctx->Extensions.AMD_performance_monitor) {
       brw_init_performance_monitors(brw);
index 1267a6f5a9756bc21351a3dd18a7765f8bce701b..54813c51d50da01f8329eb786ec2119c9e4c8f84 100644 (file)
@@ -2075,12 +2075,6 @@ gen6_upload_push_constants(struct brw_context *brw,
                            struct brw_stage_state *stage_state,
                            enum aub_state_struct_type type);
 
-struct intel_screen *intel_screen_create(int fd);
-void intel_screen_destroy(struct intel_screen *screen);
-
-struct brw_context *intel_context_create(struct intel_screen *screen);
-void intel_context_destroy(struct brw_context *brw);
-
 void
 brw_initialize_context_constants(struct brw_context *brw);
 
index e817ecfb8cc66f8184eec80ec5223731453e9103..fbc041920f451793fdd0a10648d58ff65f0b9783 100644 (file)
@@ -416,9 +416,6 @@ brw_destroy_cache(struct brw_context *brw, struct brw_cache *cache)
 
    DBG("%s\n", __func__);
 
-   if (cache->bo == NULL)
-      return;
-
    if (brw->has_llc)
       drm_intel_bo_unmap(cache->bo);
    drm_intel_bo_unreference(cache->bo);
index 6bd55d395b2272cb2e2d4f769c4c9417b27fbbcd..b3b3c21f491df8379bf0b36dc1d0b99b85cc8cf5 100644 (file)
@@ -60,7 +60,7 @@ static const struct dri_debug_control debug_control[] = {
    { "urb",         DEBUG_URB },
    { "vs",          DEBUG_VS },
    { "clip",        DEBUG_CLIP },
-   { "foob",        DEBUG_AUB }, /* disable aub dumbing in the dri driver */
+   { "aub",         DEBUG_AUB },
    { "shader_time", DEBUG_SHADER_TIME },
    { "no16",        DEBUG_NO16 },
    { "blorp",       DEBUG_BLORP },
index 5911b44445492ed234649dc82208a19ba5257fc4..85863a0827ef163a045efbcd53cdf58afe7fa862 100644 (file)
@@ -1486,78 +1486,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
    return (const __DRIconfig**) intel_screen_make_configs(psp);
 }
 
-struct intel_screen *
-intel_screen_create(int fd)
-{
-   __DRIscreen *psp;
-   __DRIconfig **configs;
-   int i;
-
-   psp = malloc(sizeof(*psp));
-   if (psp == NULL)
-      return NULL;
-
-   psp->image.loader = (void *) 1; /* Don't complain about this being NULL */
-   psp->fd = fd;
-   psp->dri2.useInvalidate = (void *) 1;
-
-   configs = (__DRIconfig **) intelInitScreen2(psp);
-   for (i = 0; configs[i]; i++)
-      free(configs[i]);
-   free(configs);
-
-   return psp->driverPrivate;
-}
-
-void
-intel_screen_destroy(struct intel_screen *screen)
-{
-   __DRIscreen *psp;
-
-   psp = screen->driScrnPriv;
-   intelDestroyScreen(screen->driScrnPriv);
-   free(psp);
-}
-
-
-struct brw_context *
-intel_context_create(struct intel_screen *screen)
-{
-   __DRIcontext *driContextPriv;
-   struct brw_context *brw;
-   unsigned error;
-
-   driContextPriv = malloc(sizeof(*driContextPriv));
-   if (driContextPriv == NULL)
-      return NULL;
-
-   driContextPriv->driScreenPriv = screen->driScrnPriv;
-
-   brwCreateContext(API_OPENGL_CORE,
-                    NULL, /* visual */
-                    driContextPriv,
-                    3, 0,
-                    0, /* flags */
-                    false, /* notify_reset */
-                    &error,
-                    NULL);
-
-   brw = driContextPriv->driverPrivate;
-   brw->ctx.FirstTimeCurrent = false;
-
-   return driContextPriv->driverPrivate;
-}
-
-void
-intel_context_destroy(struct brw_context *brw)
-{
-   __DRIcontext *driContextPriv;
-
-   driContextPriv = brw->driContext;
-   intelDestroyContext(driContextPriv);
-   free(driContextPriv);
-}
-
 struct intel_buffer {
    __DRIbuffer base;
    drm_intel_bo *bo;