intel: make intel_ir opaque
It is just gl_shader_program in the end, and we want gl_shader_program to be
opaque. This also forces the driver to correctly use intel_pipeline_shader
instead of intel_ir.
With the change, xglCreateShader() now asks the compiler to compile BIL into
intel_ir. Later when the pipeline is created, the intel_ir is passed to the
compiler again to generate the binary kernel as well as metadata.
diff --git a/icd/intel/shader.h b/icd/intel/shader.h
index 4aaca94..48febbe 100644
--- a/icd/intel/shader.h
+++ b/icd/intel/shader.h
@@ -31,39 +31,13 @@
#include "intel.h"
#include "obj.h"
-#include "compiler/mesa-utils/src/mesa/main/mtypes.h"
-enum intel_shader_use {
- INTEL_SHADER_USE_VID = (1 << 0),
- INTEL_SHADER_USE_IID = (1 << 1),
-
- INTEL_SHADER_USE_KILL = (1 << 2),
- INTEL_SHADER_USE_COMPUTED_DEPTH = (1 << 3),
- INTEL_SHADER_USE_DEPTH = (1 << 4),
- INTEL_SHADER_USE_W = (1 << 5),
-};
-
-struct intel_ir {
- void *kernel;
- XGL_SIZE size;
- struct gl_shader_program *shader_program;
-};
+struct intel_ir;
struct intel_shader {
struct intel_obj obj;
struct intel_ir *ir;
- XGL_FLAGS uses;
-
- XGL_UINT in_count;
- XGL_UINT out_count;
-
- XGL_UINT sampler_count;
- XGL_UINT surface_count;
-
- XGL_UINT urb_grf_start;
-
- XGL_FLAGS barycentric_interps;
};
static inline struct intel_shader *intel_shader(XGL_SHADER shader)