Re: [Mesa-dev] [glsl] indvar in ir_loop

2013-10-25 Thread Liu Xin
body_instructions); if (s == visit_stop) return s; * * thanks, --lx On 10/12/2013 05:39 AM, Ian Romanick wrote: On 10/10/2013 11:14 PM, Liu Xin wrote: Hi, Mesa developers, According to glsl v1.0, we have loop construct: for (for-init-statement; condition(opt); expression) stateme

[Mesa-dev] [glsl] indvar in ir_loop

2013-10-11 Thread Liu Xin
Hi, Mesa developers, According to glsl v1.0, we have loop construct: for (for-init-statement; condition(opt); expression) statement-no-new-scope Variables declared in for-init-statement or condition are only in scope until the end of the statement-no-new-scope of the for loop. let's assume I

Re: [Mesa-dev] obtain def-use chain in glsl s-expression

2013-08-29 Thread Liu Xin
On 08/28/2013 11:17 PM, Kenneth Graunke wrote: On 08/27/2013 11:34 PM, Liu Xin wrote: Hi, Mesa community, I am not familiar with S-expression or other forms of lisp languages. That's OK - the IR has no resemblance to actual Scheme or Lisp programming. We just print and read the () s

[Mesa-dev] obtain def-use chain in glsl s-expression

2013-08-28 Thread Liu Xin
Hi, Mesa community, I am not familiar with S-expression or other forms of lisp languages. I am working on GLSL IR transformation. for example, i want to change a variable to a array of same type. By now , i can find the definition of a variable. How can i update all uses of this variable in

Re: [Mesa-dev] void operation in glsl

2013-08-26 Thread Liu Xin
On 08/26/2013 02:42 PM, Matt Turner wrote: On Sun, Aug 25, 2013 at 10:07 PM, Liu Xin wrote: HI, list, i don't understand why glsl source have so many 'cast to void' operations, like this. ir_rvalue * ast_node::hir(exec_list *instructions, struct _mesa_glsl_par

[Mesa-dev] void operation in glsl

2013-08-25 Thread Liu Xin
HI, list, i don't understand why glsl source have so many 'cast to void' operations, like this. ir_rvalue * ast_node::hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) { (void) instructions; (void) state; return NULL; } i think it's totally void operatio

Re: [Mesa-dev] how mesa glsl compiler generate ir_texture

2013-08-22 Thread Liu Xin
Kenneth, thank you for your guide. mesa code is much clearer for me now. --lx On 08/23/2013 02:07 AM, Kenneth Graunke wrote: On 08/22/2013 02:59 AM, Liu Xin wrote: Dear list, i wonder if all vendors in mesa3d use intel's glsl compiler now? by browsing glsl source code, i still

[Mesa-dev] how mesa glsl compiler generate ir_texture

2013-08-22 Thread Liu Xin
Dear list, i wonder if all vendors in mesa3d use intel's glsl compiler now? by browsing glsl source code, i still don't understand how it generates ir_texture. in my idea, it treats it as normal function call. for example, this is tiny fragment shader: uniform sampler2D sampler2d; varying me

Re: [Mesa-dev] how to run gallium/tests/trivial/compute.c on r600

2012-11-11 Thread Liu Xin
f578fa47ed491d Author: Nico Weber Date: Sun Nov 11 01:35:05 2012 + FileCheckize test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@16768091177308-0d34-0410-b5e6-96231b3b80d8 thanks, --lx On Tue, Oct 9, 2012 at 9:44 PM, Tom Stellard wrote: > On Fri, Oct 05, 2012

Re: [Mesa-dev] how to run gallium/tests/trivial/compute.c on r600

2012-10-06 Thread Liu Xin
android and mesa. thanks, --lx On Thu, Oct 4, 2012 at 11:04 PM, Alex Deucher wrote: > On Thu, Oct 4, 2012 at 10:53 AM, Tom Stellard wrote: > > On Thu, Oct 04, 2012 at 10:42:45PM +0800, Liu Xin wrote: > >> Hi, Tom, > >> > >> thank you for your instant re

Re: [Mesa-dev] how to run gallium/tests/trivial/compute.c on r600

2012-10-04 Thread Liu Xin
Hi, Tom, thank you for your instant response. we decide to try clover for r600. it should work on ubuntu(11.10), right? have you refined tgsi compiler for r600? thanks, --lx On Thu, Oct 4, 2012 at 9:42 PM, Tom Stellard wrote: > On Wed, Oct 03, 2012 at 08:15:07PM +0800, Liu Xin wr

[Mesa-dev] how to run gallium/tests/trivial/compute.c on r600

2012-10-04 Thread Liu Xin
Hi, Gallium Hackers, We are working on Gallium3D on android-x86, APU. We want to run general compute programs on r600 GPU, specifically, "Radeon HD6310(Evergreen family)". The first thing drawn our eyes are gallium/tests/trivial/compute.c because it calls general compute APIs and attempts to exec