boolean has_stream_out;
boolean has_stencil_export;
boolean has_texture_multisample;
+ boolean cached_all_shaders;
/* The Draw module overrides these functions.
* Always create the blitter before Draw. */
struct pipe_context *pipe = ctx->base.pipe;
if (!ctx->fs_empty) {
+ assert(!ctx->cached_all_shaders);
ctx->fs_empty = util_make_empty_fragment_shader(pipe);
}
struct pipe_context *pipe = ctx->base.pipe;
if (!ctx->fs_write_one_cbuf) {
+ assert(!ctx->cached_all_shaders);
ctx->fs_write_one_cbuf =
util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
TGSI_INTERPOLATE_CONSTANT, FALSE);
struct pipe_context *pipe = ctx->base.pipe;
if (!ctx->fs_write_all_cbufs) {
+ assert(!ctx->cached_all_shaders);
ctx->fs_write_all_cbufs =
util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
TGSI_INTERPOLATE_CONSTANT, TRUE);
shader = &ctx->fs_resolve[target][index][filter];
if (!*shader) {
+ assert(!ctx->cached_all_shaders);
if (filter == PIPE_TEX_FILTER_LINEAR) {
*shader = util_make_fs_msaa_resolve_bilinear(pipe, tgsi_tex,
src_nr_samples,
/* Create the fragment shader on-demand. */
if (!*shader) {
+ assert(!ctx->cached_all_shaders);
*shader = util_make_fs_blit_msaa_color(pipe, tgsi_tex);
}
}
/* Create the fragment shader on-demand. */
if (!*shader) {
+ assert(!ctx->cached_all_shaders);
*shader = util_make_fragment_tex_shader(pipe, tgsi_tex,
TGSI_INTERPOLATE_LINEAR);
}
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
- nr_samples);
-
- *shader =
- util_make_fs_blit_msaa_depth(pipe, tgsi_tex);
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
+ *shader = util_make_fs_blit_msaa_depth(pipe, tgsi_tex);
}
return *shader;
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
-
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
*shader =
util_make_fragment_tex_shader_writedepth(pipe, tgsi_tex,
TGSI_INTERPOLATE_LINEAR);
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
- nr_samples);
-
- *shader =
- util_make_fs_blit_msaa_depthstencil(pipe, tgsi_tex);
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
+ *shader = util_make_fs_blit_msaa_depthstencil(pipe, tgsi_tex);
}
return *shader;
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
-
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
*shader =
util_make_fragment_tex_shader_writedepthstencil(pipe, tgsi_tex,
TGSI_INTERPOLATE_LINEAR);
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
- nr_samples);
-
- *shader =
- util_make_fs_blit_msaa_stencil(pipe, tgsi_tex);
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
+ *shader = util_make_fs_blit_msaa_stencil(pipe, tgsi_tex);
}
return *shader;
/* Create the fragment shader on-demand. */
if (!*shader) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
-
+ unsigned tgsi_tex;
+ assert(!ctx->cached_all_shaders);
+ tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
*shader =
util_make_fragment_tex_shader_writestencil(pipe, tgsi_tex,
TGSI_INTERPOLATE_LINEAR);
}
}
}
+
+ ctx->cached_all_shaders = TRUE;
}
static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx,