[Mesa-dev] Getting started on DriConf replacement - EVoC 2018

2018-06-05 Thread Veluri Mithun
Dear developers,

I'm of the undergraduate students at India having experience in C++, Java,
Python programming languages. Being an Electronics student I've fair enough
knowledge in architectures of few Microcontrollers and  Embedded C, Verilog
& VHDL. I'm very enthusiastic to take part in this project.

Can anyone please suggest me something to get started on this. I also hope
to build a strong proposal for EVoC 2018 based on my contributions.

Thank You.

Regards,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] New EGL extension in mesa and 'adriconf' packaging - EVoC'18

2018-07-04 Thread Veluri Mithun
Dear developers,

I'm an undergraduate student in India. I've great enthusiasm to contribute
to mesa and I've already done a few

contributions to adriconf .

Currently, adriconf isn't able to configure the mesa drivers in a machine
where Wayland protocol is used due to lack of EGL extensions in mesa. Hence
to provide *Wayland support* in adriconf a new EGL extension is to be
created in mesa.

Regarding the extension and packaging for adriconf, I've discussed with @Rob
Clark  , @Nicolai Hähnle  , @Jean
Hertel  and drafted the proposal[1].

More info related to the extension and packaging can be found in the
proposal. If anyone has suggestions regarding this, please let me know.

[1]
https://docs.google.com/document/d/1EHpLMx7BiZNZxf6MY4fAdmDIFpE5c1Rro9qhuJhag3c/edit?usp=sharing

Thank you.

Best Regards,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] EGL_MESA_query_renderer

2018-08-21 Thread Veluri Mithun
Hi all,

On Tue, Aug 21, 2018 at 2:49 PM Emil Velikov 
wrote:

> HI all,
>
> On 20 August 2018 at 20:01, Rob Clark  wrote:
> > +Emil since he had some interest in this extension too
> >
> >
> Bth since I did not hear anything last week, so I sat down and wrote
> the spec, implementation and tests on Sunday ;-)
> I'll try to find some time to cleanup and sent out the patches later today.
>
I can see only tests here(
https://gitlab.freedesktop.org/mesa/piglit/compare/2fa9b8fa3e81e230977c2b16ca5b03dd6d85d69b...166c6e3a955c7ed6ac9c514abb6da30b04f81c8e)
may I please know more about these tests...

and in mesa dev list also I didn't find any patch related to spec and
imlplementation..!(If had not missed any mail :-) )

>
> To reiterate my earlier suggestion
>
> "He can work on it in parallel and compare/cross-review one another's work.
>
> If people are not keen on the duplication effort, the time could be
> invested that into other parts of the project (distro/flatpak
> packaging, etc.)"
>
Actual plan(proposal) is to first create extension then use that in
adriconf and then packaging.
But, If you( @Jean Hertel  , @Rob Clark
 )are okay if I do packaging before creating
extension(adriconf can't configure drivers in wayland) then I can continue
with packaging. Later after we finish extension I can come to adding
wayland support in adriconf. Rob and Jean pl. give your opinoin about this.


> Personally, I'd suggest working on an glXGetScreenDriver and
> glXGetDriverConfig equivalent for EGL.
> That in itself will be a _fairly_ laborious task, which seems to have
> been underestimated/missed in the initial plan.
>
> It would involve a) writing another EGL extension or b) Wayland
> protocol or c) other mechanism.
>

This extension is intended to provied the similar functionality as like
glXGetScreenDriver and GlXGetDriverConfig work in X11. Something like
EGLGetDriverConfig and EGLGETScreenDriver (or EGLGETDisplayDriver I think..
) in wayland server.

To be more clear EGLGETDriverConfig should provide an xml format string
with all the options in different languages as seen in X11 when *xdriinfo* is
run and EGLDIsplayDriver should return a driver name(string eg: i965) of
current driver in use.

And also EGLQueryRendererInteger which returns id like pciID(like in x11).

Only after we achevie these through any EGL extension, adriconf can
configure drivers in wayland protocol.

>
> > I don't think this extension should require any driver specific
> > functionality?  (But maybe some window system specific
> > functionality??)
> >
> Extensions piggy-backs on the DRI extension - implementation is ~200 loc
> ;-)
>
> >> EGL_MESA_drm_image_formats is what I can refer I think, Do you know any
> other extensions?
> >
> > That is probably a reasonable one to look at.  Probably git-blame on
> > eglmesaext.h and eglext.h and then going at looking at the patches
> > around there which add the corresponding extensions would be useful.
> > (Maybe eglext.h less useful, since it probably has a lot of "resyncing
> > Khronos headers" type commits..)
> >
> Rob is on spot, yet again. Many header and synced from Khronos. I
> would ignore those and look at the rest for examples.
> Personally I started with the GLX extension, tweaking it here and there ;-)
>
>
> Something that kind of hit me, why is the project status/emails like
> these happening in private?
> It doesn't seem to follow the open-source mantra and others interested
> in learning about Mesa/adriconf are left in the dark.
>
> On my GSoC pretty much everything was done on the public discussion
> medium. The next year when Varad was doing a GSoC same thing happened.
> Am I missing something?
>
I'm sry about this!


