mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
ilo: new pipe driver for Intel GEN6+
This commit adds some boilerplate code. The header files found under include/ are copied from i965.
This commit is contained in:
parent
380e6875b8
commit
63b5720105
28 changed files with 4887 additions and 0 deletions
37
src/gallium/drivers/ilo/Makefile.am
Normal file
37
src/gallium/drivers/ilo/Makefile.am
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Copyright © 2012 Intel Corporation
|
||||
# Copyright (C) 2013 LunarG, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
noinst_LTLIBRARIES = libilo.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-Iinclude \
|
||||
-I$(top_srcdir)/src/gallium/winsys/intel/drm \
|
||||
$(GALLIUM_CFLAGS)
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(VISIBILITY_CFLAGS)
|
||||
|
||||
libilo_la_SOURCES = $(C_SOURCES)
|
||||
11
src/gallium/drivers/ilo/Makefile.sources
Normal file
11
src/gallium/drivers/ilo/Makefile.sources
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
C_SOURCES := \
|
||||
ilo_3d.c \
|
||||
ilo_blit.c \
|
||||
ilo_context.c \
|
||||
ilo_format.c \
|
||||
ilo_gpgpu.c \
|
||||
ilo_query.c \
|
||||
ilo_resource.c \
|
||||
ilo_screen.c \
|
||||
ilo_state.c \
|
||||
ilo_video.c
|
||||
41
src/gallium/drivers/ilo/ilo_3d.c
Normal file
41
src/gallium/drivers/ilo/ilo_3d.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_3d.h"
|
||||
|
||||
/**
|
||||
* Initialize 3D-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_3d_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.draw_vbo = NULL;
|
||||
ilo->base.render_condition = NULL;
|
||||
ilo->base.texture_barrier = NULL;
|
||||
ilo->base.get_sample_position = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_3d.h
Normal file
38
src/gallium/drivers/ilo/ilo_3d.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_3D_H
|
||||
#define ILO_3D_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_3d_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_3D_H */
|
||||
43
src/gallium/drivers/ilo/ilo_blit.c
Normal file
43
src/gallium/drivers/ilo/ilo_blit.c
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_blit.h"
|
||||
|
||||
/**
|
||||
* Initialize blit-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_blit_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.resource_copy_region = NULL;
|
||||
ilo->base.blit = NULL;
|
||||
|
||||
ilo->base.clear = NULL;
|
||||
ilo->base.clear_render_target = NULL;
|
||||
ilo->base.clear_depth_stencil = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_blit.h
Normal file
38
src/gallium/drivers/ilo/ilo_blit.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_BLIT_H
|
||||
#define ILO_BLIT_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_blit_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_BLIT_H */
|
||||
88
src/gallium/drivers/ilo/ilo_common.h
Normal file
88
src/gallium/drivers/ilo/ilo_common.h
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_COMMON_H
|
||||
#define ILO_COMMON_H
|
||||
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_format.h"
|
||||
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_double_list.h"
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_pointer.h"
|
||||
|
||||
#define ILO_GEN(gen) ((int) (gen * 100))
|
||||
#define ILO_GEN_GET_MAJOR(gen) (gen / 100)
|
||||
|
||||
/**
|
||||
* Print a message, for dumping or debugging.
|
||||
*/
|
||||
static inline void _util_printf_format(1, 2)
|
||||
ilo_printf(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
_debug_vprintf(format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a critical error.
|
||||
*/
|
||||
static inline void _util_printf_format(1, 2)
|
||||
ilo_err(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
_debug_vprintf(format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a warning, silenced for release builds.
|
||||
*/
|
||||
static inline void _util_printf_format(1, 2)
|
||||
ilo_warn(const char *format, ...)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
_debug_vprintf(format, ap);
|
||||
va_end(ap);
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* ILO_COMMON_H */
|
||||
136
src/gallium/drivers/ilo/ilo_context.c
Normal file
136
src/gallium/drivers/ilo/ilo_context.c
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "intel_chipset.h"
|
||||
|
||||
#include "ilo_3d.h"
|
||||
#include "ilo_blit.h"
|
||||
#include "ilo_gpgpu.h"
|
||||
#include "ilo_query.h"
|
||||
#include "ilo_resource.h"
|
||||
#include "ilo_screen.h"
|
||||
#include "ilo_state.h"
|
||||
#include "ilo_video.h"
|
||||
#include "ilo_context.h"
|
||||
|
||||
static void
|
||||
ilo_context_destroy(struct pipe_context *pipe)
|
||||
{
|
||||
struct ilo_context *ilo = ilo_context(pipe);
|
||||
|
||||
FREE(ilo);
|
||||
}
|
||||
|
||||
static struct pipe_context *
|
||||
ilo_context_create(struct pipe_screen *screen, void *priv)
|
||||
{
|
||||
struct ilo_screen *is = ilo_screen(screen);
|
||||
struct ilo_context *ilo;
|
||||
|
||||
ilo = CALLOC_STRUCT(ilo_context);
|
||||
if (!ilo)
|
||||
return NULL;
|
||||
|
||||
ilo->winsys = is->winsys;
|
||||
ilo->devid = is->devid;
|
||||
ilo->gen = is->gen;
|
||||
|
||||
if (IS_SNB_GT1(ilo->devid) ||
|
||||
IS_IVB_GT1(ilo->devid) ||
|
||||
IS_HSW_GT1(ilo->devid) ||
|
||||
IS_BAYTRAIL(ilo->devid))
|
||||
ilo->gt = 1;
|
||||
else if (IS_SNB_GT2(ilo->devid) ||
|
||||
IS_IVB_GT2(ilo->devid) ||
|
||||
IS_HSW_GT2(ilo->devid))
|
||||
ilo->gt = 2;
|
||||
else
|
||||
ilo->gt = 0;
|
||||
|
||||
/* stolen from classic i965 */
|
||||
/* WM maximum threads is number of EUs times number of threads per EU. */
|
||||
if (ilo->gen >= ILO_GEN(7)) {
|
||||
if (ilo->gt == 1) {
|
||||
ilo->max_wm_threads = 48;
|
||||
ilo->max_vs_threads = 36;
|
||||
ilo->max_gs_threads = 36;
|
||||
ilo->urb.size = 128;
|
||||
ilo->urb.max_vs_entries = 512;
|
||||
ilo->urb.max_gs_entries = 192;
|
||||
} else if (ilo->gt == 2) {
|
||||
ilo->max_wm_threads = 172;
|
||||
ilo->max_vs_threads = 128;
|
||||
ilo->max_gs_threads = 128;
|
||||
ilo->urb.size = 256;
|
||||
ilo->urb.max_vs_entries = 704;
|
||||
ilo->urb.max_gs_entries = 320;
|
||||
} else {
|
||||
assert(!"Unknown gen7 device.");
|
||||
}
|
||||
} else if (ilo->gen == ILO_GEN(6)) {
|
||||
if (ilo->gt == 2) {
|
||||
ilo->max_wm_threads = 80;
|
||||
ilo->max_vs_threads = 60;
|
||||
ilo->max_gs_threads = 60;
|
||||
ilo->urb.size = 64; /* volume 5c.5 section 5.1 */
|
||||
ilo->urb.max_vs_entries = 256; /* volume 2a (see 3DSTATE_URB) */
|
||||
ilo->urb.max_gs_entries = 256;
|
||||
} else {
|
||||
ilo->max_wm_threads = 40;
|
||||
ilo->max_vs_threads = 24;
|
||||
ilo->max_gs_threads = 21; /* conservative; 24 if rendering disabled */
|
||||
ilo->urb.size = 32; /* volume 5c.5 section 5.1 */
|
||||
ilo->urb.max_vs_entries = 256; /* volume 2a (see 3DSTATE_URB) */
|
||||
ilo->urb.max_gs_entries = 256;
|
||||
}
|
||||
}
|
||||
|
||||
ilo->base.screen = screen;
|
||||
ilo->base.priv = priv;
|
||||
|
||||
ilo->base.destroy = ilo_context_destroy;
|
||||
ilo->base.flush = NULL;
|
||||
|
||||
ilo_init_3d_functions(ilo);
|
||||
ilo_init_query_functions(ilo);
|
||||
ilo_init_state_functions(ilo);
|
||||
ilo_init_blit_functions(ilo);
|
||||
ilo_init_transfer_functions(ilo);
|
||||
ilo_init_video_functions(ilo);
|
||||
ilo_init_gpgpu_functions(ilo);
|
||||
|
||||
return &ilo->base;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize context-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_context_functions(struct ilo_screen *is)
|
||||
{
|
||||
is->base.context_create = ilo_context_create;
|
||||
}
|
||||
65
src/gallium/drivers/ilo/ilo_context.h
Normal file
65
src/gallium/drivers/ilo/ilo_context.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_CONTEXT_H
|
||||
#define ILO_CONTEXT_H
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct intel_winsys;
|
||||
struct ilo_screen;
|
||||
|
||||
struct ilo_context {
|
||||
struct pipe_context base;
|
||||
|
||||
struct intel_winsys *winsys;
|
||||
int devid;
|
||||
int gen;
|
||||
int gt;
|
||||
|
||||
int max_vs_threads;
|
||||
int max_gs_threads;
|
||||
int max_wm_threads;
|
||||
struct {
|
||||
int size;
|
||||
int max_vs_entries;
|
||||
int max_gs_entries;
|
||||
} urb;
|
||||
};
|
||||
|
||||
static inline struct ilo_context *
|
||||
ilo_context(struct pipe_context *pipe)
|
||||
{
|
||||
return (struct ilo_context *) pipe;
|
||||
}
|
||||
|
||||
void
|
||||
ilo_init_context_functions(struct ilo_screen *is);
|
||||
|
||||
#endif /* ILO_CONTEXT_H */
|
||||
39
src/gallium/drivers/ilo/ilo_format.c
Normal file
39
src/gallium/drivers/ilo/ilo_format.c
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_screen.h"
|
||||
#include "ilo_format.h"
|
||||
|
||||
/**
|
||||
* Initialize format-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_format_functions(struct ilo_screen *is)
|
||||
{
|
||||
is->base.is_format_supported = NULL;
|
||||
is->base.is_video_format_supported = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_format.h
Normal file
38
src/gallium/drivers/ilo/ilo_format.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_FORMAT_H
|
||||
#define ILO_FORMAT_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_screen;
|
||||
|
||||
void
|
||||
ilo_init_format_functions(struct ilo_screen *is);
|
||||
|
||||
#endif /* ILO_FORMAT_H */
|
||||
38
src/gallium/drivers/ilo/ilo_gpgpu.c
Normal file
38
src/gallium/drivers/ilo/ilo_gpgpu.c
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_gpgpu.h"
|
||||
|
||||
/**
|
||||
* Initialize GPGPU-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_gpgpu_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.launch_grid = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_gpgpu.h
Normal file
38
src/gallium/drivers/ilo/ilo_gpgpu.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_GPGPU_H
|
||||
#define ILO_GPGPU_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_gpgpu_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_GPGPU_H */
|
||||
37
src/gallium/drivers/ilo/ilo_public.h
Normal file
37
src/gallium/drivers/ilo/ilo_public.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_PUBLIC_H
|
||||
#define ILO_PUBLIC_H
|
||||
|
||||
struct intel_winsys;
|
||||
struct pipe_screen;
|
||||
|
||||
struct pipe_screen *
|
||||
ilo_screen_create(struct intel_winsys *ws);
|
||||
|
||||
#endif /* ILO_PUBLIC_H */
|
||||
42
src/gallium/drivers/ilo/ilo_query.c
Normal file
42
src/gallium/drivers/ilo/ilo_query.c
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_query.h"
|
||||
|
||||
/**
|
||||
* Initialize query-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_query_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.create_query = NULL;
|
||||
ilo->base.destroy_query = NULL;
|
||||
ilo->base.begin_query = NULL;
|
||||
ilo->base.end_query = NULL;
|
||||
ilo->base.get_query_result = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_query.h
Normal file
38
src/gallium/drivers/ilo/ilo_query.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_QUERY_H
|
||||
#define ILO_QUERY_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_query_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_QUERY_H */
|
||||
55
src/gallium/drivers/ilo/ilo_resource.c
Normal file
55
src/gallium/drivers/ilo/ilo_resource.c
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_screen.h"
|
||||
#include "ilo_resource.h"
|
||||
|
||||
/**
|
||||
* Initialize resource-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_resource_functions(struct ilo_screen *is)
|
||||
{
|
||||
is->base.can_create_resource = NULL;
|
||||
is->base.resource_create = NULL;
|
||||
is->base.resource_from_handle = NULL;
|
||||
is->base.resource_get_handle = NULL;
|
||||
is->base.resource_destroy = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize transfer-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_transfer_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.transfer_map = NULL;
|
||||
ilo->base.transfer_flush_region = NULL;
|
||||
ilo->base.transfer_unmap = NULL;
|
||||
ilo->base.transfer_inline_write = NULL;
|
||||
}
|
||||
42
src/gallium/drivers/ilo/ilo_resource.h
Normal file
42
src/gallium/drivers/ilo/ilo_resource.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_RESOURCE_H
|
||||
#define ILO_RESOURCE_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_screen;
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_resource_functions(struct ilo_screen *is);
|
||||
|
||||
void
|
||||
ilo_init_transfer_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_RESOURCE_H */
|
||||
104
src/gallium/drivers/ilo/ilo_screen.c
Normal file
104
src/gallium/drivers/ilo/ilo_screen.c
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "util/u_format_s3tc.h"
|
||||
#include "intel_chipset.h"
|
||||
#include "intel_winsys.h"
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_format.h"
|
||||
#include "ilo_resource.h"
|
||||
#include "ilo_public.h"
|
||||
#include "ilo_screen.h"
|
||||
|
||||
static void
|
||||
ilo_screen_destroy(struct pipe_screen *screen)
|
||||
{
|
||||
struct ilo_screen *is = ilo_screen(screen);
|
||||
|
||||
/* as it seems, winsys is owned by the screen */
|
||||
is->winsys->destroy(is->winsys);
|
||||
|
||||
FREE(is);
|
||||
}
|
||||
|
||||
struct pipe_screen *
|
||||
ilo_screen_create(struct intel_winsys *ws)
|
||||
{
|
||||
struct ilo_screen *is;
|
||||
const struct intel_winsys_info *info;
|
||||
|
||||
is = CALLOC_STRUCT(ilo_screen);
|
||||
if (!is)
|
||||
return NULL;
|
||||
|
||||
is->winsys = ws;
|
||||
|
||||
info = is->winsys->get_info(is->winsys);
|
||||
|
||||
is->devid = info->devid;
|
||||
if (IS_GEN7(info->devid)) {
|
||||
is->gen = ILO_GEN(7);
|
||||
}
|
||||
else if (IS_GEN6(info->devid)) {
|
||||
is->gen = ILO_GEN(6);
|
||||
}
|
||||
else {
|
||||
ilo_err("unknown GPU generation\n");
|
||||
FREE(is);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
is->has_llc = info->has_llc;
|
||||
|
||||
util_format_s3tc_init();
|
||||
|
||||
is->base.destroy = ilo_screen_destroy;
|
||||
is->base.get_name = NULL;
|
||||
is->base.get_vendor = NULL;
|
||||
is->base.get_param = NULL;
|
||||
is->base.get_paramf = NULL;
|
||||
is->base.get_shader_param = NULL;
|
||||
is->base.get_video_param = NULL;
|
||||
is->base.get_compute_param = NULL;
|
||||
|
||||
is->base.get_timestamp = NULL;
|
||||
|
||||
is->base.flush_frontbuffer = NULL;
|
||||
|
||||
is->base.fence_reference = NULL;
|
||||
is->base.fence_signalled = NULL;
|
||||
is->base.fence_finish = NULL;
|
||||
|
||||
is->base.get_driver_query_info = NULL;
|
||||
|
||||
ilo_init_format_functions(is);
|
||||
ilo_init_context_functions(is);
|
||||
ilo_init_resource_functions(is);
|
||||
|
||||
return &is->base;
|
||||
}
|
||||
53
src/gallium/drivers/ilo/ilo_screen.h
Normal file
53
src/gallium/drivers/ilo/ilo_screen.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_SCREEN_H
|
||||
#define ILO_SCREEN_H
|
||||
|
||||
#include "pipe/p_screen.h"
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct intel_winsys;
|
||||
|
||||
struct ilo_screen {
|
||||
struct pipe_screen base;
|
||||
|
||||
struct intel_winsys *winsys;
|
||||
int devid;
|
||||
int gen;
|
||||
|
||||
bool has_llc;
|
||||
};
|
||||
|
||||
static inline struct ilo_screen *
|
||||
ilo_screen(struct pipe_screen *screen)
|
||||
{
|
||||
return (struct ilo_screen *) screen;
|
||||
}
|
||||
|
||||
#endif /* ILO_SCREEN_H */
|
||||
97
src/gallium/drivers/ilo/ilo_state.c
Normal file
97
src/gallium/drivers/ilo/ilo_state.c
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_state.h"
|
||||
|
||||
/**
|
||||
* Initialize state-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_state_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.create_blend_state = NULL;
|
||||
ilo->base.bind_blend_state = NULL;
|
||||
ilo->base.delete_blend_state = NULL;
|
||||
ilo->base.create_sampler_state = NULL;
|
||||
ilo->base.bind_fragment_sampler_states = NULL;
|
||||
ilo->base.bind_vertex_sampler_states = NULL;
|
||||
ilo->base.bind_geometry_sampler_states = NULL;
|
||||
ilo->base.bind_compute_sampler_states = NULL;
|
||||
ilo->base.delete_sampler_state = NULL;
|
||||
ilo->base.create_rasterizer_state = NULL;
|
||||
ilo->base.bind_rasterizer_state = NULL;
|
||||
ilo->base.delete_rasterizer_state = NULL;
|
||||
ilo->base.create_depth_stencil_alpha_state = NULL;
|
||||
ilo->base.bind_depth_stencil_alpha_state = NULL;
|
||||
ilo->base.delete_depth_stencil_alpha_state = NULL;
|
||||
ilo->base.create_fs_state = NULL;
|
||||
ilo->base.bind_fs_state = NULL;
|
||||
ilo->base.delete_fs_state = NULL;
|
||||
ilo->base.create_vs_state = NULL;
|
||||
ilo->base.bind_vs_state = NULL;
|
||||
ilo->base.delete_vs_state = NULL;
|
||||
ilo->base.create_gs_state = NULL;
|
||||
ilo->base.bind_gs_state = NULL;
|
||||
ilo->base.delete_gs_state = NULL;
|
||||
ilo->base.create_vertex_elements_state = NULL;
|
||||
ilo->base.bind_vertex_elements_state = NULL;
|
||||
ilo->base.delete_vertex_elements_state = NULL;
|
||||
|
||||
ilo->base.set_blend_color = NULL;
|
||||
ilo->base.set_stencil_ref = NULL;
|
||||
ilo->base.set_sample_mask = NULL;
|
||||
ilo->base.set_clip_state = NULL;
|
||||
ilo->base.set_constant_buffer = NULL;
|
||||
ilo->base.set_framebuffer_state = NULL;
|
||||
ilo->base.set_polygon_stipple = NULL;
|
||||
ilo->base.set_scissor_state = NULL;
|
||||
ilo->base.set_viewport_state = NULL;
|
||||
ilo->base.set_fragment_sampler_views = NULL;
|
||||
ilo->base.set_vertex_sampler_views = NULL;
|
||||
ilo->base.set_geometry_sampler_views = NULL;
|
||||
ilo->base.set_compute_sampler_views = NULL;
|
||||
ilo->base.set_shader_resources = NULL;
|
||||
ilo->base.set_vertex_buffers = NULL;
|
||||
ilo->base.set_index_buffer = NULL;
|
||||
|
||||
ilo->base.create_stream_output_target = NULL;
|
||||
ilo->base.stream_output_target_destroy = NULL;
|
||||
ilo->base.set_stream_output_targets = NULL;
|
||||
|
||||
ilo->base.create_sampler_view = NULL;
|
||||
ilo->base.sampler_view_destroy = NULL;
|
||||
|
||||
ilo->base.create_surface = NULL;
|
||||
ilo->base.surface_destroy = NULL;
|
||||
|
||||
ilo->base.create_compute_state = NULL;
|
||||
ilo->base.bind_compute_state = NULL;
|
||||
ilo->base.delete_compute_state = NULL;
|
||||
ilo->base.set_compute_resources = NULL;
|
||||
ilo->base.set_global_binding = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_state.h
Normal file
38
src/gallium/drivers/ilo/ilo_state.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_STATE_H
|
||||
#define ILO_STATE_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_state_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_STATE_H */
|
||||
39
src/gallium/drivers/ilo/ilo_video.c
Normal file
39
src/gallium/drivers/ilo/ilo_video.c
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_video.h"
|
||||
|
||||
/**
|
||||
* Initialize video-related functions.
|
||||
*/
|
||||
void
|
||||
ilo_init_video_functions(struct ilo_context *ilo)
|
||||
{
|
||||
ilo->base.create_video_decoder = NULL;
|
||||
ilo->base.create_video_buffer = NULL;
|
||||
}
|
||||
38
src/gallium/drivers/ilo/ilo_video.h
Normal file
38
src/gallium/drivers/ilo/ilo_video.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 2012-2013 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef ILO_VIDEO_H
|
||||
#define ILO_VIDEO_H
|
||||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct ilo_context;
|
||||
|
||||
void
|
||||
ilo_init_video_functions(struct ilo_context *ilo);
|
||||
|
||||
#endif /* ILO_VIDEO_H */
|
||||
1665
src/gallium/drivers/ilo/include/brw_defines.h
Normal file
1665
src/gallium/drivers/ilo/include/brw_defines.h
Normal file
File diff suppressed because it is too large
Load diff
1446
src/gallium/drivers/ilo/include/brw_structs.h
Normal file
1446
src/gallium/drivers/ilo/include/brw_structs.h
Normal file
File diff suppressed because it is too large
Load diff
264
src/gallium/drivers/ilo/include/intel_chipset.h
Normal file
264
src/gallium/drivers/ilo/include/intel_chipset.h
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
/*
|
||||
* Copyright © 2007 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Eric Anholt <eric@anholt.net>
|
||||
*
|
||||
*/
|
||||
|
||||
#define PCI_CHIP_I810 0x7121
|
||||
#define PCI_CHIP_I810_DC100 0x7123
|
||||
#define PCI_CHIP_I810_E 0x7125
|
||||
#define PCI_CHIP_I815 0x1132
|
||||
|
||||
#define PCI_CHIP_I830_M 0x3577
|
||||
#define PCI_CHIP_845_G 0x2562
|
||||
#define PCI_CHIP_I855_GM 0x3582
|
||||
#define PCI_CHIP_I865_G 0x2572
|
||||
|
||||
#define PCI_CHIP_I915_G 0x2582
|
||||
#define PCI_CHIP_E7221_G 0x258A
|
||||
#define PCI_CHIP_I915_GM 0x2592
|
||||
#define PCI_CHIP_I945_G 0x2772
|
||||
#define PCI_CHIP_I945_GM 0x27A2
|
||||
#define PCI_CHIP_I945_GME 0x27AE
|
||||
|
||||
#define PCI_CHIP_Q35_G 0x29B2
|
||||
#define PCI_CHIP_G33_G 0x29C2
|
||||
#define PCI_CHIP_Q33_G 0x29D2
|
||||
|
||||
#define PCI_CHIP_IGD_GM 0xA011
|
||||
#define PCI_CHIP_IGD_G 0xA001
|
||||
|
||||
#define IS_IGDGM(devid) (devid == PCI_CHIP_IGD_GM)
|
||||
#define IS_IGDG(devid) (devid == PCI_CHIP_IGD_G)
|
||||
#define IS_IGD(devid) (IS_IGDG(devid) || IS_IGDGM(devid))
|
||||
|
||||
#define PCI_CHIP_I965_G 0x29A2
|
||||
#define PCI_CHIP_I965_Q 0x2992
|
||||
#define PCI_CHIP_I965_G_1 0x2982
|
||||
#define PCI_CHIP_I946_GZ 0x2972
|
||||
#define PCI_CHIP_I965_GM 0x2A02
|
||||
#define PCI_CHIP_I965_GME 0x2A12
|
||||
|
||||
#define PCI_CHIP_GM45_GM 0x2A42
|
||||
|
||||
#define PCI_CHIP_IGD_E_G 0x2E02
|
||||
#define PCI_CHIP_Q45_G 0x2E12
|
||||
#define PCI_CHIP_G45_G 0x2E22
|
||||
#define PCI_CHIP_G41_G 0x2E32
|
||||
#define PCI_CHIP_B43_G 0x2E42
|
||||
#define PCI_CHIP_B43_G1 0x2E92
|
||||
|
||||
#define PCI_CHIP_ILD_G 0x0042
|
||||
#define PCI_CHIP_ILM_G 0x0046
|
||||
|
||||
#define PCI_CHIP_SANDYBRIDGE_GT1 0x0102 /* Desktop */
|
||||
#define PCI_CHIP_SANDYBRIDGE_GT2 0x0112
|
||||
#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS 0x0122
|
||||
#define PCI_CHIP_SANDYBRIDGE_M_GT1 0x0106 /* Mobile */
|
||||
#define PCI_CHIP_SANDYBRIDGE_M_GT2 0x0116
|
||||
#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126
|
||||
#define PCI_CHIP_SANDYBRIDGE_S 0x010A /* Server */
|
||||
|
||||
#define PCI_CHIP_IVYBRIDGE_GT1 0x0152 /* Desktop */
|
||||
#define PCI_CHIP_IVYBRIDGE_GT2 0x0162
|
||||
#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 /* Mobile */
|
||||
#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166
|
||||
#define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a /* Server */
|
||||
#define PCI_CHIP_IVYBRIDGE_S_GT2 0x016a
|
||||
|
||||
#define PCI_CHIP_BAYTRAIL_M_1 0x0F31
|
||||
#define PCI_CHIP_BAYTRAIL_M_2 0x0F32
|
||||
#define PCI_CHIP_BAYTRAIL_M_3 0x0F33
|
||||
#define PCI_CHIP_BAYTRAIL_M_4 0x0157
|
||||
#define PCI_CHIP_BAYTRAIL_D 0x0155
|
||||
|
||||
#define PCI_CHIP_HASWELL_GT1 0x0402 /* Desktop */
|
||||
#define PCI_CHIP_HASWELL_GT2 0x0412
|
||||
#define PCI_CHIP_HASWELL_GT2_PLUS 0x0422
|
||||
#define PCI_CHIP_HASWELL_M_GT1 0x0406 /* Mobile */
|
||||
#define PCI_CHIP_HASWELL_M_GT2 0x0416
|
||||
#define PCI_CHIP_HASWELL_M_GT2_PLUS 0x0426
|
||||
#define PCI_CHIP_HASWELL_S_GT1 0x040A /* Server */
|
||||
#define PCI_CHIP_HASWELL_S_GT2 0x041A
|
||||
#define PCI_CHIP_HASWELL_S_GT2_PLUS 0x042A
|
||||
#define PCI_CHIP_HASWELL_SDV_GT1 0x0C02 /* Desktop */
|
||||
#define PCI_CHIP_HASWELL_SDV_GT2 0x0C12
|
||||
#define PCI_CHIP_HASWELL_SDV_GT2_PLUS 0x0C22
|
||||
#define PCI_CHIP_HASWELL_SDV_M_GT1 0x0C06 /* Mobile */
|
||||
#define PCI_CHIP_HASWELL_SDV_M_GT2 0x0C16
|
||||
#define PCI_CHIP_HASWELL_SDV_M_GT2_PLUS 0x0C26
|
||||
#define PCI_CHIP_HASWELL_SDV_S_GT1 0x0C0A /* Server */
|
||||
#define PCI_CHIP_HASWELL_SDV_S_GT2 0x0C1A
|
||||
#define PCI_CHIP_HASWELL_SDV_S_GT2_PLUS 0x0C2A
|
||||
#define PCI_CHIP_HASWELL_ULT_GT1 0x0A02 /* Desktop */
|
||||
#define PCI_CHIP_HASWELL_ULT_GT2 0x0A12
|
||||
#define PCI_CHIP_HASWELL_ULT_GT2_PLUS 0x0A22
|
||||
#define PCI_CHIP_HASWELL_ULT_M_GT1 0x0A06 /* Mobile */
|
||||
#define PCI_CHIP_HASWELL_ULT_M_GT2 0x0A16
|
||||
#define PCI_CHIP_HASWELL_ULT_M_GT2_PLUS 0x0A26
|
||||
#define PCI_CHIP_HASWELL_ULT_S_GT1 0x0A0A /* Server */
|
||||
#define PCI_CHIP_HASWELL_ULT_S_GT2 0x0A1A
|
||||
#define PCI_CHIP_HASWELL_ULT_S_GT2_PLUS 0x0A2A
|
||||
#define PCI_CHIP_HASWELL_CRW_GT1 0x0D02 /* Desktop */
|
||||
#define PCI_CHIP_HASWELL_CRW_GT2 0x0D12
|
||||
#define PCI_CHIP_HASWELL_CRW_GT2_PLUS 0x0D22
|
||||
#define PCI_CHIP_HASWELL_CRW_M_GT1 0x0D06 /* Mobile */
|
||||
#define PCI_CHIP_HASWELL_CRW_M_GT2 0x0D16
|
||||
#define PCI_CHIP_HASWELL_CRW_M_GT2_PLUS 0x0D26
|
||||
#define PCI_CHIP_HASWELL_CRW_S_GT1 0x0D0A /* Server */
|
||||
#define PCI_CHIP_HASWELL_CRW_S_GT2 0x0D1A
|
||||
#define PCI_CHIP_HASWELL_CRW_S_GT2_PLUS 0x0D2A
|
||||
|
||||
#define IS_MOBILE(devid) (devid == PCI_CHIP_I855_GM || \
|
||||
devid == PCI_CHIP_I915_GM || \
|
||||
devid == PCI_CHIP_I945_GM || \
|
||||
devid == PCI_CHIP_I945_GME || \
|
||||
devid == PCI_CHIP_I965_GM || \
|
||||
devid == PCI_CHIP_I965_GME || \
|
||||
devid == PCI_CHIP_GM45_GM || \
|
||||
IS_IGD(devid) || \
|
||||
devid == PCI_CHIP_ILM_G)
|
||||
|
||||
#define IS_G45(devid) (devid == PCI_CHIP_IGD_E_G || \
|
||||
devid == PCI_CHIP_Q45_G || \
|
||||
devid == PCI_CHIP_G45_G || \
|
||||
devid == PCI_CHIP_G41_G || \
|
||||
devid == PCI_CHIP_B43_G || \
|
||||
devid == PCI_CHIP_B43_G1)
|
||||
#define IS_GM45(devid) (devid == PCI_CHIP_GM45_GM)
|
||||
#define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid))
|
||||
|
||||
#define IS_ILD(devid) (devid == PCI_CHIP_ILD_G)
|
||||
#define IS_ILM(devid) (devid == PCI_CHIP_ILM_G)
|
||||
#define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(devid))
|
||||
|
||||
#define IS_915(devid) (devid == PCI_CHIP_I915_G || \
|
||||
devid == PCI_CHIP_E7221_G || \
|
||||
devid == PCI_CHIP_I915_GM)
|
||||
|
||||
#define IS_945(devid) (devid == PCI_CHIP_I945_G || \
|
||||
devid == PCI_CHIP_I945_GM || \
|
||||
devid == PCI_CHIP_I945_GME || \
|
||||
devid == PCI_CHIP_G33_G || \
|
||||
devid == PCI_CHIP_Q33_G || \
|
||||
devid == PCI_CHIP_Q35_G || IS_IGD(devid))
|
||||
|
||||
#define IS_GEN4(devid) (devid == PCI_CHIP_I965_G || \
|
||||
devid == PCI_CHIP_I965_Q || \
|
||||
devid == PCI_CHIP_I965_G_1 || \
|
||||
devid == PCI_CHIP_I965_GM || \
|
||||
devid == PCI_CHIP_I965_GME || \
|
||||
devid == PCI_CHIP_I946_GZ || \
|
||||
IS_G4X(devid))
|
||||
|
||||
/* Compat macro for intel_decode.c */
|
||||
#define IS_IRONLAKE(devid) IS_GEN5(devid)
|
||||
|
||||
#define IS_SNB_GT1(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \
|
||||
devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
|
||||
devid == PCI_CHIP_SANDYBRIDGE_S)
|
||||
|
||||
#define IS_SNB_GT2(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT2 || \
|
||||
devid == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
|
||||
devid == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
|
||||
devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS)
|
||||
|
||||
#define IS_GEN6(devid) (IS_SNB_GT1(devid) || IS_SNB_GT2(devid))
|
||||
|
||||
#define IS_IVB_GT1(devid) (devid == PCI_CHIP_IVYBRIDGE_GT1 || \
|
||||
devid == PCI_CHIP_IVYBRIDGE_M_GT1 || \
|
||||
devid == PCI_CHIP_IVYBRIDGE_S_GT1)
|
||||
|
||||
#define IS_IVB_GT2(devid) (devid == PCI_CHIP_IVYBRIDGE_GT2 || \
|
||||
devid == PCI_CHIP_IVYBRIDGE_M_GT2 || \
|
||||
devid == PCI_CHIP_IVYBRIDGE_S_GT2)
|
||||
|
||||
#define IS_IVYBRIDGE(devid) (IS_IVB_GT1(devid) || IS_IVB_GT2(devid))
|
||||
|
||||
#define IS_BAYTRAIL(devid) (devid == PCI_CHIP_BAYTRAIL_M_1 || \
|
||||
devid == PCI_CHIP_BAYTRAIL_M_2 || \
|
||||
devid == PCI_CHIP_BAYTRAIL_M_3 || \
|
||||
devid == PCI_CHIP_BAYTRAIL_M_4 || \
|
||||
devid == PCI_CHIP_BAYTRAIL_D)
|
||||
|
||||
#define IS_GEN7(devid) (IS_IVYBRIDGE(devid) || \
|
||||
IS_BAYTRAIL(devid) || \
|
||||
IS_HASWELL(devid))
|
||||
|
||||
#define IS_HSW_GT1(devid) (devid == PCI_CHIP_HASWELL_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_M_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_S_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_M_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_S_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_M_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_S_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_M_GT1 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_S_GT1)
|
||||
#define IS_HSW_GT2(devid) (devid == PCI_CHIP_HASWELL_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_M_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_S_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_M_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_S_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_M_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_S_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_M_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_S_GT2 || \
|
||||
devid == PCI_CHIP_HASWELL_M_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_S_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_M_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_SDV_S_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_M_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_ULT_S_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_M_GT2_PLUS || \
|
||||
devid == PCI_CHIP_HASWELL_CRW_S_GT2_PLUS)
|
||||
|
||||
#define IS_HASWELL(devid) (IS_HSW_GT1(devid) || \
|
||||
IS_HSW_GT2(devid))
|
||||
|
||||
#define IS_965(devid) (IS_GEN4(devid) || \
|
||||
IS_G4X(devid) || \
|
||||
IS_GEN5(devid) || \
|
||||
IS_GEN6(devid) || \
|
||||
IS_GEN7(devid))
|
||||
|
||||
#define IS_9XX(devid) (IS_915(devid) || \
|
||||
IS_945(devid) || \
|
||||
IS_965(devid))
|
||||
|
||||
#define IS_GEN3(devid) (IS_915(devid) || \
|
||||
IS_945(devid))
|
||||
|
||||
#define IS_GEN2(devid) (devid == PCI_CHIP_I830_M || \
|
||||
devid == PCI_CHIP_845_G || \
|
||||
devid == PCI_CHIP_I855_GM || \
|
||||
devid == PCI_CHIP_I865_G)
|
||||
279
src/gallium/drivers/ilo/include/intel_reg.h
Normal file
279
src/gallium/drivers/ilo/include/intel_reg.h
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#define CMD_MI (0x0 << 29)
|
||||
#define CMD_2D (0x2 << 29)
|
||||
#define CMD_3D (0x3 << 29)
|
||||
|
||||
#define MI_NOOP (CMD_MI | 0)
|
||||
|
||||
#define MI_BATCH_BUFFER_END (CMD_MI | 0xA << 23)
|
||||
|
||||
#define MI_FLUSH (CMD_MI | (4 << 23))
|
||||
#define FLUSH_MAP_CACHE (1 << 0)
|
||||
#define INHIBIT_FLUSH_RENDER_CACHE (1 << 2)
|
||||
|
||||
#define MI_FLUSH_DW (CMD_MI | (0x26 << 23) | 2)
|
||||
|
||||
/* Stalls command execution waiting for the given events to have occurred. */
|
||||
#define MI_WAIT_FOR_EVENT (CMD_MI | (0x3 << 23))
|
||||
#define MI_WAIT_FOR_PLANE_B_FLIP (1<<6)
|
||||
#define MI_WAIT_FOR_PLANE_A_FLIP (1<<2)
|
||||
|
||||
#define MI_STORE_REGISTER_MEM (CMD_MI | (0x24 << 23))
|
||||
# define MI_STORE_REGISTER_MEM_USE_GGTT (1 << 22)
|
||||
|
||||
/* p189 */
|
||||
#define _3DSTATE_LOAD_STATE_IMMEDIATE_1 (CMD_3D | (0x1d<<24) | (0x04<<16))
|
||||
#define I1_LOAD_S(n) (1<<(4+n))
|
||||
|
||||
#define _3DSTATE_DRAWRECT_INFO (CMD_3D | (0x1d<<24) | (0x80<<16) | 0x3)
|
||||
|
||||
/** @{
|
||||
*
|
||||
* PIPE_CONTROL operation, a combination MI_FLUSH and register write with
|
||||
* additional flushing control.
|
||||
*/
|
||||
#define _3DSTATE_PIPE_CONTROL (CMD_3D | (3 << 27) | (2 << 24))
|
||||
#define PIPE_CONTROL_CS_STALL (1 << 20)
|
||||
#define PIPE_CONTROL_GLOBAL_SNAPSHOT_COUNT_RESET (1 << 19)
|
||||
#define PIPE_CONTROL_TLB_INVALIDATE (1 << 18)
|
||||
#define PIPE_CONTROL_SYNC_GFDT (1 << 17)
|
||||
#define PIPE_CONTROL_MEDIA_STATE_CLEAR (1 << 16)
|
||||
#define PIPE_CONTROL_NO_WRITE (0 << 14)
|
||||
#define PIPE_CONTROL_WRITE_IMMEDIATE (1 << 14)
|
||||
#define PIPE_CONTROL_WRITE_DEPTH_COUNT (2 << 14)
|
||||
#define PIPE_CONTROL_WRITE_TIMESTAMP (3 << 14)
|
||||
#define PIPE_CONTROL_DEPTH_STALL (1 << 13)
|
||||
#define PIPE_CONTROL_WRITE_FLUSH (1 << 12)
|
||||
#define PIPE_CONTROL_INSTRUCTION_FLUSH (1 << 11)
|
||||
#define PIPE_CONTROL_TC_FLUSH (1 << 10) /* GM45+ only */
|
||||
#define PIPE_CONTROL_ISP_DIS (1 << 9)
|
||||
#define PIPE_CONTROL_INTERRUPT_ENABLE (1 << 8)
|
||||
/* GT */
|
||||
#define PIPE_CONTROL_VF_CACHE_INVALIDATE (1 << 4)
|
||||
#define PIPE_CONTROL_CONST_CACHE_INVALIDATE (1 << 3)
|
||||
#define PIPE_CONTROL_STATE_CACHE_INVALIDATE (1 << 2)
|
||||
#define PIPE_CONTROL_STALL_AT_SCOREBOARD (1 << 1)
|
||||
#define PIPE_CONTROL_DEPTH_CACHE_FLUSH (1 << 0)
|
||||
#define PIPE_CONTROL_PPGTT_WRITE (0 << 2)
|
||||
#define PIPE_CONTROL_GLOBAL_GTT_WRITE (1 << 2)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @{
|
||||
* 915 definitions
|
||||
*
|
||||
* 915 documents say that bits 31:28 and 1 are "undefined, must be zero."
|
||||
*/
|
||||
#define S0_VB_OFFSET_MASK 0x0ffffffc
|
||||
#define S0_AUTO_CACHE_INV_DISABLE (1<<0)
|
||||
/** @} */
|
||||
|
||||
/** @{
|
||||
* 830 definitions
|
||||
*/
|
||||
#define S0_VB_OFFSET_MASK_830 0xffffff80
|
||||
#define S0_VB_PITCH_SHIFT_830 1
|
||||
#define S0_VB_ENABLE_830 (1<<0)
|
||||
/** @} */
|
||||
|
||||
#define S1_VERTEX_WIDTH_SHIFT 24
|
||||
#define S1_VERTEX_WIDTH_MASK (0x3f<<24)
|
||||
#define S1_VERTEX_PITCH_SHIFT 16
|
||||
#define S1_VERTEX_PITCH_MASK (0x3f<<16)
|
||||
|
||||
#define TEXCOORDFMT_2D 0x0
|
||||
#define TEXCOORDFMT_3D 0x1
|
||||
#define TEXCOORDFMT_4D 0x2
|
||||
#define TEXCOORDFMT_1D 0x3
|
||||
#define TEXCOORDFMT_2D_16 0x4
|
||||
#define TEXCOORDFMT_4D_16 0x5
|
||||
#define TEXCOORDFMT_NOT_PRESENT 0xf
|
||||
#define S2_TEXCOORD_FMT0_MASK 0xf
|
||||
#define S2_TEXCOORD_FMT1_SHIFT 4
|
||||
#define S2_TEXCOORD_FMT(unit, type) ((type)<<(unit*4))
|
||||
#define S2_TEXCOORD_NONE (~0)
|
||||
#define S2_TEX_COUNT_SHIFT_830 12
|
||||
#define S2_VERTEX_1_WIDTH_SHIFT_830 0
|
||||
#define S2_VERTEX_0_WIDTH_SHIFT_830 6
|
||||
/* S3 not interesting */
|
||||
|
||||
#define S4_POINT_WIDTH_SHIFT 23
|
||||
#define S4_POINT_WIDTH_MASK (0x1ff<<23)
|
||||
#define S4_LINE_WIDTH_SHIFT 19
|
||||
#define S4_LINE_WIDTH_ONE (0x2<<19)
|
||||
#define S4_LINE_WIDTH_MASK (0xf<<19)
|
||||
#define S4_FLATSHADE_ALPHA (1<<18)
|
||||
#define S4_FLATSHADE_FOG (1<<17)
|
||||
#define S4_FLATSHADE_SPECULAR (1<<16)
|
||||
#define S4_FLATSHADE_COLOR (1<<15)
|
||||
#define S4_CULLMODE_BOTH (0<<13)
|
||||
#define S4_CULLMODE_NONE (1<<13)
|
||||
#define S4_CULLMODE_CW (2<<13)
|
||||
#define S4_CULLMODE_CCW (3<<13)
|
||||
#define S4_CULLMODE_MASK (3<<13)
|
||||
#define S4_VFMT_POINT_WIDTH (1<<12)
|
||||
#define S4_VFMT_SPEC_FOG (1<<11)
|
||||
#define S4_VFMT_COLOR (1<<10)
|
||||
#define S4_VFMT_DEPTH_OFFSET (1<<9)
|
||||
#define S4_VFMT_XYZ (1<<6)
|
||||
#define S4_VFMT_XYZW (2<<6)
|
||||
#define S4_VFMT_XY (3<<6)
|
||||
#define S4_VFMT_XYW (4<<6)
|
||||
#define S4_VFMT_XYZW_MASK (7<<6)
|
||||
#define S4_FORCE_DEFAULT_DIFFUSE (1<<5)
|
||||
#define S4_FORCE_DEFAULT_SPECULAR (1<<4)
|
||||
#define S4_LOCAL_DEPTH_OFFSET_ENABLE (1<<3)
|
||||
#define S4_VFMT_FOG_PARAM (1<<2)
|
||||
#define S4_SPRITE_POINT_ENABLE (1<<1)
|
||||
#define S4_LINE_ANTIALIAS_ENABLE (1<<0)
|
||||
|
||||
#define S4_VFMT_MASK (S4_VFMT_POINT_WIDTH | \
|
||||
S4_VFMT_SPEC_FOG | \
|
||||
S4_VFMT_COLOR | \
|
||||
S4_VFMT_DEPTH_OFFSET | \
|
||||
S4_VFMT_XYZW_MASK | \
|
||||
S4_VFMT_FOG_PARAM)
|
||||
|
||||
|
||||
#define S5_WRITEDISABLE_ALPHA (1<<31)
|
||||
#define S5_WRITEDISABLE_RED (1<<30)
|
||||
#define S5_WRITEDISABLE_GREEN (1<<29)
|
||||
#define S5_WRITEDISABLE_BLUE (1<<28)
|
||||
#define S5_WRITEDISABLE_MASK (0xf<<28)
|
||||
#define S5_FORCE_DEFAULT_POINT_SIZE (1<<27)
|
||||
#define S5_LAST_PIXEL_ENABLE (1<<26)
|
||||
#define S5_GLOBAL_DEPTH_OFFSET_ENABLE (1<<25)
|
||||
#define S5_FOG_ENABLE (1<<24)
|
||||
#define S5_STENCIL_REF_SHIFT 16
|
||||
#define S5_STENCIL_REF_MASK (0xff<<16)
|
||||
#define S5_STENCIL_TEST_FUNC_SHIFT 13
|
||||
#define S5_STENCIL_TEST_FUNC_MASK (0x7<<13)
|
||||
#define S5_STENCIL_FAIL_SHIFT 10
|
||||
#define S5_STENCIL_FAIL_MASK (0x7<<10)
|
||||
#define S5_STENCIL_PASS_Z_FAIL_SHIFT 7
|
||||
#define S5_STENCIL_PASS_Z_FAIL_MASK (0x7<<7)
|
||||
#define S5_STENCIL_PASS_Z_PASS_SHIFT 4
|
||||
#define S5_STENCIL_PASS_Z_PASS_MASK (0x7<<4)
|
||||
#define S5_STENCIL_WRITE_ENABLE (1<<3)
|
||||
#define S5_STENCIL_TEST_ENABLE (1<<2)
|
||||
#define S5_COLOR_DITHER_ENABLE (1<<1)
|
||||
#define S5_LOGICOP_ENABLE (1<<0)
|
||||
|
||||
|
||||
#define S6_ALPHA_TEST_ENABLE (1<<31)
|
||||
#define S6_ALPHA_TEST_FUNC_SHIFT 28
|
||||
#define S6_ALPHA_TEST_FUNC_MASK (0x7<<28)
|
||||
#define S6_ALPHA_REF_SHIFT 20
|
||||
#define S6_ALPHA_REF_MASK (0xff<<20)
|
||||
#define S6_DEPTH_TEST_ENABLE (1<<19)
|
||||
#define S6_DEPTH_TEST_FUNC_SHIFT 16
|
||||
#define S6_DEPTH_TEST_FUNC_MASK (0x7<<16)
|
||||
#define S6_CBUF_BLEND_ENABLE (1<<15)
|
||||
#define S6_CBUF_BLEND_FUNC_SHIFT 12
|
||||
#define S6_CBUF_BLEND_FUNC_MASK (0x7<<12)
|
||||
#define S6_CBUF_SRC_BLEND_FACT_SHIFT 8
|
||||
#define S6_CBUF_SRC_BLEND_FACT_MASK (0xf<<8)
|
||||
#define S6_CBUF_DST_BLEND_FACT_SHIFT 4
|
||||
#define S6_CBUF_DST_BLEND_FACT_MASK (0xf<<4)
|
||||
#define S6_DEPTH_WRITE_ENABLE (1<<3)
|
||||
#define S6_COLOR_WRITE_ENABLE (1<<2)
|
||||
#define S6_TRISTRIP_PV_SHIFT 0
|
||||
#define S6_TRISTRIP_PV_MASK (0x3<<0)
|
||||
|
||||
#define S7_DEPTH_OFFSET_CONST_MASK ~0
|
||||
|
||||
/* p143 */
|
||||
#define _3DSTATE_BUF_INFO_CMD (CMD_3D | (0x1d<<24) | (0x8e<<16) | 1)
|
||||
/* Dword 1 */
|
||||
#define BUF_3D_ID_COLOR_BACK (0x3<<24)
|
||||
#define BUF_3D_ID_DEPTH (0x7<<24)
|
||||
#define BUF_3D_USE_FENCE (1<<23)
|
||||
#define BUF_3D_TILED_SURFACE (1<<22)
|
||||
#define BUF_3D_TILE_WALK_X 0
|
||||
#define BUF_3D_TILE_WALK_Y (1<<21)
|
||||
#define BUF_3D_PITCH(x) (((x)/4)<<2)
|
||||
/* Dword 2 */
|
||||
#define BUF_3D_ADDR(x) ((x) & ~0x3)
|
||||
|
||||
/* Primitive dispatch on 830-945 */
|
||||
#define _3DPRIMITIVE (CMD_3D | (0x1f << 24))
|
||||
#define PRIM_INDIRECT (1<<23)
|
||||
#define PRIM_INLINE (0<<23)
|
||||
#define PRIM_INDIRECT_SEQUENTIAL (0<<17)
|
||||
#define PRIM_INDIRECT_ELTS (1<<17)
|
||||
|
||||
#define PRIM3D_TRILIST (0x0<<18)
|
||||
#define PRIM3D_TRISTRIP (0x1<<18)
|
||||
#define PRIM3D_TRISTRIP_RVRSE (0x2<<18)
|
||||
#define PRIM3D_TRIFAN (0x3<<18)
|
||||
#define PRIM3D_POLY (0x4<<18)
|
||||
#define PRIM3D_LINELIST (0x5<<18)
|
||||
#define PRIM3D_LINESTRIP (0x6<<18)
|
||||
#define PRIM3D_RECTLIST (0x7<<18)
|
||||
#define PRIM3D_POINTLIST (0x8<<18)
|
||||
#define PRIM3D_DIB (0x9<<18)
|
||||
#define PRIM3D_MASK (0x1f<<18)
|
||||
|
||||
#define XY_SETUP_BLT_CMD (CMD_2D | (0x01 << 22))
|
||||
|
||||
#define XY_COLOR_BLT_CMD (CMD_2D | (0x50 << 22))
|
||||
|
||||
#define XY_SRC_COPY_BLT_CMD (CMD_2D | (0x53 << 22))
|
||||
|
||||
#define XY_TEXT_IMMEDIATE_BLIT_CMD (CMD_2D | (0x31 << 22))
|
||||
# define XY_TEXT_BYTE_PACKED (1 << 16)
|
||||
|
||||
/* BR00 */
|
||||
#define XY_BLT_WRITE_ALPHA (1 << 21)
|
||||
#define XY_BLT_WRITE_RGB (1 << 20)
|
||||
#define XY_SRC_TILED (1 << 15)
|
||||
#define XY_DST_TILED (1 << 11)
|
||||
|
||||
/* BR13 */
|
||||
#define BR13_8 (0x0 << 24)
|
||||
#define BR13_565 (0x1 << 24)
|
||||
#define BR13_8888 (0x3 << 24)
|
||||
|
||||
#define FENCE_LINEAR 0
|
||||
#define FENCE_XMAJOR 1
|
||||
#define FENCE_YMAJOR 2
|
||||
|
||||
#define SO_NUM_PRIM_STORAGE_NEEDED 0x2280
|
||||
#define SO_PRIM_STORAGE_NEEDED0_IVB 0x5240
|
||||
#define SO_PRIM_STORAGE_NEEDED1_IVB 0x5248
|
||||
#define SO_PRIM_STORAGE_NEEDED2_IVB 0x5250
|
||||
#define SO_PRIM_STORAGE_NEEDED3_IVB 0x5258
|
||||
|
||||
#define SO_NUM_PRIMS_WRITTEN 0x2288
|
||||
#define SO_NUM_PRIMS_WRITTEN0_IVB 0x5200
|
||||
#define SO_NUM_PRIMS_WRITTEN1_IVB 0x5208
|
||||
#define SO_NUM_PRIMS_WRITTEN2_IVB 0x5210
|
||||
#define SO_NUM_PRIMS_WRITTEN3_IVB 0x5218
|
||||
|
||||
#define TIMESTAMP 0x2358
|
||||
Loading…
Add table
Reference in a new issue