vk: Further reduce diff to master

Now that we don't compile GLSL, we can roll back a few more hacks and
unexport some things from the backend compiler.
Signed-off-by: default avatarKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
parent 7c1d20dc
......@@ -311,7 +311,7 @@ brw_init_driver_functions(struct brw_context *brw,
functions->GetSamplePosition = gen6_get_sample_position;
}
void
static void
brw_initialize_context_constants(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
......@@ -390,8 +390,7 @@ brw_initialize_context_constants(struct brw_context *brw)
int max_samples;
const int *msaa_modes = intel_supported_msaa_modes(brw->intelScreen);
const int clamp_max_samples =
brw->optionCache.info != NULL ?
driQueryOptioni(&brw->optionCache, "clamp_max_samples") : -1;
driQueryOptioni(&brw->optionCache, "clamp_max_samples");
if (clamp_max_samples < 0) {
max_samples = msaa_modes[0];
......
......@@ -2075,9 +2075,6 @@ gen6_upload_push_constants(struct brw_context *brw,
struct brw_stage_state *stage_state,
enum aub_state_struct_type type);
void
brw_initialize_context_constants(struct brw_context *brw);
bool
gen9_use_linear_1d_layout(const struct brw_context *brw,
const struct intel_mipmap_tree *mt);
......
......@@ -275,17 +275,14 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.EXT_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
ctx->Extensions.EXT_timer_query = true;
if (brw->bufmgr) {
if (brw->gen == 5 || can_write_oacontrol(brw)) {
ctx->Extensions.AMD_performance_monitor = true;
ctx->Extensions.INTEL_performance_query = true;
}
if (brw->gen == 5 || can_write_oacontrol(brw)) {
ctx->Extensions.AMD_performance_monitor = true;
ctx->Extensions.INTEL_performance_query = true;
}
}
if (brw->gen >= 6) {
ctx->Extensions.ARB_blend_func_extended =
brw->optionCache.info == NULL ||
!driQueryOptionb(&brw->optionCache, "disable_blend_func_extended");
ctx->Extensions.ARB_conditional_render_inverted = true;
ctx->Extensions.ARB_draw_buffers_blend = true;
......@@ -308,9 +305,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.EXT_transform_feedback = true;
ctx->Extensions.OES_depth_texture_cube_map = true;
/* Test if the kernel has the ioctl. */
if (brw->intelScreen->hw_has_timestamp)
ctx->Extensions.ARB_timer_query = true;
ctx->Extensions.ARB_timer_query = brw->intelScreen->hw_has_timestamp;
/* Only enable this in core profile because other parts of Mesa behave
* slightly differently when the extension is enabled.
......@@ -335,8 +330,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_texture_compression_bptc = true;
ctx->Extensions.ARB_texture_view = true;
if (brw->bufmgr &&
can_do_pipelined_register_writes(brw)) {
if (can_do_pipelined_register_writes(brw)) {
ctx->Extensions.ARB_draw_indirect = true;
ctx->Extensions.ARB_transform_feedback2 = true;
ctx->Extensions.ARB_transform_feedback3 = true;
......@@ -365,9 +359,7 @@ intelInitExtensions(struct gl_context *ctx)
if (ctx->API != API_OPENGL_CORE)
ctx->Extensions.ARB_color_buffer_float = true;
if (ctx->Mesa_DXTn ||
(brw->optionCache.info != NULL &&
driQueryOptionb(&brw->optionCache, "force_s3tc_enable")))
if (ctx->Mesa_DXTn || driQueryOptionb(&brw->optionCache, "force_s3tc_enable"))
ctx->Extensions.EXT_texture_compression_s3tc = true;
ctx->Extensions.ANGLE_texture_compression_dxt = true;
......
......@@ -676,8 +676,6 @@ anv_compiler_create(struct anv_device *device)
compiler->device = device;
compiler->brw->optionCache.info = NULL;
compiler->brw->bufmgr = NULL;
compiler->brw->gen = devinfo->gen;
compiler->brw->is_g4x = devinfo->is_g4x;
compiler->brw->is_baytrail = devinfo->is_baytrail;
......@@ -709,15 +707,9 @@ anv_compiler_create(struct anv_device *device)
ctx = &compiler->brw->ctx;
_mesa_init_shader_object_functions(&ctx->Driver);
_mesa_init_constants(&ctx->Const, API_OPENGL_CORE);
/* Set dd::NewShader */
brwInitFragProgFuncs(&ctx->Driver);
/* brw_select_clip_planes() needs this for bogus reasons. */
ctx->_Shader = &compiler->pipeline;
compiler->brw->precompile = false;
return compiler;
fail:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment