[Mesa-dev] [PATCH v2 06/52] st/nine: Fix D3DRS_POINTSPRITE support

Axel Davy axel.davy at ens.fr
Sat Jan 10 02:29:54 PST 2015


From: Xavier Bouchoux <xavierb at gmail.com>

It's done by testing the existence of the point sprite output register *after* parsing the vertex shader.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: David Heidelberg <david at ixit.cz>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb at gmail.com>

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
---
 src/gallium/state_trackers/nine/nine_shader.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index c2a0f4d..fcc1c68 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -2842,9 +2842,6 @@ nine_translate_shader(struct NineDevice9 *device, struct nine_shader_info *info)
             ureg_property(tx->ureg, TGSI_PROPERTY_FS_COORD_PIXEL_CENTER, TGSI_FS_COORD_PIXEL_CENTER_INTEGER);
     }
 
-    if (!ureg_dst_is_undef(tx->regs.oPts))
-        info->point_size = TRUE;
-
     while (!sm1_parse_eof(tx))
         sm1_parse_instruction(tx);
     tx->parse++; /* for byte_size */
@@ -2860,6 +2857,9 @@ nine_translate_shader(struct NineDevice9 *device, struct nine_shader_info *info)
 
     ureg_END(tx->ureg);
 
+    if (IS_VS && !ureg_dst_is_undef(tx->regs.oPts))
+        info->point_size = TRUE;
+
     if (debug_get_bool_option("NINE_TGSI_DUMP", FALSE)) {
         unsigned count;
         const struct tgsi_token *toks = ureg_get_tokens(tx->ureg, &count);
-- 
2.1.0



More information about the mesa-dev mailing list