diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-04-07 14:37:42 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2014-06-26 15:37:14 +0300 |
commit | db081b497e42556f9f6d771de104bea948c925b5 (patch) | |
tree | 0f20cf1d428f5bf494cc44c376e12fb2189ed8cf /src/mesa | |
parent | 78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8 (diff) |
i965/fs: Check variable_storage return value in fs_visitor::visit
check variable_storage() found the requested fs_reg.
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 6352739e794..654f5fec593 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -155,6 +155,12 @@ void fs_visitor::visit(ir_dereference_variable *ir) { fs_reg *reg = variable_storage(ir->var); + + if (!reg) { + fail("Failed to find variable storage for %s\n", ir->var->name); + this->result = fs_reg(reg_null_d); + return; + } this->result = *reg; } |