mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
r600g/cayman: handle empty vertex shaders
Some of the geom shader tests produce an empty vertex shader,
on cayman we'd crash in the finaliser because last_cf was NULL.
cayman doesn't need the NOP workaround, so if the code arrives
here with no last_cf, just emit an END.
fixes crashes in a bunch of piglit geom shader tests.
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 4e520101e6)
This commit is contained in:
parent
9bd73a81d9
commit
410a6bae6a
1 changed files with 8 additions and 4 deletions
|
|
@ -83,14 +83,18 @@ int bc_finalizer::run() {
|
|||
last_cf = c;
|
||||
}
|
||||
|
||||
if (last_cf->bc.op_ptr->flags & CF_ALU) {
|
||||
if (!ctx.is_cayman() && last_cf->bc.op_ptr->flags & CF_ALU) {
|
||||
last_cf = sh.create_cf(CF_OP_NOP);
|
||||
sh.root->push_back(last_cf);
|
||||
}
|
||||
|
||||
if (ctx.is_cayman())
|
||||
last_cf->insert_after(sh.create_cf(CF_OP_CF_END));
|
||||
else
|
||||
if (ctx.is_cayman()) {
|
||||
if (!last_cf) {
|
||||
cf_node *c = sh.create_cf(CF_OP_CF_END);
|
||||
sh.root->push_back(c);
|
||||
} else
|
||||
last_cf->insert_after(sh.create_cf(CF_OP_CF_END));
|
||||
} else
|
||||
last_cf->bc.end_of_program = 1;
|
||||
|
||||
for (unsigned t = EXP_PIXEL; t < EXP_TYPE_COUNT; ++t) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue