Well, yes, if you put it this way, then it's a bug :)
IMHO that glShaderBinary thing is not something to make "standard" conformant 
GLESv2 impl., it's
like a recommendation - "if you don't support glsl and have your own tool to 
compile shaders,
then at least provide this function to load them". That's of course doesn't 
solve the problem
you're describing - no standartized binary representation of a shader

On 11/28/2013 03:40 PM, Carsten Haitzler (The Rasterman) wrote:
> On Thu, 28 Nov 2013 15:34:47 +0400 Stanislav Vorobiov <s.vorob...@samsung.com>
> said:
> 
>>> yeah.. i've hit those before. gles2's "runtime glsl compiler is optional"
>>> thing imho is a major standard bug.
>> IMHO it's not a bug, since there's glShaderBinary call. We can assume that
>> there's some performance critical GLESv2 implementation that doesn't allow
>> one to compile shaders "online", but provides an "offline" compiler and the
>> user is only allowed to use compiled shaders. However, I don't know if such
>> implementations/GPUs actually exist.
> 
> this means you need tyo use a non-standardized too to generate that binary. it
> means it is effectively impossible to write portable gles2 code as your 
> shaders
> do not have a known way to be generated. if this had been defined - then fine,
> bit it wasn't. it wouldnt need to be online compilation., it simply would be
> the ability to have the code work without porting the code AND build system
> from gles2 implementation to gles2 implementation as they may or may not
> provide a standardized runtime glsl compiler. if they don't.. what's the
> STANDARD solution? :)
> 
> btw.. the reason i consider this a bug is because i have had to support such 
> an
> implementation before. it required custom build infra just for that
> implementation, and that build infra had to build by using wine to run a
> windows-only executable that compiled the glsl.. and this executable was
> private and proprietary. that means ONLY people with the luck of access to it
> could fix bugs in the glsl for that platform. you couldn't recompile the 
> shader
> bins at compile time... (or runtime).
> 
>>> anyway - this is in upstream! merged.
>> Great, thanks! :)
>>
>> On 11/28/2013 03:23 PM, Carsten Haitzler (The Rasterman) wrote:
>>> On Thu, 28 Nov 2013 15:01:02 +0400 Stanislav Vorobiov
>>> <s.vorob...@samsung.com> said:
>>>
>>> yeah.. i've hit those before. gles2's "runtime glsl compiler is optional"
>>> thing imho is a major standard bug.
>>>
>>> anyway - this is in upstream! merged. it'll be out in 1.8. my mulling over
>>> if it was a bug or not was to determine if it goes into the 1.8 release or
>>> is held for 1.9 development as we only want to fix bugs at this point...
>>> since release is due this weekend. :)
>>>
>>>> IMHO it's a standard bug, but nobody cares :)
>>>>
>>>> On 11/28/2013 02:53 PM, Carsten Haitzler (The Rasterman) wrote:
>>>>> On Thu, 28 Nov 2013 13:33:42 +0400 Stanislav Vorobiov
>>>>> <s.vorob...@samsung.com> said:
>>>>>
>>>>>> Yes, I think it's more of a bugfix. After all, there's no EGL standard
>>>>>> that strictly defines how should textures that are derived from pixmaps
>>>>>> behave, thus, application code shouldn't assume anything either.
>>>>>
>>>>> BUT... it requires an extension to figure it out... which means that
>>>>> technically the original standard is broken... UNLESS we ASSUME its
>>>>> yinverted always... :) so either the original is broken (standard bug)...
>>>>> or... the assumption is a requirement. :)
>>>>>
>>>>>> On 11/28/2013 01:20 PM, Carsten Haitzler (The Rasterman) wrote:
>>>>>>> On Thu, 28 Nov 2013 12:02:36 +0400 Stanislav Vorobiov
>>>>>>> <s.vorob...@samsung.com> said:
>>>>>>>
>>>>>>> and that looks great! well done! :) now the question is... is this a new
>>>>>>> feature.. or a bug fix... hmm i guess it's a bug fix as it makes
>>>>>>> something work given specific drivers and setup that didn't work
>>>>>>> before, BUT needs an extension to do it.
>>>>>>>
>>>>>>>> Instead of hardcoding yinvert=1 we should query for
>>>>>>>> EGL_NOK_texture_from_pixmap extension and if it's present
>>>>>>>> use EGL_Y_INVERTED_NOK value
>>>>>>>> ---
>>>>>>>>  src/modules/evas/engines/gl_x11/evas_engine.c |   20 +++++++++++++++++
>>>>>>>> + +- 1 file changed, 19 insertions(+), 1 deletion(-)
>>>>>>>>
>>>>>>>> diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c
>>>>>>>> b/src/modules/evas/engines/gl_x11/evas_engine.c index d25610f..4e5c22c
>>>>>>>> 100644
>>>>>>>> --- a/src/modules/evas/engines/gl_x11/evas_engine.c
>>>>>>>> +++ b/src/modules/evas/engines/gl_x11/evas_engine.c
>>>>>>>> @@ -71,6 +71,7 @@ struct _Render_Engine
>>>>>>>>  static int initted = 0;
>>>>>>>>  static int gl_wins = 0;
>>>>>>>>  static int extn_have_buffer_age = 1;
>>>>>>>> +static int extn_have_y_inverted = 0;
>>>>>>>>  
>>>>>>>>  typedef void            (*_eng_fn) (void);
>>>>>>>>  typedef _eng_fn         (*glsym_func_eng_fn) ();
>>>>>>>> @@ -90,6 +91,9 @@ static Eina_Bool eng_preload_make_current(void *data,
>>>>>>>> void *doit);
>>>>>>>>  #ifndef EGL_BUFFER_AGE_EXT
>>>>>>>>  # define EGL_BUFFER_AGE_EXT 0x313d
>>>>>>>>  #endif
>>>>>>>> +#ifndef EGL_Y_INVERTED_NOK
>>>>>>>> +# define EGL_Y_INVERTED_NOK 0x307F
>>>>>>>> +#endif
>>>>>>>>  
>>>>>>>>  _eng_fn  (*glsym_eglGetProcAddress)            (const char *a) = NULL;
>>>>>>>>  void    *(*glsym_eglCreateImage)               (EGLDisplay a,
>>>>>>>> EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; @@
>>>>>>>> -711,6 +715,10 @@ gl_extn_veto(Render_Engine *re) {
>>>>>>>>               extn_have_buffer_age = 0;
>>>>>>>>            }
>>>>>>>> +        if (strstr(str, "EGL_NOK_texture_from_pixmap"))
>>>>>>>> +          {
>>>>>>>> +             extn_have_y_inverted = 1;
>>>>>>>> +          }
>>>>>>>>       }
>>>>>>>>     else
>>>>>>>>       {
>>>>>>>> @@ -2225,6 +2233,7 @@ eng_image_native_set(void *data, void *image,
>>>>>>>> void *native) EGLConfig egl_config;
>>>>>>>>                int config_attrs[20];
>>>>>>>>                int num_config, i = 0;
>>>>>>>> +              int yinvert = 1;
>>>>>>>>  
>>>>>>>>                eina_hash_add
>>>>>>>> (re->win->gl_context->shared->native_pm_hash, &pmid, im); 
>>>>>>>> @@ -2250,6 +2259,15 @@ eng_image_native_set(void *data, void *image,
>>>>>>>> void *native) if (!eglChooseConfig(re->win->egl_disp, config_attrs,
>>>>>>>>                                     &egl_config, 1, &num_config))
>>>>>>>>                  ERR("eglChooseConfig() failed for pixmap 0x%x,
>>>>>>>> num_config = % i", (unsigned int)pm, num_config);
>>>>>>>> +              else
>>>>>>>> +                {
>>>>>>>> +                  int val;
>>>>>>>> +                  if (extn_have_y_inverted &&
>>>>>>>> +                      eglGetConfigAttrib(re->win->egl_disp,
>>>>>>>> egl_config,
>>>>>>>> +                                         EGL_Y_INVERTED_NOK, &val))
>>>>>>>> +                        yinvert = val;
>>>>>>>> +                }
>>>>>>>> +
>>>>>>>>                memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface));
>>>>>>>>                n->pixmap = pm;
>>>>>>>>                n->visual = vis;
>>>>>>>> @@ -2263,7 +2281,7 @@ eng_image_native_set(void *data, void *image,
>>>>>>>> void *native) ERR("Try eglCreateImage on EGL with no support");
>>>>>>>>                if (!n->egl_surface)
>>>>>>>>                  ERR("eglCreatePixmapSurface() for 0x%x failed",
>>>>>>>> (unsigned int)pm);
>>>>>>>> -              im->native.yinvert     = 1;
>>>>>>>> +              im->native.yinvert     = yinvert;
>>>>>>>>                im->native.loose       = 0;
>>>>>>>>                im->native.data        = n;
>>>>>>>>                im->native.func.data   = re;
>>>>>>>> -- 
>>>>>>>> 1.7.9.5
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most
>>>>>>>> IT organizations don't have a clear picture of how application
>>>>>>>> performance affects their revenue. With AppDynamics, you get 100%
>>>>>>>> visibility into your Java,.NET, & PHP application. Start your 15-day
>>>>>>>> FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________ enlightenment-devel
>>>>>>>> mailing list enlightenment-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT 
>>>>>> organizations don't have a clear picture of how application performance 
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into
>>>>>> your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>>>>>> AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________ enlightenment-devel
>>>>>> mailing list enlightenment-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
> 
> 


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to