> Thanks
> Emil
>

Sincerely,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] EGL/mesa: Initial writeup for MESA_query_renderer

2018-08-27 Thread Veluri Mithun
---
 docs/specs/EGL_MESA_query_renderer.txt | 58 ++
 1 file changed, 58 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_renderer.txt

diff --git a/docs/specs/EGL_MESA_query_renderer.txt 
b/docs/specs/EGL_MESA_query_renderer.txt
new file mode 100644
index 00..0fa9b33d00
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_renderer.txt
@@ -0,0 +1,58 @@
+Name
+
+MESA_query_renderer
+
+Name Strings
+
+EGL_MESA_query_renderer
+
+Contact
+
+Rob Clark  
+Nicolai Hähnle 
+
+Contibutors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-08-24
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+
+
+New Procedures and Functions
+
+Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen,
+ int renderer, int attribute,
+ unsigned int *value);
+
+Overview
+
+This extension provides the applications to qurey the details
+of the all renderers available for a particular display and
+screen.
+
+IP Status
+
+
+
+New Tokens
+
+
+
+Revision History
+
+
+
+
-- 
2.17.1

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


Re: [Mesa-dev] adriconf - Packaging

2018-09-06 Thread Veluri Mithun
Hi all,

>
> About sandbox permissions
> 
>
> What should we use for these --talk-name=, --system-talk-name,
> --filesystem= finish options?
> Do we need to use these???
>   "--talk-name=org.freedesktop.Dbus",
>   "--system-talk-name=org.freedesktop.Dbus",
>   "--filesystem=host" (since we will rw: user-defined, system-wide,
> mesa-source code )
>
> >
>> >I've built the flatpak app for adriconf successfully and shortly I'll
>> publish it in flathub. But, before that I need to clarify >few doubts
>> >
>> >app-Id
>> :
>> *org.x.adriconf*
>> >
>> >@Rob Clark   and @Jean Hertel
>>  Please confirm about it.
>>
>>
>> That error is related to the app-Id we are using more detatils can be
seen here(https://github.com/flathub/flathub/pull/605#issuecomment-419066807)
and Nick Richards(memeber of flathub) is suggesting me to use another
domain.

please have a look here(
https://github.com/flathub/flathub/pull/605#issuecomment-419066807)  and
let me know what app-Id should I use?

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


[Mesa-dev] [PATCH] EGL/mesa: Initial write up for MESA_query_renderer

2018-12-06 Thread Veluri Mithun
---
 docs/specs/EGL_MESA_query_renderer.txt | 184 +
 1 file changed, 184 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_renderer.txt

diff --git a/docs/specs/EGL_MESA_query_renderer.txt 
b/docs/specs/EGL_MESA_query_renderer.txt
new file mode 100644
index 00..2acff6a551
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_renderer.txt
@@ -0,0 +1,184 @@
+Name
+
+MESA_query_renderer
+
+Name Strings
+
+EGL_MESA_query_renderer
+
+Contact
+
+Rob Clark  
+Nicolai H??hnle 
+
+Contributors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-08-24
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.0 is required.
+
+New Procedures and Functions
+
+Bool eglQueryRendererIntegerMESA(EGLDisplay *dpy, int renderer,
+ int attribute, unsigned int *value);
+
+const char *eglQueryRendererStringMESA(EGLDisplay *dpy,int renderer,
+   int attribute);
+
+const char *eglQueryCurrentRendererStringMESA(int attribute);
+
+Overview
+
+In many situations, applications want to detect characteristics of a
+rendering device before creating a context for that device.  Information
+gathered at this stage may guide choices the application makes about
+color depth, number of samples per-pixel, texture quality, and so on.
+In addition, versions of supported APIs and implementation API
+preference may also guide start-up decisions made by the application.
+For example, one implementation may prefer vertex data be supplied using
+methods only available in a compatibility profile, but another
+implementation may only support the desired version in a core profile.
+
+There are also cases where more than one renderer may be available per
+display.  For example, there is typically a hardware implementation and
+a software based implementation.  There are cases where an application
+may want to pick one over the other.  One such situation is when the
+software implementation supports more features than the hardware
+implementation.  Another situation is when a particular version of the
+hardware implementation is blacklisted due to known bugs.
+
+This extension provides a mechanism for the application to query all of
+the available renderers for a particular display. In addition, this 
+extension provides a mechanism for applications to create contexts with 
+respect to a specific renderer.
+
+IP Status
+
+No IP claims
+
+New Tokens
+
+Accepted as an  in eglQueryRendererIntegerMESA and
+eglQueryCurrentRendererIntegerMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA  0x
+EGL_RENDERER_DEVICE_ID_MESA  0x
+EGL_RENDERER_VERSION_MESA0x
+EGL_RENDERER_ACCELERATED_MESA0x
+EGL_RENDERER_VIDEO_MEMORY_MESA   0x
+EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA0x
+EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA0x
+EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA0x
+
+Accepted as an  in EGLQueryRendererStringMESA and
+EGLQueryCurrentRendererStringMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA
+EGL_RENDERER_DEVICE_ID_MESA
+
+Additions to the EGL 1.0 Specification
+
+[Add the following to Section 3.3 of the EGL Versioning]
+
+To obtain information about the available renderers for a particular
+display,
+
+Bool eglQueryRendererIntegerMESA(EGLDisplay *dpy, int renderer,
+ int attribute, unsigned int *value);
+
+can be used.  The value for  will be returned in one or more
+integers specified by .  The values, data sizes, and descriptions
+of each renderer attribute are listed in the table below.
+
+EGL renderer attribute number description
+  of values
+---   ---
+EGL_RENDERER_VENDOR_ID_MESA   1   PCI ID of the device vendor
+EGL_RENDERER_DEVICE_ID_MESA   1   PCI ID of the device
+EGL_RENDERER_VERSION_MESA 3   Major, minor, and patch level of
+  the renderer implementation
+EGL_RENDERER_ACCELERATED_MESA 1   Boolean indicating whether or
+  not the renderer is hardware
+  accelerated
+EGL_RENDERER_VIDEO_MEMORY_MESA 1  Number of megabytes of video
+  memory available to the renderer
+EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA
+  1   Boolean indicating whether or
+  not the renderer

[Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-15 Thread Veluri Mithun
Signed-off-by: Veluri Mithun 
---
 docs/specs/EGL_MESA_query_driver.txt | 54 
 1 file changed, 54 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_driver.txt

diff --git a/docs/specs/EGL_MESA_query_driver.txt 
b/docs/specs/EGL_MESA_query_driver.txt
new file mode 100644
index 00..315f02920f
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_driver.txt
@@ -0,0 +1,54 @@
+Name
+
+MESA_query_driver
+
+Name Strings
+
+EGL_MESA_query_driver
+
+Contact
+
+Rob Clark  
+Nicolai H??hnle 
+
+Contibutors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-11-05
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.4 is required.
+
+Overview
+
+When an application had to query the name of a DRI driver and for
+obtaining driver's option list (UTF-8 encoded XML) of a DRI
+driver the below functions are useful.
+
+New Procedures and Functions
+
+const char* eglGetDriverConfig(EGLDisplay *dpy, EGLDeviceEXT device,
+   const char *driverName);
+const char* eglGetDisplayDriverName(EGLDisplay *dpy, EGLDeviceEXT device);
+
+New Tokens
+
+
+
+Issues
+
+
+
+Revision History
-- 
2.17.1

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


Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-15 Thread Veluri Mithun
Hi Everyone,

we can obtain DRM device file from eglQueryDeviceStringEXT fun of
EGL_EXT_device_query extension. But, how to retrieve name, configs from
that?

Can we get the name of the matched driver for a particular display from any
of the EGLDriver->API ?? (EGL API dispatch table)

And looking at x11 implementation of getDrvierConfig, I finally reached
this file
https://gitlab.freedesktop.org/mesa/mesa/blob/master/include/GL/internal/dri_interface.h#L1828
and unable to find the implementation of that getXml function. Can we use
the same function here?

Please let me know what do you think about this.

Thanks,
Veluri.

On Sat, Dec 15, 2018 at 10:25 PM Veluri Mithun 
wrote:

> Signed-off-by: Veluri Mithun 
> ---
>  docs/specs/EGL_MESA_query_driver.txt | 54 
>  1 file changed, 54 insertions(+)
>  create mode 100644 docs/specs/EGL_MESA_query_driver.txt
>
> diff --git a/docs/specs/EGL_MESA_query_driver.txt
> b/docs/specs/EGL_MESA_query_driver.txt
> new file mode 100644
> index 00..315f02920f
> --- /dev/null
> +++ b/docs/specs/EGL_MESA_query_driver.txt
> @@ -0,0 +1,54 @@
> +Name
> +
> +MESA_query_driver
> +
> +Name Strings
> +
> +EGL_MESA_query_driver
> +
> +Contact
> +
> +Rob Clark  
> +Nicolai Hähnle 
> +
> +Contibutors
> +
> +Veluri Mithun 
> +
> +Status
> +
> +XXX - Not complete yet!!! (draft)
> +
> +Version
> +
> +Version 1, 2018-11-05
> +
> +Number
> +
> +EGL Extension ###
> +
> +Dependencies
> +
> +EGL 1.4 is required.
> +
> +Overview
> +
> +When an application had to query the name of a DRI driver and for
> +obtaining driver's option list (UTF-8 encoded XML) of a DRI
> +driver the below functions are useful.
> +
> +New Procedures and Functions
> +
> +const char* eglGetDriverConfig(EGLDisplay *dpy, EGLDeviceEXT device,
> +   const char *driverName);
> +const char* eglGetDisplayDriverName(EGLDisplay *dpy, EGLDeviceEXT
> device);
> +
> +New Tokens
> +
> +
> +
> +Issues
> +
> +
> +
> +Revision History
> --
> 2.17.1
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-22 Thread Veluri Mithun
- Try to retrieve driver name from dri2_egl_display

Signed-off-by: Veluri Mithun 
---
 docs/specs/EGL_MESA_query_driver.txt | 54 
 src/egl/main/eglapi.c| 13 +++
 src/egl/main/egldriver.c |  8 +
 src/egl/main/egldriver.h |  3 ++
 src/egl/main/eglentrypoint.h |  1 +
 5 files changed, 79 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_driver.txt

diff --git a/docs/specs/EGL_MESA_query_driver.txt
b/docs/specs/EGL_MESA_query_driver.txt
new file mode 100644
index 00..bec7d4a15d
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_driver.txt
@@ -0,0 +1,54 @@
+Name
+
+MESA_query_driver
+
+Name Strings
+
+EGL_MESA_query_driver
+
+Contact
+
+Rob Clark  
+Nicolai Hähnle 
+
+Contibutors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-11-05
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.4 is required.
+
+Overview
+
+When an application has to query the name of a DRI driver and for
+obtaining driver's option list (UTF-8 encoded XML) of a DRI
+driver the below functions are useful.
+
+New Procedures and Functions
+
+const char* eglGetDriverConfig(EGLDisplay *disp, EGLDeviceEXT device,
+   const char *driverName);
+const char* eglGetDisplayDriverName(EGLDisplay *disp);
+
+New Tokens
+
+No new tokens
+
+Issues
+
+
+
+Revision History
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 3afdfd40e4..93d69127e7 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -2647,6 +2647,19 @@ eglQueryDisplayAttribEXT(EGLDisplay dpy,
RETURN_EGL_SUCCESS(disp, EGL_TRUE);
 }

+static const char * EGLAPIENTRY
+eglGetDisplayDriverName(EGLDisplay dpy)
+{
+_EGLDisplay *disp = _eglLockDisplay(dpy);
+_EGLDriver *drv;
+
+_EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
+_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+
+assert(disp->Initialized);
+RETURN_EGL_EVAL(disp, _eglGetDriverName(disp));
+}
+
 __eglMustCastToProperFunctionPointerType EGLAPIENTRY
 eglGetProcAddress(const char *procname)
 {
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index b20652ed8c..a8b7d7dc94 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -45,6 +45,7 @@
 #include "egllog.h"

 #include "util/debug.h"
+#include "egl_dri2.h"

 static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
 static _EGLDriver *_eglDriver;
@@ -125,3 +126,10 @@ _eglUnloadDrivers(void)
free(_eglDriver);
_eglDriver = NULL;
 }
+
+const char *
+_eglGetDriverName(_EGLDisplay *disp)
+{
+struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+return dri2_dpy->driver_name;
+}
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index 5695fc06ff..c5b330b6cb 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -78,6 +78,9 @@ struct _egl_driver
_EGLAPI API;  /**< EGL API dispatch table */
 };

+extern const char *
+_eglGetDriverName(_EGLDisplay *disp);
+

 extern void
 _eglInitDriver(_EGLDriver *driver);
diff --git a/src/egl/main/eglentrypoint.h b/src/egl/main/eglentrypoint.h
index 69a6c1bf4c..5621b45d91 100644
--- a/src/egl/main/eglentrypoint.h
+++ b/src/egl/main/eglentrypoint.h
@@ -42,6 +42,7 @@ EGL_ENTRYPOINT(eglGetCurrentContext)
 EGL_ENTRYPOINT(eglGetCurrentDisplay)
 EGL_ENTRYPOINT(eglGetCurrentSurface)
 EGL_ENTRYPOINT(eglGetDisplay)
+EGL_ENTRYPOINT(eglGetDisplayDriverName)
 EGL_ENTRYPOINT(eglGetError)
 EGL_ENTRYPOINT(eglGetPlatformDisplay)
 EGL_ENTRYPOINT(eglGetPlatformDisplayEXT)
-- 
2.18.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-23 Thread Veluri Mithun
Hi Rob,

I tested the below code with the same sample code(correcting some
mistakes..).

we are able to retrieve driverName correctly.

@Nicolai Hähnle  , @Adam Jackson 
 , @Emil Velikov  , @Eric Engestrom

Any feedback is appreciated.

Thank you.

Cheers,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-25 Thread Veluri Mithun
Hi Everyone,

I've completed the extension and I verified all the api functions with
sample code and they are working fine.

Please review the MR:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/47

Thanks and Regards,
Veluri Mithun.

On Sun, Dec 23, 2018 at 2:06 PM Veluri Mithun 
wrote:

> Hi Rob,
>
> I tested the below code with the same sample code(correcting some
> mistakes..).
>
> we are able to retrieve driverName correctly.
>
> @Nicolai Hähnle  , @Adam Jackson
>  , @Emil Velikov  , @Eric
> Engestrom 
> Any feedback is appreciated.
>
> Thank you.
>
> Cheers,
> Veluri.
>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver

2018-12-31 Thread Veluri Mithun
Hi Everyone,

I made changed changes to the patch as per @Rob Clark
 comments
and I verified all the API functions with sample code, they are
working fine.

Please merge the MR:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/47 if there are no
changes

Thanks & Happy New Year
Veluri.

On Wed, Dec 26, 2018 at 12:16 AM Veluri Mithun 
wrote:

> Hi Everyone,
>
> I've completed the extension and I verified all the api functions with
> sample code and they are working fine.
>
> Please review the MR:
> https://gitlab.freedesktop.org/mesa/mesa/merge_requests/47
>
> Thanks and Regards,
> Veluri Mithun.
>
> On Sun, Dec 23, 2018 at 2:06 PM Veluri Mithun 
> wrote:
>
>> Hi Rob,
>>
>> I tested the below code with the same sample code(correcting some
>> mistakes..).
>>
>> we are able to retrieve driverName correctly.
>>
>> @Nicolai Hähnle  , @Adam Jackson
>>  , @Emil Velikov  , @Eric
>> Engestrom 
>> Any feedback is appreciated.
>>
>> Thank you.
>>
>> Cheers,
>> Veluri.
>>
>>
>>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] EGL_MESA_query_renderer

2018-10-07 Thread Veluri Mithun
Hi Nicolai,

All these days I worked on packaging since I didn't find much time last
month in my new academic schedule, I finished it if you wish you may
download it here(https://flathub.org/apps/details/br.com.jeanhertel.adriconf).
Currently, it can configure drivers in X11 server.

I started to work on this extension and I have few doubts

   1.
   https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/glx/dri_glx.c#L254
   this functions gets the driver configs in X11. what is the use of this
   line? what does it do? why we are doing mutex_lock at start and
   mutex_unlock at end? I saw this in many other functions also.

On Wed, Aug 22, 2018 at 11:23 AM Nicolai Hähnle 
wrote:

> In a separate email, Rob wrote:
>
>  > so, it was earlier discussed that
>  > glXGetScreenDriver()/glXGetDriverConfig() equivalents could be lumped
>  > into this extension, which is I guess not what you have done.
>
> I'm fairly agnostic on this, but if you do lump it into one extension,
> please make the GetDriverConfig part optional.


2. How to make this part optional?

>
> There are non-Mesa drivers which implement GLX_MESA_query_renderer, and
> it'd be good if the same were at least possible for
> EGL_MESA_query_renderer as well.
>
> Cheers,
> Nicolai
>

Cheers,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH EGL/MESA] EGL/mesa: Initial writeup for MESA_query_renderer

2018-11-04 Thread Veluri Mithun
Signed-off-by: Veluri Mithun 
---
 docs/specs/EGL_MESA_query_renderer.txt | 241 +
 1 file changed, 241 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_renderer.txt

diff --git a/docs/specs/EGL_MESA_query_renderer.txt 
b/docs/specs/EGL_MESA_query_renderer.txt
new file mode 100644
index 00..5aff445b16
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_renderer.txt
@@ -0,0 +1,241 @@
+Name
+
+MESA_query_renderer
+
+Name Strings
+
+EGL_MESA_query_renderer
+
+Contact
+
+Rob Clark  
+Nicolai H??hnle 
+
+Contibutors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-08-24
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.4 is required.
+
+EGL_ARB_create_context and EGL_ARB_create_context_profile are required.
+
+This extension interacts with EGL_EXT_create_context_es2_profile and
+EGL_EXT_create_context_es_profile.
+
+New Procedures and Functions
+
+Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen,
+ int renderer, int attribute,
+ unsigned int *value);
+
+Bool EGLQueryCurrentRendererIntegerMESA(int attribute, unsigned int 
*value);
+
+const char *EGLQueryRendererStringMESA(EGLDisplay *dpy, int screen,
+   int renderer, int attribute);
+
+const char *EGLQueryCurrentRendererStringMESA(int attribute);
+
+Overview
+
+In many situations, applications want to detect characteristics of a
+rendering device before creating a context for that device.  Information
+gathered at this stage may guide choices the application makes about
+color depth, number of samples per-pixel, texture quality, and so on.
+In addition, versions of supported APIs and implementation API
+preference may also guide start-up decisions made by the application.
+For example, one implementation may prefer vertex data be supplied using
+methods only available in a compatibility profile, but another
+implementation may only support the desired version in a core profile.
+
+There are also cases where more than one renderer may be available per
+display.  For example, there is typically a hardware implementation and
+a software based implementation.  There are cases where an application
+may want to pick one over the other.  One such situation is when the
+software implementation supports more features than the hardware
+implementation.  Another situation is when a particular version of the
+hardware implementation is blacklisted due to known bugs.
+
+This extension provides a mechanism for the application to query all of
+the available renderers for a particular display and screen.  In
+addition, this extension provides a mechanism for applications to create
+contexts with respect to a specific renderer.
+
+IP Status
+
+No IP claims
+
+New Tokens
+
+Accepted as an  in EGLQueryRendererIntegerMESA and
+EGLQueryCurrentRendererIntegerMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA  0x
+EGL_RENDERER_DEVICE_ID_MESA  0x
+EGL_RENDERER_VERSION_MESA0x
+EGL_RENDERER_ACCELERATED_MESA0x
+EGL_RENDERER_VIDEO_MEMORY_MESA   0x
+EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA0x
+EGL_RENDERER_PREFERRED_PROFILE_MESA  0x
+EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA0x
+EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA0x
+EGL_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA  0x
+EGL_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x
+
+Accepted as an  in EGLQueryRendererStringMESA and
+EGLQueryCurrentRendererStringMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA
+EGL_RENDERER_DEVICE_ID_MESA
+
+Accepted as an attribute name in <*attrib_list> in
+EGLCreateContextAttribsARB:
+
+EGL_RENDERER_ID_MESA 0x
+
+Additions to the EGL 1.4 Specification
+
+[Add the following to Section X.Y.Z of the EGL Specification]
+
+To obtain information about the available renderers for a particular
+display and screen,
+
+Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen, int 
renderer,
+ int attribute, unsigned int *value);
+
+can be used.  The value for  will be returned in one or more
+integers specified by .  The values, data sizes, and descriptions
+of each renderer attribute are listed in the table below.
+
+EGL renderer attribute number description
+  of values
+---   ---
+EGL_RENDERER_VENDOR_ID_MESA   1   PCI ID of the device 

