Re: [Mesa-dev] [ Open source project]

2014-06-18 Thread Roshan Chaudhari
Thanks that was helpful.!


On Tue, Jun 17, 2014 at 12:35 PM, Thomas Helland thomashellan...@gmail.com
wrote:

 Hi Roshan,

 I've just gotten into the game myself, so I guess i can provide some
 newbie-info.
 I guess by the list you are referring to the suggestions for GSoC
 projects posted.
 I think the application date for GSoC is long passed (so no pay :/ ),
 but I don't think anyone will bash you for taking on the work if you want
 to.
 Just in case you haven't seen there's also the newbie-projects page[1].
 There might be some smaller interesting projects there to.
 These are not to difficult, and will get you accustomed to
 the community, review-process, submitting patches, etc

 I would love to be proven wrong, but I think the best source of
 documentation is
 poking around in the source code. There's also some documentation at [2].
 There's also a readme-file in the glsl-directory explaining a bit the IR /
 compiler.

 The shader-compiler does a lot of optimization passes over the supplied
 shaders,
 trying to do things like dead-code elimination, cse, algebraic
 optimizations, etc.
 As of now I think (but I'm not sure) this is done more or less randomly.
 Try a bunch of them multiple times, until there's no proof that we're
 getting further.

 The static ordering part you are referring to i think is basically the
 following:
 Find a defined sequence that you can perform these passes
 (maybe repeat some of them multiple times), a defined number of times, that
 when completed yields a result that is as good as today's solution;
 1. Less or equal amount of instructions
 2. Less or equal time to compile shaders.

 Let's say, as an example, dead-code elimination to get rid of some cruft,
 then do some algebraic optimizations, then some constant propagation,
 followed by more dead-code elimination, then cse, then repeat everything 2
 times.
 Basically trying out a lot of sequences, and testing the results.

 For testing you should use a toolkit to verify your results.
 This can be done by compiling mesa with debug-symbols, and using shader-db
 [3].
 Shader-db does a compilation of a boatload of shaders, and reports time
 spent
 compiling them along with the end instruction count for each.
 Obviously startup-times and FPS in shader-heavy games like Dota2
 are also always a nice addition.

 I will not guarantee that what I've written here is 100% correct, and I'm
 not really in a position to give any more details than that, as I'm really
 new to the game myself, and just getting my feet wet with some
 code-cleanups.

 [1] http://wiki.freedesktop.org/dri/NewbieProjects/
 [2] http://mesa3d.org/
 [3] http://cgit.freedesktop.org/~anholt/shader-db

 regard,
 Thomas

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ Open source project]

2014-06-17 Thread Thomas Helland
Hi Roshan,

I've just gotten into the game myself, so I guess i can provide some
newbie-info.
I guess by the list you are referring to the suggestions for GSoC
projects posted.
I think the application date for GSoC is long passed (so no pay :/ ),
but I don't think anyone will bash you for taking on the work if you want
to.
Just in case you haven't seen there's also the newbie-projects page[1].
There might be some smaller interesting projects there to.
These are not to difficult, and will get you accustomed to
the community, review-process, submitting patches, etc

I would love to be proven wrong, but I think the best source of
documentation is
poking around in the source code. There's also some documentation at [2].
There's also a readme-file in the glsl-directory explaining a bit the IR /
compiler.

The shader-compiler does a lot of optimization passes over the supplied
shaders,
trying to do things like dead-code elimination, cse, algebraic
optimizations, etc.
As of now I think (but I'm not sure) this is done more or less randomly.
Try a bunch of them multiple times, until there's no proof that we're
getting further.

The static ordering part you are referring to i think is basically the
following:
Find a defined sequence that you can perform these passes
(maybe repeat some of them multiple times), a defined number of times, that
when completed yields a result that is as good as today's solution;
1. Less or equal amount of instructions
2. Less or equal time to compile shaders.

Let's say, as an example, dead-code elimination to get rid of some cruft,
then do some algebraic optimizations, then some constant propagation,
followed by more dead-code elimination, then cse, then repeat everything 2
times.
Basically trying out a lot of sequences, and testing the results.

For testing you should use a toolkit to verify your results.
This can be done by compiling mesa with debug-symbols, and using shader-db
[3].
Shader-db does a compilation of a boatload of shaders, and reports time
spent
compiling them along with the end instruction count for each.
Obviously startup-times and FPS in shader-heavy games like Dota2
are also always a nice addition.

I will not guarantee that what I've written here is 100% correct, and I'm
not really in a position to give any more details than that, as I'm really
new to the game myself, and just getting my feet wet with some
code-cleanups.

[1] http://wiki.freedesktop.org/dri/NewbieProjects/
[2] http://mesa3d.org/
[3] http://cgit.freedesktop.org/~anholt/shader-db

regard,
Thomas
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [ Open source project]

2014-06-17 Thread Alan Coopersmith

On 06/17/14 12:35 PM, Thomas Helland wrote:

I think the application date for GSoC is long passed (so no pay :/ ),


Yes - we're about to hit the midpoint of GSoC - applications were done months
ago, selections made already, and students should be making good progress by
now.

The X.Org Foundation does offer a more flexible timeline for EVoC projects,
which can include Mesa work, but it's also a bit late if someone was applying
for EVoC for the summer now, as the typical turnaround of a month to put
together an application and get it approved would not leave much time left to
do the work before the next school term begins in most places.  (It's not
impossible to apply still, if your next school term doesn't start until later
in the year, just less likely for most students to make the schedule work.)

(And a month may be on the short side if you aren't already familiar with Mesa,
 to take into account learning enough about the project to be able to determine
 what a reasonable proposal could cover in the time alloted and do the usual
 submission of a patch or two first to show you have enough skills with the
 tools, code,  programming language to make a start at it.  People already
 working with the code base have less to learn and work through there than
 those coming at it for the first time.)

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 X.Org Foundation, Board of Directors  -  http://www.x.org/

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ Open source project]

2014-06-16 Thread Roshan Chaudhari
Hi,
I am new to mesa and interested in working on open source project.
I have good knowledge about OpenGL and GLSL functionality. From the list, I
want to work on Improved application of GLSL compiler optimization .

What should I do to pick it? Can you help me with some documentation which
can be useful for accomplishing the task ? Also, I am unclear about the
second point in the description
 Find a static ordering, with possible repeats, of optimization passes
that does not compromise the quality of the generated code. Measure the
before and after speed of compiling a large set of real-world shaders

It would be great if someone can explain it, what needs to be done.


--
Thanks,
Roshan
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev