[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] some samples and a question about looping



Rumor on the net says that PowerVR SGX and Tegra 2 have branching,
Adreno does not have it. Also phone vendors have restricted drivers so
they can change their GPU manufacturers easily (I don't know if they
restrict looping). Whether or not the GPUs have branching has little
impact on their overall performance.

Somehow people seem to be missing two things here. First, this
restriction is not coming by the OpenGL ES spec. It is merely the
minimum requirement for the implementations there. By disallowing
arbitrary loops, WebGL is diverting from the OpenGL ES spec, so there
should be some good reason for doing that.
Second, the restriction is entirely syntactic, because when hardware
branching is available, also loops in the restricted form can be
compiled without unrolling. Then "if" and "break" can be used to make
variable length loops. The constant bound will have to be set so high
that it is never reached. This bound can be easily selected so high
that it won't be accepted by drivers that try to unroll loops (or
worse, the drivers try to unroll it and the system runs out of
resources). Unless the bound is small (perhaps 30?), and the loop body
is simple, this form will be less portable than the natural form. With
longer loops, drivers can try (and fail) to unroll, even if the
hardware supports branching. As summary, the distinction between
hardware with and without branching still exists with restricted loops
and can be exploited in the same way as it could with arbitrary loops.

-- Sami

On Thu, Jan 6, 2011 at 8:27 AM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
> On 06/01/2011 14:23, David Sheets wrote:
>
> Hi Mark,
>
> I understand the desire to protect graphics vendors' interests by
> making hardware limitation inquiries anonymous. Could you tell us
> anything about the nature of these shader-limited GPUs? Are they
> currently being manufactured? Are they 2 years old? 5 years? Desktop?
> Phone?
>
> I really do not know. The discussion took place what feels like a year ago.
> It might have been a less or a bit more. Many designs had been in the market
> for a year or more before that. I have no idea if hardware makers are
> tweaking their GPU designs over time.
>
> If these GPUs are deployed in devices with sub-1GHz CPUs, I have a
> hard time believing that these devices will ever run WebGL content
> acceptably due to JavaScript's inherent inefficiency.
>
> I do not recall seeing any device with an OpenGL ES 2.0 capable chip and a
> less than 1GHz CPU.
>
> When WebGL starts to take off in a year or two, how old will these
> minimally ES2 GPUs be? Will the owners of these devices expect WebGL
> to work on a 5 year old cell phone?
>
> I have no idea what the owners might expect.
>
> Regarding the future, I refer you to Ken Russell's answer on this thread. It
> is much easier to relax restrictions than add them.
>
> Regards
>
> -Mark
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------