Re: [Mesa-dev] [PATCH] EGL/mesa: Initial writeup for MESA_query_renderer

2018-11-04 Thread Veluri Mithun
Hi Romanick and Nicolai,

Sry for the late, I had internal exams last month.

the EGL version of the extension to the new document.  The EGL enums
> will probably be different, so maybe replace the enum values with 0x
> for now.
>
What are these tokens(enum values) for? and how should one assign some
hexadecimal value to them? We need to add them in include/EGL/eglmesaext.h
right?

>
> The GLX implementation uses DRI infrastructure for most of the real
> work.  It should be pretty easy to copy most of
> src/glx/dri_common_query_renderer.c over to EGL.
>
> In the next patch I'll try to finish this.

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


[Mesa-dev] [PATCH EGL/MESA] EGL/mesa: Initial write up for EGL_MESA_query_driver

2018-11-05 Thread Veluri Mithun
Signed-off-by: Veluri Mithun 
---
 docs/specs/EGL_MESA_query_driver.txt | 53 
 1 file changed, 53 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_driver.txt

diff --git a/docs/specs/EGL_MESA_query_driver.txt 
b/docs/specs/EGL_MESA_query_driver.txt
new file mode 100644
index 00..6c87e9fa1a
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_driver.txt
@@ -0,0 +1,53 @@
+Name
+
+MESA_query_driver
+
+Name Strings
+
+EGL_MESA_query_driver
+
+Contact
+
+Rob Clark  
+Nicolai H??hnle 
+
+Contibutors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-11-05
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.4 is required.
+
+Overview
+
+When an application had to query name the of a DRI driver with the given
+screen and also for obtaining a driver's option list (UTF-8 encoded XML)
+of a DRI driver the below functions and useful.
+
+New Procedures and Functions
+
+const char* EGLGetDriverConfig(const char *driverName);
+const char* EGLGetScreenDriver(EGLDisplay * dpy, int scrNum)
+
+New Tokens
+
+
+
+Issues
+
+
+
+Revision History
-- 
2.17.1

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


[Mesa-dev] [PATCH] EGL/mesa: Initial write up for MESA_query_renderer

2018-11-07 Thread Veluri Mithun
---
 docs/specs/EGL_MESA_query_renderer.txt | 186 +
 1 file changed, 186 insertions(+)
 create mode 100644 docs/specs/EGL_MESA_query_renderer.txt

diff --git a/docs/specs/EGL_MESA_query_renderer.txt 
b/docs/specs/EGL_MESA_query_renderer.txt
new file mode 100644
index 00..4711e3dadb
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_renderer.txt
@@ -0,0 +1,186 @@
+Name
+
+MESA_query_renderer
+
+Name Strings
+
+EGL_MESA_query_renderer
+
+Contact
+
+Rob Clark  
+Nicolai H??hnle 
+
+Contributors
+
+Veluri Mithun 
+
+Status
+
+XXX - Not complete yet!!! (draft)
+
+Version
+
+Version 1, 2018-08-24
+
+Number
+
+EGL Extension ###
+
+Dependencies
+
+EGL 1.0 is required.
+
+New Procedures and Functions
+
+Bool eglQueryRendererIntegerMESA(EGLDisplay *dpy, int renderer,
+ int attribute, unsigned int *value);
+
+Bool eglQueryCurrentRendererIntegerMESA(int attribute, unsigned int 
*value);
+
+const char *eglQueryRendererStringMESA(EGLDisplay *dpy,int renderer,
+   int attribute);
+
+const char *eglQueryCurrentRendererStringMESA(int attribute);
+
+Overview
+
+In many situations, applications want to detect characteristics of a
+rendering device before creating a context for that device.  Information
+gathered at this stage may guide choices the application makes about
+color depth, number of samples per-pixel, texture quality, and so on.
+In addition, versions of supported APIs and implementation API
+preference may also guide start-up decisions made by the application.
+For example, one implementation may prefer vertex data be supplied using
+methods only available in a compatibility profile, but another
+implementation may only support the desired version in a core profile.
+
+There are also cases where more than one renderer may be available per
+display.  For example, there is typically a hardware implementation and
+a software based implementation.  There are cases where an application
+may want to pick one over the other.  One such situation is when the
+software implementation supports more features than the hardware
+implementation.  Another situation is when a particular version of the
+hardware implementation is blacklisted due to known bugs.
+
+This extension provides a mechanism for the application to query all of
+the available renderers for a particular display. In addition, this 
+extension provides a mechanism for applications to create contexts with 
+respect to a specific renderer.
+
+IP Status
+
+No IP claims
+
+New Tokens
+
+Accepted as an  in eglQueryRendererIntegerMESA and
+eglQueryCurrentRendererIntegerMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA  0x
+EGL_RENDERER_DEVICE_ID_MESA  0x
+EGL_RENDERER_VERSION_MESA0x
+EGL_RENDERER_ACCELERATED_MESA0x
+EGL_RENDERER_VIDEO_MEMORY_MESA   0x
+EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA0x
+EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA0x
+EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA0x
+
+Accepted as an  in EGLQueryRendererStringMESA and
+EGLQueryCurrentRendererStringMESA:
+
+EGL_RENDERER_VENDOR_ID_MESA
+EGL_RENDERER_DEVICE_ID_MESA
+
+Additions to the EGL 1.0 Specification
+
+[Add the following to Section 3.3 of the EGL Versioning]
+
+To obtain information about the available renderers for a particular
+display,
+
+Bool eglQueryRendererIntegerMESA(EGLDisplay *dpy, int renderer,
+ int attribute, unsigned int *value);
+
+can be used.  The value for  will be returned in one or more
+integers specified by .  The values, data sizes, and descriptions
+of each renderer attribute are listed in the table below.
+
+EGL renderer attribute number description
+  of values
+---   ---
+EGL_RENDERER_VENDOR_ID_MESA   1   PCI ID of the device vendor
+EGL_RENDERER_DEVICE_ID_MESA   1   PCI ID of the device
+EGL_RENDERER_VERSION_MESA 3   Major, minor, and patch level of
+  the renderer implementation
+EGL_RENDERER_ACCELERATED_MESA 1   Boolean indicating whether or
+  not the renderer is hardware
+  accelerated
+EGL_RENDERER_VIDEO_MEMORY_MESA 1  Number of megabytes of video
+  memory available to the renderer
+EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA
+  1   Boolean

Re: [Mesa-dev] [PATCH EGL/MESA] EGL/mesa: Initial writeup for MESA_query_renderer

2018-11-07 Thread Veluri Mithun
Hi all,
Thanks Adam for your interest in this.

> +New Tokens
> > +
> > +Accepted as an  in EGLQueryRendererIntegerMESA and
> > +EGLQueryCurrentRendererIntegerMESA:
> > +
> > +EGL_RENDERER_VENDOR_ID_MESA  0x
> > +EGL_RENDERER_DEVICE_ID_MESA  0x
>

except the above 2 tokens we aren't using any tokens in adriconf(
https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L46) If we
don't need all the below ones, I'll remove them.

> > +EGL_RENDERER_VERSION_MESA0x
> > +EGL_RENDERER_ACCELERATED_MESA0x
> > +EGL_RENDERER_VIDEO_MEMORY_MESA   0x
> > +EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA0x
> > +EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA0x
> > +EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA0x
> > +
>
>
> Normally these are reserved by creating a request against the EGL
> registry on github. However we happen to have a block of 16 enum values
> already reserved:
>
> >  comment="Reserved for John Kåre Alsaker (Public bug 757)">
> > 
> > 
>
> That "public bug 757" is for the abandoned EGL_MESA_image_sRGB
> extension:
>
> https://www.khronos.org/bugzilla/show_bug.cgi?id=757
>
> So I think it's safe to use enums from that range, and we'll still have
> two free.

I'll assign these, once we finalize all the tokens.

> +Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen,
> int renderer,
> > + int attribute, unsigned int
> *value);
>
@Nicolai Hähnle  , @Rob Clark 

we are using only this queryRenderInteger function in adriconf. The rest 3
funcions can be exempted??


> The corresponding eglQueryCurrentRendererIntegerMESA is not documented.
> I'm not entirely sure it should even exist, to be honest; I'd prefer if
> these attributes were instead newly legal values to pass to
> eglQueryContext. Too late to make that change for GLX I suppose.
>

What is the difference between EGLContext and EGLSurface?

If you look at the usage of query fun in adriocnf(
https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L43). we are
iterating with all the available screens. In Wayland do we need to iterate
through contexts??
@Jean Hertel  In the above provided link, why are
we passing 3rd argument(renderer) as 0 for all the screens?


>
> > +[Add to section section 3.3.7 "Rendering Contexts"]
> > +
> > +The attribute name EGL_RENDERER_ID_MESA specified the index of the
> render
> > +against which the context should be created.  The default value of
> > +EGL_RENDERER_ID_MESA is 0.
>
> This startled me to read, I didn't think GLX_MESA_query_renderer had
> this. Turns out it does have this text in the extension spec, but the
> functionality is not actually implemented. Worse, there's no way to
> enumerate how many renderers a display (or display/screen in GLX) has.
>
> To address this, I would:
>
> 1) Remove this text from both GLX and EGL extension specs
>(Both here and above where the enums are listed)
> 2) Update both specs with an explicit way to enumerate renderers
>(probably something like "if renderer is -1 and the attribute is
>XXX_RENDERER_COUNT_MESA, return one integer")
> 3) Add a layered extension to add this functionality to CreateContext
>
> #2 and #3 are optional, I suppose. Probably it's better to have only
> one way to do that, and in EGL that way is probably using the EGL
> device extensions instead. But GLX doesn't have anything like that, so
> this functionality might make sense there.
>
>
Thanks,
Veluri.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH EGL/MESA] EGL/mesa: Initial write up for EGL_MESA_query_driver

