Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: media-libs/mesa/files/7.9-conditional-discards.patch

Issue 5925002: Switch to Mesa 7.9. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromiumos-overlay.git@master
Patch Set: Switch to Mesa 7.9 version 2. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 From ead2ea89f42b40edc56ddf8c6ce1df4efdcefe2a Mon Sep 17 00:00:00 2001
2 From: Marek Olšák <maraeo@gmail.com>
3 Date: Thu, 25 Nov 2010 11:13:36 +0000
4 Subject: ir_to_mesa: Add support for conditional discards.
5
6 NOTE: This is a candidate for the 7.9 branch.
7
8 Signed-off-by: Marek Olšák <maraeo@gmail.com>
9 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
10 ---
11 diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
12 index 8f75c82..5dd602f 100644
13 --- a/src/mesa/program/ir_to_mesa.cpp
14 +++ b/src/mesa/program/ir_to_mesa.cpp
15 @@ -2166,9 +2166,14 @@ ir_to_mesa_visitor::visit(ir_discard *ir)
16 {
17 struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog;
18
19 - assert(ir->condition == NULL); /* FINISHME */
20 + if (ir->condition) {
21 + ir->condition->accept(this);
22 + this->result.negate = ~this->result.negate;
23 + ir_to_mesa_emit_op1(ir, OPCODE_KIL, ir_to_mesa_undef_dst, this->result);
24 + } else {
25 + ir_to_mesa_emit_op0(ir, OPCODE_KIL_NV);
26 + }
27
28 - ir_to_mesa_emit_op0(ir, OPCODE_KIL_NV);
29 fp->UsesKill = GL_TRUE;
30 }
31
32 --
33 cgit v0.8.3-6-g21f6
OLDNEW
« no previous file with comments | « media-libs/mesa/files/7.9-can_inline.patch ('k') | media-libs/mesa/files/7.9-get-maxsamples.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698