summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-10-19 13:51:28 -0700
committerCorbin Simpson <[email protected]>2009-10-19 14:43:33 -0700
commite5f1f6a0bece3d035bf5ac1685b5335af4862cea (patch)
tree77d9b464bfa9188b53cad706e1e6941c4de180fc /src/gallium
parent973aab1a528f0a42e8b5e979b4730649ea366363 (diff)
r300g: Demonstratory kludge to unbreak glxgears.
We *must* recalculate something in vformat every rebind; let's see if we can't narrow it down a bit.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 1468b9d36ed..5df1a0cd635 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -460,32 +460,36 @@ static void r300_update_derived_shader_state(struct r300_context* r300)
value = (struct r300_shader_derived_value*)
util_hash_table_get(r300->shader_hash_table, (void*)key);
if (value) {
- vformat = value->vformat;
+ //vformat = value->vformat;
rs_block = value->rs_block;
FREE(key);
} else {
- vformat = CALLOC_STRUCT(r300_vertex_format);
rs_block = CALLOC_STRUCT(r300_rs_block);
value = CALLOC_STRUCT(r300_shader_derived_value);
- for (i = 0; i < 16; i++) {
- vformat->vs_tab[i] = -1;
- vformat->fs_tab[i] = -1;
- }
-
- r300_vs_tab_routes(r300, vformat);
- r300_vertex_psc(r300, vformat);
- r300_update_fs_tab(r300, vformat);
-
r300_update_rs_block(r300, rs_block);
- value->vformat = vformat;
+ //value->vformat = vformat;
value->rs_block = rs_block;
util_hash_table_set(r300->shader_hash_table,
(void*)key, (void*)value);
}
+ /* XXX This will be refactored ASAP. */
+ vformat = CALLOC_STRUCT(r300_vertex_format);
+
+ for (i = 0; i < 16; i++) {
+ vformat->vs_tab[i] = -1;
+ vformat->fs_tab[i] = -1;
+ }
+
+ r300_vs_tab_routes(r300, vformat);
+ r300_vertex_psc(r300, vformat);
+ r300_update_fs_tab(r300, vformat);
+
+ FREE(r300->vertex_info);
+
r300->vertex_info = vformat;
r300->rs_block = rs_block;
r300->dirty_state |= (R300_NEW_VERTEX_FORMAT | R300_NEW_RS_BLOCK);