mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
i965/vs: Fix NULL pointer dereference in pre-Gen6 push constant loading.
According to the comment, we need to load /some/ push constants on pre-Gen6 hardware or the GPU will hang. The existing code set these bogus parameters to NULL pointers; unfortunately, the code in brw_curbe.c that loads them dereferences those pointers. So, change them to be pointers to an actual floating point value of 0.0. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
7fdbedac14
commit
ee41383ab3
1 changed files with 2 additions and 2 deletions
|
|
@ -117,8 +117,8 @@ vec4_visitor::setup_uniforms(int reg)
|
|||
|
||||
for (unsigned int i = 0; i < 4; i++) {
|
||||
unsigned int slot = this->uniforms * 4 + i;
|
||||
|
||||
c->prog_data.param[slot] = NULL;
|
||||
static float zero = 0.0;
|
||||
c->prog_data.param[slot] = &zero;
|
||||
}
|
||||
|
||||
this->uniforms++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue