vk: Remove various hacks/scaffolding code
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>
This commit is contained in:
parent
1d787781ff
commit
6e35a1f166
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue