{
.driver_name = "iris",
.create_screen = pipe_iris_create_screen,
- .configuration = pipe_default_configuration_query,
+ .configuration = pipe_iris_configuration_query,
},
{
.driver_name = "nouveau",
{
struct pipe_screen *screen;
- screen = iris_drm_screen_create(fd);
+ screen = iris_drm_screen_create(fd, config);
return screen ? debug_screen_wrap(screen) : NULL;
}
+const struct drm_conf_ret *
+pipe_iris_configuration_query(enum drm_conf conf)
+{
+ static const struct drm_conf_ret xml_options_ret = {
+ .type = DRM_CONF_POINTER,
+ .val.val_pointer =
+#include "iris/iris_driinfo.h"
+ };
+
+ switch (conf) {
+ case DRM_CONF_XML_OPTIONS:
+ return &xml_options_ret;
+ default:
+ break;
+ }
+ return pipe_default_configuration_query(conf);
+}
+
#else
struct pipe_screen *
return NULL;
}
+const struct drm_conf_ret *
+pipe_iris_configuration_query(enum drm_conf conf)
+{
+ return NULL;
+}
+
#endif
#ifdef GALLIUM_NOUVEAU
struct pipe_screen *
pipe_iris_create_screen(int fd, const struct pipe_screen_config *config);
+const struct drm_conf_ret *
+pipe_iris_configuration_query(enum drm_conf conf);
struct pipe_screen *
pipe_nouveau_create_screen(int fd, const struct pipe_screen_config *config);
include $(CLEAR_VARS)
LOCAL_MODULE := libmesa_pipe_iris
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir)
+
+LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/iris/,$(GENERATED_SOURCES))
+
+GEN_DRIINFO_INPUTS := \
+ $(MESA_TOP)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \
+ $(LOCAL_PATH)/driinfo_iris.h
+
+MERGE_DRIINFO := $(MESA_TOP)/src/util/merge_driinfo.py
+
+$(intermediates)/iris/si_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)
+ @mkdir -p $(dir $@)
+ @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ $(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(RM) $@; false)
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
LOCAL_SRC_FILES := \
$(IRIS_C_SOURCES)
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+GENERATED_SOURCES := \
+ iris_driinfo.h
+
IRIS_C_SOURCES = \
+ $(GENERATED_SOURCES) \
+ driinfo_iris.h \
iris_batch.c \
iris_batch.h \
iris_binder.c \
--- /dev/null
+// iris specific driconf options
}
struct pipe_screen *
-iris_screen_create(int fd)
+iris_screen_create(int fd, const struct pipe_screen_config *config)
{
struct iris_screen *screen = rzalloc(NULL, struct iris_screen);
if (!screen)
struct iris_bo *workaround_bo;
};
-struct pipe_screen *iris_screen_create(int fd);
+struct pipe_screen *
+iris_screen_create(int fd, const struct pipe_screen_config *config);
boolean
iris_is_format_supported(struct pipe_screen *pscreen,
# SOFTWARE.
files_libiris = files(
+ 'driinfo_iris.h',
'iris_batch.c',
'iris_batch.h',
'iris_binder.c',
'iris_screen.h',
)
+iris_driinfo_h = custom_target(
+ 'iris_driinfo.h',
+ input : files(
+ '../../../util/merge_driinfo.py',
+ '../../auxiliary/pipe-loader/driinfo_gallium.h', 'driinfo_iris.h'
+ ),
+ output : 'iris_driinfo.h',
+ command : [prog_python, '@INPUT@'],
+ capture : true,
+)
+
iris_gen_libs = []
foreach v : ['80', '90', '100', '110']
iris_gen_libs += static_library(
libiris = static_library(
'iris',
- [files_libiris, gen_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+ [files_libiris, gen_xml_pack, nir_opcodes_h, nir_builder_opcodes_h,
+ iris_driinfo_h],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_intel, inc_nir,
inc_gallium_drivers,
driver_iris = declare_dependency(
compile_args : '-DGALLIUM_IRIS',
+ sources : iris_driinfo_h,
link_with : [libiris, libiriswinsys],
)
#define IRIS_DRM_PUBLIC_H
struct pipe_screen;
+struct pipe_screen_config;
-struct pipe_screen *iris_drm_screen_create(int drm_fd);
+struct pipe_screen *
+iris_drm_screen_create(int drm_fd, const struct pipe_screen_config *config);
#endif /* IRIS_DRM_PUBLIC_H */
#include "iris/iris_screen.h"
struct pipe_screen *
-iris_drm_screen_create(int fd)
+iris_drm_screen_create(int fd, const struct pipe_screen_config *config)
{
- return iris_screen_create(fcntl(fd, F_DUPFD_CLOEXEC, 3));
+ return iris_screen_create(fcntl(fd, F_DUPFD_CLOEXEC, 3), config);
}