mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
i965/gs: Set GS prog_data to NULL if there is no GS program.
The previous commit fixes a bug wherein we would incorrectly refer to
stale geometry shader prog_data when no geometry shader was active.
This patch reduces the likelihood of that sort of bug occurring in the
future by setting prog_data to NULL whenever there is no GS program.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 37bdde1087)
This commit is contained in:
parent
d963daa380
commit
756b4f9a8c
1 changed files with 7 additions and 0 deletions
|
|
@ -259,6 +259,13 @@ brw_upload_gs_prog(struct brw_context *brw)
|
|||
brw->vue_map_geom_out = brw->vue_map_vs;
|
||||
brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
|
||||
}
|
||||
|
||||
/* Other state atoms had better not try to access prog_data, since
|
||||
* there's no GS program.
|
||||
*/
|
||||
brw->gs.prog_data = NULL;
|
||||
brw->gs.base.prog_data = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue