[Mesa-dev] [PATCH] st/mesa: remove st_context::missing textures and get_passthrough_fs
Marek Olšák
maraeo at gmail.com
Tue Jul 28 11:44:50 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/state_tracker/st_atom_shader.c | 29 ++---------------------------
src/mesa/state_tracker/st_context.h | 1 -
2 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index d27882d..fee15a9 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -50,24 +50,6 @@
/**
- * Return pointer to a pass-through fragment shader.
- * This shader is used when a texture is missing/incomplete.
- */
-static void *
-get_passthrough_fs(struct st_context *st)
-{
- if (!st->passthrough_fs) {
- st->passthrough_fs =
- util_make_fragment_passthrough_shader(st->pipe, TGSI_SEMANTIC_COLOR,
- TGSI_INTERPOLATE_PERSPECTIVE,
- TRUE);
- }
-
- return st->passthrough_fs;
-}
-
-
-/**
* Update fragment program state/atom. This involves translating the
* Mesa fragment program into a gallium fragment program and binding it.
*/
@@ -96,15 +78,8 @@ update_fp( struct st_context *st )
st_reference_fragprog(st, &st->fp, stfp);
- if (st->missing_textures) {
- /* use a pass-through frag shader that uses no textures */
- void *fs = get_passthrough_fs(st);
- cso_set_fragment_shader_handle(st->cso_context, fs);
- }
- else {
- cso_set_fragment_shader_handle(st->cso_context,
- st->fp_variant->driver_shader);
- }
+ cso_set_fragment_shader_handle(st->cso_context,
+ st->fp_variant->driver_shader);
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 48c9b6f..81d5480 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -140,7 +140,6 @@ struct st_context
struct st_state_flags dirty;
- GLboolean missing_textures;
GLboolean vertdata_edgeflags;
GLboolean edgeflag_culls_prims;
--
2.1.4
More information about the mesa-dev
mailing list