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

2013-10-25 Thread Liu Xin
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) statement-no-new-scope Variables declared in for-init-statement or condition are only

[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 () syntax

[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

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 liu...@icubecorp.com 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-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

[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

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 don't

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

2012-10-06 Thread Liu Xin
with android and mesa. thanks, --lx On Thu, Oct 4, 2012 at 11:04 PM, Alex Deucher alexdeuc...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:53 AM, Tom Stellard t...@stellard.net wrote: On Thu, Oct 04, 2012 at 10:42:45PM +0800, Liu Xin wrote: Hi, Tom, thank you for your instant response. we

[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

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

2012-10-04 Thread Liu Xin
, Liu Xin wrote: 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