Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-09 Thread Brian Paul
On 03/09/2012 08:38 AM, Vic Lee wrote: On 03/09/2012 11:19 PM, Brian Paul wrote: Vic, it looks like your code is slightly out of date. In current git/master, line 148 reads: unsigned generic_inputs = svga->curr.fs ? svga->curr.fs->generic_inputs : 0; Zack added the null ptr check in January wi

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-09 Thread Vic Lee
On 03/09/2012 11:19 PM, Brian Paul wrote: Vic, it looks like your code is slightly out of date. In current git/master, line 148 reads: unsigned generic_inputs = svga->curr.fs ? svga->curr.fs->generic_inputs : 0; Zack added the null ptr check in January with commit cff0eac702

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-09 Thread Brian Paul
On 03/08/2012 08:16 AM, Vic Lee wrote: Hi Brian, Please the the gdb backtrace if I only add vs check. Maybe you have a better idea on this issue. I am using the git 8.0 branch. vic@debian:~/mesa/src/gallium$ git diff diff --git a/src/gallium/drivers/svga/svga_st

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-08 Thread Vic Lee
Hi Brian, Please the the gdb backtrace if I only add vs check. Maybe you have a better idea on this issue. I am using the git 8.0 branch. vic@debian:~/mesa/src/gallium$ git diff diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/driver

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-07 Thread Brian Paul
On 03/07/2012 10:01 AM, Vic Lee wrote: Hi Brian, On 03/07/2012 11:44 PM, Brian Paul wrote: On 03/07/2012 01:08 AM, Vic Lee wrote: Hi Brian, I created a smallest possible test case to reproduce the segfault, as attached. OK, I was assuming that you found this with an OpenGL program, not with

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-07 Thread Vic Lee
Hi Brian, On 03/07/2012 11:44 PM, Brian Paul wrote: On 03/07/2012 01:08 AM, Vic Lee wrote: Hi Brian, I created a smallest possible test case to reproduce the segfault, as attached. OK, I was assuming that you found this with an OpenGL program, not with a custom direct-to-gallium program. Rig

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-07 Thread Brian Paul
On 03/07/2012 01:08 AM, Vic Lee wrote: Hi Brian, I created a smallest possible test case to reproduce the segfault, as attached. OK, I was assuming that you found this with an OpenGL program, not with a custom direct-to-gallium program. Please see file header on how I compile it. vs and f

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-07 Thread Vic Lee
Hi Brian, I created a smallest possible test case to reproduce the segfault, as attached. Please see file header on how I compile it. vs and fs both needs to be checked to avoid the segfault. If I replace the screen creation part to use swrast or r600, they both work fine. Thanks. Vic On

Re: [Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-05 Thread Brian Paul
On 03/03/2012 04:17 AM, Vic Lee wrote: This patch fix segfault if an application clears a render target before setting any vertex or fragment shaders, which is a legal situation. I can't seem to trigger this problem with a test program. Can you post a test case? The first part of your patch

[Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

2012-03-03 Thread Vic Lee
This patch fix segfault if an application clears a render target before setting any vertex or fragment shaders, which is a legal situation. Vic >From 1de6aa23d3e472db7deb819e52b1f75ac09fca55 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Sat, 3 Mar 2012 05:57:16 -0500 Subject: [PATCH] svga: Check