#include "util/u_transfer_helper.h"
#include "util/u_upload_mgr.h"
#include "util/ralloc.h"
+#include "util/xmlconfig.h"
#include "drm-uapi/i915_drm.h"
#include "iris_context.h"
#include "iris_defines.h"
brw_process_intel_debug_variable();
+ screen->driconf.dual_color_blend_by_location =
+ driQueryOptionb(config->options, "dual_color_blend_by_location");
+
screen->precompile = env_var_as_boolean("shader_precompile", true);
isl_device_init(&screen->isl_dev, &screen->devinfo, false);
/** Precompile shaders at link time? (Can be disabled for debugging.) */
bool precompile;
+ /** driconf options and application workarounds */
+ struct {
+ /** Dual color blend by location instead of index (for broken apps) */
+ bool dual_color_blend_by_location;
+ } driconf;
+
unsigned subslice_total;
struct gen_device_info devinfo;
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
+#include "util/u_dual_blend.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_framebuffer.h"
/** Bitfield of whether color writes are enabled for RT[i] */
uint8_t color_write_enables;
+
+ /** Does RT[0] use dual color blending? */
+ bool dual_color_blending;
};
static enum pipe_blendfactor
/* bl.AlphaTestEnable and bs.AlphaTestFunction are filled in later. */
}
+ cso->dual_color_blending = util_blend_state_is_dual(state, 0);
return cso;
}
iris_populate_fs_key(const struct iris_context *ice,
struct brw_wm_prog_key *key)
{
+ struct iris_screen *screen = (void *) ice->ctx.screen;
const struct pipe_framebuffer_state *fb = &ice->state.framebuffer;
const struct iris_depth_stencil_alpha_state *zsa = ice->state.cso_zsa;
const struct iris_rasterizer_state *rast = ice->state.cso_rast;
key->coherent_fb_fetch = true;
+ key->force_dual_color_blend =
+ screen->driconf.dual_color_blend_by_location &&
+ (blend->blend_enables & 1) && blend->dual_color_blending;
+
/* TODO: support key->force_dual_color_blend for Unigine */
/* TODO: Respect glHint for key->high_quality_derivatives */
}