2018-11-08 Thread Veluri Mithun
Hi Rob,

FYI, we are implementing this extension for getScreenDriver and
getDrvierConfig functions.

This extension is different from queryRenderer.

Thanks,
Veluri.


On Mon, Nov 5, 2018 at 11:38 PM Veluri Mithun 
wrote:

> Signed-off-by: Veluri Mithun 
> ---
>  docs/specs/EGL_MESA_query_driver.txt | 53 
>  1 file changed, 53 insertions(+)
>  create mode 100644 docs/specs/EGL_MESA_query_driver.txt
>
> diff --git a/docs/specs/EGL_MESA_query_driver.txt
> b/docs/specs/EGL_MESA_query_driver.txt
> new file mode 100644
> index 00..6c87e9fa1a
> --- /dev/null
> +++ b/docs/specs/EGL_MESA_query_driver.txt
> @@ -0,0 +1,53 @@
> +Name
> +
> +MESA_query_driver
> +
> +Name Strings
> +
> +EGL_MESA_query_driver
> +
> +Contact
> +
> +    Rob Clark  
> +Nicolai Hähnle 
> +
> +Contibutors
> +
> +Veluri Mithun 
> +
> +Status
> +
> +XXX - Not complete yet!!! (draft)
> +
> +Version
> +
> +Version 1, 2018-11-05
> +
> +Number
> +
> +EGL Extension ###
> +
> +Dependencies
> +
> +EGL 1.4 is required.
> +
> +Overview
> +
> +When an application had to query name the of a DRI driver with the
> given
> +screen and also for obtaining a driver's option list (UTF-8 encoded
> XML)
> +of a DRI driver the below functions and useful.
> +
> +New Procedures and Functions
> +
> +const char* EGLGetDriverConfig(const char *driverName);
> +const char* EGLGetScreenDriver(EGLDisplay * dpy, int scrNum)
> +
> +New Tokens
> +
> +
> +
> +Issues
> +
> +
> +
> +Revision History
> --
> 2.17.1
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev