Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-13 Thread Brian Paul

Great!  Glad to hear it.  I'll check in the updated documentation today.

-Brian

On 11/13/2015 03:03 AM, Valera Rozuvan wrote:

Hi Brian,

The updated instructions worked for me. Thank you = )

Regards,
Valera Rozuvan | 
https://urldefense.proofpoint.com/v2/url?u=http-3A__valera.rozuvan.net_=BQIBaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=23mynH2CtHPfImZY-vSqq61hI3-5ZjhRGipoz9K8OJc=gg_NyTw0i8suRhBXUgjcqfHlEiHVvyOHUoboATZm7LU=

Skype: valera.rozuvan
E-mail: valera.rozu...@gmail.com
Phone: +38 (050) 837-29-73



On Wed, Nov 11, 2015 at 11:18 PM, Emil Velikov  wrote:

On 11 November 2015 at 19:51, Brian Paul  wrote:

On 11/11/2015 11:38 AM, Emil Velikov wrote:


On 11 November 2015 at 18:25, Thomas Hellstrom 
wrote:


On 11/11/2015 07:07 PM, Brian Paul wrote:


On 11/11/2015 10:44 AM, Emil Velikov wrote:


On 11 November 2015 at 16:48, Brian Paul  wrote:


On 11/11/2015 08:44 AM, Emil Velikov wrote:





I have seen similar type of documents in the past, most of which
going
out of date very quickly due to distribution changes and/or others.
Wondering how you'll feel about "check your distro and add svga to
the
gallium-drivers array" style of instructions ?




I'm afraid I don't quite understand what you're saying there.  Can you
elaborate?



Rather than walking through the requirements, configure and make/make
install steps, just forward people to the distro specific wiki on "how
to build mesa/kernel" and explicitly mention the differences:
mesa:
- XA must be enabled: --enable-xa
- svga must be listed in the gallium drivers:
--with-gallium-drivers=svga...

kernel:
- Set DRM_VMWGFX

others...



I guess I've never seen those wikis.  I'd have to search for them, but
I really don't have the time now.

We actually have an in-house shell script that installs all the
pre-req packages, pulls the git trees, builds and installs for a
variety of guest OSes.  But it has some VMware-specific stuff that I'd
have to trim out before making public.




Related: does the upstream [1] vmwgfx module work well when combined
with upstream core drm across different versions ? Considering how
well Thomas is handling upstreaming shouldn't the module from the
kernel be recommended ?



Either should be fine at this point but the build instructions cover
the case of one having an older distro that may not have the
GL3-enabled kernel module already.



The upstream[1] vmwgfx module should work well with any linux kernel
dating back to 2.6.32 unless the distro has changed the kernel API from
the base version. It ships with builtin stripped drm and ttm to handle
compatibility issues, and is intended for people (mostly including
ourselves and our QA team) that want to try out new features without
installing a completely new kernel.


Ok seems that my point is too subtle, so I'll try from another angle.

The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
"keep drm.ko". If we ignore the unlikely cases where either one and/or
both is built-in, we can have a case where the new vmwgfx is build
against core drm from the upstream, yet the downstream drm module
is/gets loaded. As core drm often goes through various changes, you
can see how bad things are likely to happen.



Well, the above-mentioned build script doesn't touch drm.ko and works on
about 14 different versions of Ubuntu, Mint, Fedora, RHEL, etc. so I don't
think we've ever seen that conflict.  But if someone's doing their own
kernel/graphics builds/installs, who knows.  If it comes up, we'll just have
to address it.


Ouch... I see what's happening here. You're not using any of the
kernel core drm/ttm/foo - you're just static linking the local ones
into vmwgfx.ko. This will explain why the lack of issues.

Well played guys !

Cheers,
Emil


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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-13 Thread Valera Rozuvan
Hi Brian,

The updated instructions worked for me. Thank you = )

Regards,
Valera Rozuvan | http://valera.rozuvan.net/

Skype: valera.rozuvan
E-mail: valera.rozu...@gmail.com
Phone: +38 (050) 837-29-73



On Wed, Nov 11, 2015 at 11:18 PM, Emil Velikov  wrote:
> On 11 November 2015 at 19:51, Brian Paul  wrote:
>> On 11/11/2015 11:38 AM, Emil Velikov wrote:
>>>
>>> On 11 November 2015 at 18:25, Thomas Hellstrom 
>>> wrote:

 On 11/11/2015 07:07 PM, Brian Paul wrote:
>
> On 11/11/2015 10:44 AM, Emil Velikov wrote:
>>
>> On 11 November 2015 at 16:48, Brian Paul  wrote:
>>>
>>> On 11/11/2015 08:44 AM, Emil Velikov wrote:
>>
>>

 I have seen similar type of documents in the past, most of which
 going
 out of date very quickly due to distribution changes and/or others.
 Wondering how you'll feel about "check your distro and add svga to
 the
 gallium-drivers array" style of instructions ?
>>>
>>>
>>>
>>> I'm afraid I don't quite understand what you're saying there.  Can you
>>> elaborate?
>>>
>>>
>> Rather than walking through the requirements, configure and make/make
>> install steps, just forward people to the distro specific wiki on "how
>> to build mesa/kernel" and explicitly mention the differences:
>> mesa:
>> - XA must be enabled: --enable-xa
>> - svga must be listed in the gallium drivers:
>> --with-gallium-drivers=svga...
>>
>> kernel:
>>- Set DRM_VMWGFX
>>
>> others...
>
>
> I guess I've never seen those wikis.  I'd have to search for them, but
> I really don't have the time now.
>
> We actually have an in-house shell script that installs all the
> pre-req packages, pulls the git trees, builds and installs for a
> variety of guest OSes.  But it has some VMware-specific stuff that I'd
> have to trim out before making public.
>
>
>>
>> Related: does the upstream [1] vmwgfx module work well when combined
>> with upstream core drm across different versions ? Considering how
>> well Thomas is handling upstreaming shouldn't the module from the
>> kernel be recommended ?
>
>
> Either should be fine at this point but the build instructions cover
> the case of one having an older distro that may not have the
> GL3-enabled kernel module already.
>

 The upstream[1] vmwgfx module should work well with any linux kernel
 dating back to 2.6.32 unless the distro has changed the kernel API from
 the base version. It ships with builtin stripped drm and ttm to handle
 compatibility issues, and is intended for people (mostly including
 ourselves and our QA team) that want to try out new features without
 installing a completely new kernel.

>>> Ok seems that my point is too subtle, so I'll try from another angle.
>>>
>>> The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
>>> "keep drm.ko". If we ignore the unlikely cases where either one and/or
>>> both is built-in, we can have a case where the new vmwgfx is build
>>> against core drm from the upstream, yet the downstream drm module
>>> is/gets loaded. As core drm often goes through various changes, you
>>> can see how bad things are likely to happen.
>>
>>
>> Well, the above-mentioned build script doesn't touch drm.ko and works on
>> about 14 different versions of Ubuntu, Mint, Fedora, RHEL, etc. so I don't
>> think we've ever seen that conflict.  But if someone's doing their own
>> kernel/graphics builds/installs, who knows.  If it comes up, we'll just have
>> to address it.
>>
> Ouch... I see what's happening here. You're not using any of the
> kernel core drm/ttm/foo - you're just static linking the local ones
> into vmwgfx.ko. This will explain why the lack of issues.
>
> Well played guys !
>
> Cheers,
> Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Emil Velikov
On 11 November 2015 at 16:48, Brian Paul  wrote:
> On 11/11/2015 08:44 AM, Emil Velikov wrote:

>>
>> I have seen similar type of documents in the past, most of which going
>> out of date very quickly due to distribution changes and/or others.
>> Wondering how you'll feel about "check your distro and add svga to the
>> gallium-drivers array" style of instructions ?
>
>
> I'm afraid I don't quite understand what you're saying there.  Can you
> elaborate?
>
>
Rather than walking through the requirements, configure and make/make
install steps, just forward people to the distro specific wiki on "how
to build mesa/kernel" and explicitly mention the differences:
mesa:
- XA must be enabled: --enable-xa
- svga must be listed in the gallium drivers: --with-gallium-drivers=svga...

kernel:
 - Set DRM_VMWGFX

others...

Related: does the upstream [1] vmwgfx module work well when combined
with upstream core drm across different versions ? Considering how
well Thomas is handling upstreaming shouldn't the module from the
kernel be recommended ?

For example some of us had nasty experiences where versions of vmware
player/workstation ships/builds/uses kernel modules which "clash" with
the ones already bundled in the kernel package. With "clash" - there
is no guarantee whether the upstream or downstream module gets loaded,
and due difference in the symbols provided one does encounter
"function_foo() error Invalid argument" type of messages, and
ultimately things just not working.

Thanks
Emil

[1] http://cgit.freedesktop.org/mesa/vmwgfx/
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Brian Paul

On 11/11/2015 09:58 AM, Ilia Mirkin wrote:

On Wed, Nov 11, 2015 at 11:48 AM, Brian Paul  wrote:

I think there is a hunk missing about --enable-texture-float for
ARB_texture_float (and ultimately GL 3.0).



N/A; that option defines the TEXTURE_FLOAT_ENABLED symbol which is only
tested in _mesa_enable_sw_extensions().


boolean
util_format_is_supported(enum pipe_format format, unsigned bind)
{
if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) {
   return FALSE;
}

#ifndef TEXTURE_FLOAT_ENABLED
if ((bind & PIPE_BIND_RENDER_TARGET) &&
format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
format != PIPE_FORMAT_R11G11B10_FLOAT &&
util_format_is_float(format)) {
   return FALSE;
}
#endif

return TRUE;
}



Oops, I git-grep'd only src/mesa/.  But in any case, we don't use 
util_format_is_supported() in the VMware driver and 
--enable-texture-float is not needed to get GL 3.3.


-Brian

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Ilia Mirkin
On Wed, Nov 11, 2015 at 11:58 AM, Ilia Mirkin  wrote:
> On Wed, Nov 11, 2015 at 11:48 AM, Brian Paul  wrote:
>>> I think there is a hunk missing about --enable-texture-float for
>>> ARB_texture_float (and ultimately GL 3.0).
>>
>>
>> N/A; that option defines the TEXTURE_FLOAT_ENABLED symbol which is only
>> tested in _mesa_enable_sw_extensions().
>
> boolean
> util_format_is_supported(enum pipe_format format, unsigned bind)
> {
>if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) {
>   return FALSE;
>}
>
> #ifndef TEXTURE_FLOAT_ENABLED
>if ((bind & PIPE_BIND_RENDER_TARGET) &&
>format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
>format != PIPE_FORMAT_R11G11B10_FLOAT &&
>util_format_is_float(format)) {
>   return FALSE;
>}
> #endif
>
>return TRUE;
> }

Which is, amusingly, only used by the various hw drivers:

src/gallium/drivers/freedreno/a2xx/fd2_screen.c:
 !util_format_is_supported(format, usage)) {
src/gallium/drivers/freedreno/a3xx/fd3_screen.c:
 !util_format_is_supported(format, usage)) {
src/gallium/drivers/freedreno/a4xx/fd4_screen.c:
 !util_format_is_supported(format, usage)) {
src/gallium/drivers/i915/i915_screen.c:   if
(!util_format_is_supported(format, tex_usage))
src/gallium/drivers/ilo/ilo_screen.c:   if
(!util_format_is_supported(format, bindings))
src/gallium/drivers/nouveau/nv30/nv30_screen.c:   if
(!util_format_is_supported(format, bindings)) {
src/gallium/drivers/nouveau/nv50/nv50_screen.c:   if
(!util_format_is_supported(format, bindings))
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c:   if
(!util_format_is_supported(format, bindings))
src/gallium/drivers/r300/r300_screen.c:if
(!util_format_is_supported(format, usage))
src/gallium/drivers/r600/evergreen_state.c: if
(!util_format_is_supported(format, usage))
src/gallium/drivers/r600/r600_state.c:  if
(!util_format_is_supported(format, usage))
src/gallium/drivers/radeonsi/si_state.c:if
(!util_format_is_supported(format, usage))
src/gallium/drivers/vc4/vc4_screen.c:
!util_format_is_supported(format, usage)) {
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Brian Paul

On 11/09/2015 09:24 PM, Valera Rozuvan wrote:

On Tue, Nov 10, 2015 at 4:13 AM, Brian Paul  wrote:

After running depmod, you probably need to update the initramfs with: 'sudo 
update-initramfs -u'

-Brian


Hi Brian. First of all, thank you for your reply. I have tried your
suggestion on my working setup, and also doing everything again from
scratch. Basically, I get the same result - everything goes smoothly,
but in the end OpenGL is version 2.1. I even tried to run a simple
OpenGL 3.x program, and it crashes (simple OpenGL 2.1 program runs
fine).

Can you please spend an hour and try the instructions from
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mesa3d.org_vmware-2Dguest.html=BQIBaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=f2dfCFlDZuGGllk3HIqWXUyWbl6sPO1sA7SlX-79UG8=emo24XVRAaQOlitBEbGNBjqB348c25cFStvxj413YcU=
  on a clean VMware Workstation
12 Player for Windows 64-bit (host), and Ubuntu 15.10 (guest)? It
would be very awesome if you can get OpenGL 3.x running in VMware 12,
and update the instructions. I am sure there is some critical piece
missing.

Thank you! = )


I went through the instructions again and updated the Mesa configure 
command:


  cd $TOP/mesa
  ./autogen.sh --prefix=/usr --libdir=${LIBDIR} 
--with-gallium-drivers=svga --with-dri-drivers=swrast --enable-xa 
--disable-dri3 --enable-glx-tls


Things worked for me here.

Can you send me your vmware.log file from the VM (off-list)?  Maybe 
something's wrong host-side.


-Brian

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Thomas Hellstrom
On 11/11/2015 07:07 PM, Brian Paul wrote:
> On 11/11/2015 10:44 AM, Emil Velikov wrote:
>> On 11 November 2015 at 16:48, Brian Paul  wrote:
>>> On 11/11/2015 08:44 AM, Emil Velikov wrote:
>>

 I have seen similar type of documents in the past, most of which going
 out of date very quickly due to distribution changes and/or others.
 Wondering how you'll feel about "check your distro and add svga to the
 gallium-drivers array" style of instructions ?
>>>
>>>
>>> I'm afraid I don't quite understand what you're saying there.  Can you
>>> elaborate?
>>>
>>>
>> Rather than walking through the requirements, configure and make/make
>> install steps, just forward people to the distro specific wiki on "how
>> to build mesa/kernel" and explicitly mention the differences:
>> mesa:
>> - XA must be enabled: --enable-xa
>> - svga must be listed in the gallium drivers:
>> --with-gallium-drivers=svga...
>>
>> kernel:
>>   - Set DRM_VMWGFX
>>
>> others...
>
> I guess I've never seen those wikis.  I'd have to search for them, but
> I really don't have the time now.
>
> We actually have an in-house shell script that installs all the
> pre-req packages, pulls the git trees, builds and installs for a
> variety of guest OSes.  But it has some VMware-specific stuff that I'd
> have to trim out before making public.
>
>
>>
>> Related: does the upstream [1] vmwgfx module work well when combined
>> with upstream core drm across different versions ? Considering how
>> well Thomas is handling upstreaming shouldn't the module from the
>> kernel be recommended ?
>
> Either should be fine at this point but the build instructions cover
> the case of one having an older distro that may not have the
> GL3-enabled kernel module already.
>

The upstream[1] vmwgfx module should work well with any linux kernel
dating back to 2.6.32 unless the distro has changed the kernel API from
the base version. It ships with builtin stripped drm and ttm to handle
compatibility issues, and is intended for people (mostly including
ourselves and our QA team) that want to try out new features without
installing a completely new kernel.

/Thomas


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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Brian Paul

On 11/11/2015 08:44 AM, Emil Velikov wrote:

Hi Brian,

On 10 November 2015 at 16:48, Brian Paul  wrote:

On 11/09/2015 09:24 PM, Valera Rozuvan wrote:


On Tue, Nov 10, 2015 at 4:13 AM, Brian Paul  wrote:


After running depmod, you probably need to update the initramfs with:
'sudo update-initramfs -u'

-Brian



Hi Brian. First of all, thank you for your reply. I have tried your
suggestion on my working setup, and also doing everything again from
scratch. Basically, I get the same result - everything goes smoothly,
but in the end OpenGL is version 2.1. I even tried to run a simple
OpenGL 3.x program, and it crashes (simple OpenGL 2.1 program runs
fine).

Can you please spend an hour and try the instructions from

https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mesa3d.org_vmware-2Dguest.html=BQIBaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=f2dfCFlDZuGGllk3HIqWXUyWbl6sPO1sA7SlX-79UG8=emo24XVRAaQOlitBEbGNBjqB348c25cFStvxj413YcU=
on a clean VMware Workstation
12 Player for Windows 64-bit (host), and Ubuntu 15.10 (guest)? It
would be very awesome if you can get OpenGL 3.x running in VMware 12,
and update the instructions. I am sure there is some critical piece
missing.

Thank you! = )



I've reviewed and updated the instructions at
https://urldefense.proofpoint.com/v2/url?u=http-3A__mesa3d.org_vmware-2Dguest.html=BQIFaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=8UjWNV8TUt02VRSItAMguiKXASEh2kzlITp9wZQKoBU=sf309mmdWTsjAQi6L5RoKDbJP4xmIpTkAu8KmEa0kLo=

In particular, the --libdir option is different for Ubuntu and I've updated
some info about installing the kernel module.

Let me know how that goes.


I think there is a hunk missing about --enable-texture-float for
ARB_texture_float (and ultimately GL 3.0).


N/A; that option defines the TEXTURE_FLOAT_ENABLED symbol which is only 
tested in _mesa_enable_sw_extensions().





I have seen similar type of documents in the past, most of which going
out of date very quickly due to distribution changes and/or others.
Wondering how you'll feel about "check your distro and add svga to the
gallium-drivers array" style of instructions ?


I'm afraid I don't quite understand what you're saying there.  Can you 
elaborate?




I'm not volunteering or
suggesting that one has to rewrite them, mostly curious.





Can you please sync the changes between mesa3d.org and the git repo.
Assuming only vmware-guest.html differs yet I've haven't checked the
rest bth.


I put the tentative updates on the website so that Valera could access 
them easily and test.  Once they're confirmed to work, I'll commit the 
changes into the git tree.  I figured that'd be easier for Valera to use 
than a patch against the html code.


-Brian

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Ilia Mirkin
On Wed, Nov 11, 2015 at 11:48 AM, Brian Paul  wrote:
>> I think there is a hunk missing about --enable-texture-float for
>> ARB_texture_float (and ultimately GL 3.0).
>
>
> N/A; that option defines the TEXTURE_FLOAT_ENABLED symbol which is only
> tested in _mesa_enable_sw_extensions().

boolean
util_format_is_supported(enum pipe_format format, unsigned bind)
{
   if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) {
  return FALSE;
   }

#ifndef TEXTURE_FLOAT_ENABLED
   if ((bind & PIPE_BIND_RENDER_TARGET) &&
   format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
   format != PIPE_FORMAT_R11G11B10_FLOAT &&
   util_format_is_float(format)) {
  return FALSE;
   }
#endif

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Brian Paul

On 11/11/2015 10:44 AM, Emil Velikov wrote:

On 11 November 2015 at 16:48, Brian Paul  wrote:

On 11/11/2015 08:44 AM, Emil Velikov wrote:




I have seen similar type of documents in the past, most of which going
out of date very quickly due to distribution changes and/or others.
Wondering how you'll feel about "check your distro and add svga to the
gallium-drivers array" style of instructions ?



I'm afraid I don't quite understand what you're saying there.  Can you
elaborate?



Rather than walking through the requirements, configure and make/make
install steps, just forward people to the distro specific wiki on "how
to build mesa/kernel" and explicitly mention the differences:
mesa:
- XA must be enabled: --enable-xa
- svga must be listed in the gallium drivers: --with-gallium-drivers=svga...

kernel:
  - Set DRM_VMWGFX

others...


I guess I've never seen those wikis.  I'd have to search for them, but I 
really don't have the time now.


We actually have an in-house shell script that installs all the pre-req 
packages, pulls the git trees, builds and installs for a variety of 
guest OSes.  But it has some VMware-specific stuff that I'd have to trim 
out before making public.





Related: does the upstream [1] vmwgfx module work well when combined
with upstream core drm across different versions ? Considering how
well Thomas is handling upstreaming shouldn't the module from the
kernel be recommended ?


Either should be fine at this point but the build instructions cover the 
case of one having an older distro that may not have the GL3-enabled 
kernel module already.





For example some of us had nasty experiences where versions of vmware
player/workstation ships/builds/uses kernel modules which "clash" with
the ones already bundled in the kernel package. With "clash" - there
is no guarantee whether the upstream or downstream module gets loaded,
and due difference in the symbols provided one does encounter
"function_foo() error Invalid argument" type of messages, and
ultimately things just not working.


I don't think I've ever had much trouble with that.  The host-side Linux 
kernel modules aren't really my area so I can't say much about that.


-Brian


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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Emil Velikov
Hi Brian,

On 10 November 2015 at 16:48, Brian Paul  wrote:
> On 11/09/2015 09:24 PM, Valera Rozuvan wrote:
>>
>> On Tue, Nov 10, 2015 at 4:13 AM, Brian Paul  wrote:
>>>
>>> After running depmod, you probably need to update the initramfs with:
>>> 'sudo update-initramfs -u'
>>>
>>> -Brian
>>
>>
>> Hi Brian. First of all, thank you for your reply. I have tried your
>> suggestion on my working setup, and also doing everything again from
>> scratch. Basically, I get the same result - everything goes smoothly,
>> but in the end OpenGL is version 2.1. I even tried to run a simple
>> OpenGL 3.x program, and it crashes (simple OpenGL 2.1 program runs
>> fine).
>>
>> Can you please spend an hour and try the instructions from
>>
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mesa3d.org_vmware-2Dguest.html=BQIBaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=f2dfCFlDZuGGllk3HIqWXUyWbl6sPO1sA7SlX-79UG8=emo24XVRAaQOlitBEbGNBjqB348c25cFStvxj413YcU=
>> on a clean VMware Workstation
>> 12 Player for Windows 64-bit (host), and Ubuntu 15.10 (guest)? It
>> would be very awesome if you can get OpenGL 3.x running in VMware 12,
>> and update the instructions. I am sure there is some critical piece
>> missing.
>>
>> Thank you! = )
>
>
> I've reviewed and updated the instructions at
> http://mesa3d.org/vmware-guest.html
>
> In particular, the --libdir option is different for Ubuntu and I've updated
> some info about installing the kernel module.
>
> Let me know how that goes.
>
I think there is a hunk missing about --enable-texture-float for
ARB_texture_float (and ultimately GL 3.0).

I have seen similar type of documents in the past, most of which going
out of date very quickly due to distribution changes and/or others.
Wondering how you'll feel about "check your distro and add svga to the
gallium-drivers array" style of instructions ? I'm not volunteering or
suggesting that one has to rewrite them, mostly curious.

Can you please sync the changes between mesa3d.org and the git repo.
Assuming only vmware-guest.html differs yet I've haven't checked the
rest bth.

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Brian Paul

On 11/11/2015 11:38 AM, Emil Velikov wrote:

On 11 November 2015 at 18:25, Thomas Hellstrom  wrote:

On 11/11/2015 07:07 PM, Brian Paul wrote:

On 11/11/2015 10:44 AM, Emil Velikov wrote:

On 11 November 2015 at 16:48, Brian Paul  wrote:

On 11/11/2015 08:44 AM, Emil Velikov wrote:




I have seen similar type of documents in the past, most of which going
out of date very quickly due to distribution changes and/or others.
Wondering how you'll feel about "check your distro and add svga to the
gallium-drivers array" style of instructions ?



I'm afraid I don't quite understand what you're saying there.  Can you
elaborate?



Rather than walking through the requirements, configure and make/make
install steps, just forward people to the distro specific wiki on "how
to build mesa/kernel" and explicitly mention the differences:
mesa:
- XA must be enabled: --enable-xa
- svga must be listed in the gallium drivers:
--with-gallium-drivers=svga...

kernel:
   - Set DRM_VMWGFX

others...


I guess I've never seen those wikis.  I'd have to search for them, but
I really don't have the time now.

We actually have an in-house shell script that installs all the
pre-req packages, pulls the git trees, builds and installs for a
variety of guest OSes.  But it has some VMware-specific stuff that I'd
have to trim out before making public.




Related: does the upstream [1] vmwgfx module work well when combined
with upstream core drm across different versions ? Considering how
well Thomas is handling upstreaming shouldn't the module from the
kernel be recommended ?


Either should be fine at this point but the build instructions cover
the case of one having an older distro that may not have the
GL3-enabled kernel module already.



The upstream[1] vmwgfx module should work well with any linux kernel
dating back to 2.6.32 unless the distro has changed the kernel API from
the base version. It ships with builtin stripped drm and ttm to handle
compatibility issues, and is intended for people (mostly including
ourselves and our QA team) that want to try out new features without
installing a completely new kernel.


Ok seems that my point is too subtle, so I'll try from another angle.

The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
"keep drm.ko". If we ignore the unlikely cases where either one and/or
both is built-in, we can have a case where the new vmwgfx is build
against core drm from the upstream, yet the downstream drm module
is/gets loaded. As core drm often goes through various changes, you
can see how bad things are likely to happen.


Well, the above-mentioned build script doesn't touch drm.ko and works on 
about 14 different versions of Ubuntu, Mint, Fedora, RHEL, etc. so I 
don't think we've ever seen that conflict.  But if someone's doing their 
own kernel/graphics builds/installs, who knows.  If it comes up, we'll 
just have to address it.





TL;DR: If using vmwgfx.ko from upstream one should also pick drm.ko ?


I haven't done so.




Cheers,
Emil

Note: I've not experienced this, although I had the pleasure of
dealing with similar issues. Props to your colleague who updated the
start up scripts to honour the existing vmmon & co modules.



-Brian

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Emil Velikov
On 11 November 2015 at 18:25, Thomas Hellstrom  wrote:
> On 11/11/2015 07:07 PM, Brian Paul wrote:
>> On 11/11/2015 10:44 AM, Emil Velikov wrote:
>>> On 11 November 2015 at 16:48, Brian Paul  wrote:
 On 11/11/2015 08:44 AM, Emil Velikov wrote:
>>>
>
> I have seen similar type of documents in the past, most of which going
> out of date very quickly due to distribution changes and/or others.
> Wondering how you'll feel about "check your distro and add svga to the
> gallium-drivers array" style of instructions ?


 I'm afraid I don't quite understand what you're saying there.  Can you
 elaborate?


>>> Rather than walking through the requirements, configure and make/make
>>> install steps, just forward people to the distro specific wiki on "how
>>> to build mesa/kernel" and explicitly mention the differences:
>>> mesa:
>>> - XA must be enabled: --enable-xa
>>> - svga must be listed in the gallium drivers:
>>> --with-gallium-drivers=svga...
>>>
>>> kernel:
>>>   - Set DRM_VMWGFX
>>>
>>> others...
>>
>> I guess I've never seen those wikis.  I'd have to search for them, but
>> I really don't have the time now.
>>
>> We actually have an in-house shell script that installs all the
>> pre-req packages, pulls the git trees, builds and installs for a
>> variety of guest OSes.  But it has some VMware-specific stuff that I'd
>> have to trim out before making public.
>>
>>
>>>
>>> Related: does the upstream [1] vmwgfx module work well when combined
>>> with upstream core drm across different versions ? Considering how
>>> well Thomas is handling upstreaming shouldn't the module from the
>>> kernel be recommended ?
>>
>> Either should be fine at this point but the build instructions cover
>> the case of one having an older distro that may not have the
>> GL3-enabled kernel module already.
>>
>
> The upstream[1] vmwgfx module should work well with any linux kernel
> dating back to 2.6.32 unless the distro has changed the kernel API from
> the base version. It ships with builtin stripped drm and ttm to handle
> compatibility issues, and is intended for people (mostly including
> ourselves and our QA team) that want to try out new features without
> installing a completely new kernel.
>
Ok seems that my point is too subtle, so I'll try from another angle.

The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
"keep drm.ko". If we ignore the unlikely cases where either one and/or
both is built-in, we can have a case where the new vmwgfx is build
against core drm from the upstream, yet the downstream drm module
is/gets loaded. As core drm often goes through various changes, you
can see how bad things are likely to happen.

TL;DR: If using vmwgfx.ko from upstream one should also pick drm.ko ?

Cheers,
Emil

Note: I've not experienced this, although I had the pleasure of
dealing with similar issues. Props to your colleague who updated the
start up scripts to honour the existing vmmon & co modules.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Thomas Hellstrom
On 11/11/2015 08:51 PM, Brian Paul wrote:
> On 11/11/2015 11:38 AM, Emil Velikov wrote:
>> On 11 November 2015 at 18:25, Thomas Hellstrom
>>  wrote:
>>> On 11/11/2015 07:07 PM, Brian Paul wrote:
 On 11/11/2015 10:44 AM, Emil Velikov wrote:
> On 11 November 2015 at 16:48, Brian Paul  wrote:
>> On 11/11/2015 08:44 AM, Emil Velikov wrote:
>
>>>
>>> I have seen similar type of documents in the past, most of which
>>> going
>>> out of date very quickly due to distribution changes and/or others.
>>> Wondering how you'll feel about "check your distro and add svga
>>> to the
>>> gallium-drivers array" style of instructions ?
>>
>>
>> I'm afraid I don't quite understand what you're saying there. 
>> Can you
>> elaborate?
>>
>>
> Rather than walking through the requirements, configure and make/make
> install steps, just forward people to the distro specific wiki on
> "how
> to build mesa/kernel" and explicitly mention the differences:
> mesa:
> - XA must be enabled: --enable-xa
> - svga must be listed in the gallium drivers:
> --with-gallium-drivers=svga...
>
> kernel:
>- Set DRM_VMWGFX
>
> others...

 I guess I've never seen those wikis.  I'd have to search for them, but
 I really don't have the time now.

 We actually have an in-house shell script that installs all the
 pre-req packages, pulls the git trees, builds and installs for a
 variety of guest OSes.  But it has some VMware-specific stuff that I'd
 have to trim out before making public.


>
> Related: does the upstream [1] vmwgfx module work well when combined
> with upstream core drm across different versions ? Considering how
> well Thomas is handling upstreaming shouldn't the module from the
> kernel be recommended ?

 Either should be fine at this point but the build instructions cover
 the case of one having an older distro that may not have the
 GL3-enabled kernel module already.

>>>
>>> The upstream[1] vmwgfx module should work well with any linux kernel
>>> dating back to 2.6.32 unless the distro has changed the kernel API from
>>> the base version. It ships with builtin stripped drm and ttm to handle
>>> compatibility issues, and is intended for people (mostly including
>>> ourselves and our QA team) that want to try out new features without
>>> installing a completely new kernel.
>>>
>> Ok seems that my point is too subtle, so I'll try from another angle.
>>
>> The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
>> "keep drm.ko". If we ignore the unlikely cases where either one and/or
>> both is built-in, we can have a case where the new vmwgfx is build
>> against core drm from the upstream, yet the downstream drm module
>> is/gets loaded. As core drm often goes through various changes, you
>> can see how bad things are likely to happen.
>
Actually they are unlikely to happen since this scenario was taken into
account when the standalone vmwgfx module was designed, and unless we
have a bug it should be safe (I've seen two duplicate TTM symbols
exported in 3.19, but that's cosmetic only until another TTM aware
driver is loaded, which is currently not likely).

When built, only internal drm / ttm  headers are used, no internal drm
or ttm symbols are exported (except as stated above) and all drm and ttm
references are internally resolved except two, namely those that allow
binding to core drm's sysfs, so that the driver's sysfs interface shows
up where it should; among other things for Mir compatibility.

It's true that if these two single DRM functions change their interface,
we need to handle that, but that's a small interface to watch over; The
driver is simply designed to interoperate with core drm and TTM.

/Thomas



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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-11 Thread Emil Velikov
On 11 November 2015 at 19:51, Brian Paul  wrote:
> On 11/11/2015 11:38 AM, Emil Velikov wrote:
>>
>> On 11 November 2015 at 18:25, Thomas Hellstrom 
>> wrote:
>>>
>>> On 11/11/2015 07:07 PM, Brian Paul wrote:

 On 11/11/2015 10:44 AM, Emil Velikov wrote:
>
> On 11 November 2015 at 16:48, Brian Paul  wrote:
>>
>> On 11/11/2015 08:44 AM, Emil Velikov wrote:
>
>
>>>
>>> I have seen similar type of documents in the past, most of which
>>> going
>>> out of date very quickly due to distribution changes and/or others.
>>> Wondering how you'll feel about "check your distro and add svga to
>>> the
>>> gallium-drivers array" style of instructions ?
>>
>>
>>
>> I'm afraid I don't quite understand what you're saying there.  Can you
>> elaborate?
>>
>>
> Rather than walking through the requirements, configure and make/make
> install steps, just forward people to the distro specific wiki on "how
> to build mesa/kernel" and explicitly mention the differences:
> mesa:
> - XA must be enabled: --enable-xa
> - svga must be listed in the gallium drivers:
> --with-gallium-drivers=svga...
>
> kernel:
>- Set DRM_VMWGFX
>
> others...


 I guess I've never seen those wikis.  I'd have to search for them, but
 I really don't have the time now.

 We actually have an in-house shell script that installs all the
 pre-req packages, pulls the git trees, builds and installs for a
 variety of guest OSes.  But it has some VMware-specific stuff that I'd
 have to trim out before making public.


>
> Related: does the upstream [1] vmwgfx module work well when combined
> with upstream core drm across different versions ? Considering how
> well Thomas is handling upstreaming shouldn't the module from the
> kernel be recommended ?


 Either should be fine at this point but the build instructions cover
 the case of one having an older distro that may not have the
 GL3-enabled kernel module already.

>>>
>>> The upstream[1] vmwgfx module should work well with any linux kernel
>>> dating back to 2.6.32 unless the distro has changed the kernel API from
>>> the base version. It ships with builtin stripped drm and ttm to handle
>>> compatibility issues, and is intended for people (mostly including
>>> ourselves and our QA team) that want to try out new features without
>>> installing a completely new kernel.
>>>
>> Ok seems that my point is too subtle, so I'll try from another angle.
>>
>> The wiki instructions say "nuke he vmwgfx.ko module" and implicitly
>> "keep drm.ko". If we ignore the unlikely cases where either one and/or
>> both is built-in, we can have a case where the new vmwgfx is build
>> against core drm from the upstream, yet the downstream drm module
>> is/gets loaded. As core drm often goes through various changes, you
>> can see how bad things are likely to happen.
>
>
> Well, the above-mentioned build script doesn't touch drm.ko and works on
> about 14 different versions of Ubuntu, Mint, Fedora, RHEL, etc. so I don't
> think we've ever seen that conflict.  But if someone's doing their own
> kernel/graphics builds/installs, who knows.  If it comes up, we'll just have
> to address it.
>
Ouch... I see what's happening here. You're not using any of the
kernel core drm/ttm/foo - you're just static linking the local ones
into vmwgfx.ko. This will explain why the lack of issues.

Well played guys !

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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-10 Thread Brian Paul

On 11/09/2015 09:24 PM, Valera Rozuvan wrote:

On Tue, Nov 10, 2015 at 4:13 AM, Brian Paul  wrote:

After running depmod, you probably need to update the initramfs with: 'sudo 
update-initramfs -u'

-Brian


Hi Brian. First of all, thank you for your reply. I have tried your
suggestion on my working setup, and also doing everything again from
scratch. Basically, I get the same result - everything goes smoothly,
but in the end OpenGL is version 2.1. I even tried to run a simple
OpenGL 3.x program, and it crashes (simple OpenGL 2.1 program runs
fine).

Can you please spend an hour and try the instructions from
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mesa3d.org_vmware-2Dguest.html=BQIBaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8=f2dfCFlDZuGGllk3HIqWXUyWbl6sPO1sA7SlX-79UG8=emo24XVRAaQOlitBEbGNBjqB348c25cFStvxj413YcU=
  on a clean VMware Workstation
12 Player for Windows 64-bit (host), and Ubuntu 15.10 (guest)? It
would be very awesome if you can get OpenGL 3.x running in VMware 12,
and update the instructions. I am sure there is some critical piece
missing.

Thank you! = )


I've reviewed and updated the instructions at 
http://mesa3d.org/vmware-guest.html


In particular, the --libdir option is different for Ubuntu and I've 
updated some info about installing the kernel module.


Let me know how that goes.

-Brian


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


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-10 Thread Valera Rozuvan
On Tue, Nov 10, 2015 at 4:13 AM, Brian Paul  wrote:
> After running depmod, you probably need to update the initramfs with: 'sudo 
> update-initramfs -u'
>
> -Brian

Hi Brian. First of all, thank you for your reply. I have tried your
suggestion on my working setup, and also doing everything again from
scratch. Basically, I get the same result - everything goes smoothly,
but in the end OpenGL is version 2.1. I even tried to run a simple
OpenGL 3.x program, and it crashes (simple OpenGL 2.1 program runs
fine).

Can you please spend an hour and try the instructions from
http://www.mesa3d.org/vmware-guest.html on a clean VMware Workstation
12 Player for Windows 64-bit (host), and Ubuntu 15.10 (guest)? It
would be very awesome if you can get OpenGL 3.x running in VMware 12,
and update the instructions. I am sure there is some critical piece
missing.

Thank you! = )

Regards,
Valera Rozuvan | http://valera.rozuvan.net/

Skype: valera.rozuvan
E-mail: valera.rozu...@gmail.com
Phone: +38 (050) 837-29-73
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Can't get OpenGL 3.x inside VMware Workstation 12 (Ubuntu guest)

2015-11-09 Thread Brian Paul

On 11/09/2015 05:01 PM, Valera Rozuvan wrote:

Hi,

I have been trying to follow the instructions from the page
http://www.mesa3d.org/vmware-guest.html . My host OS is Windows 7, which
has OpenGL 4.3 and DX11, my Guest OS is Ubuntu 15.10 with custom Linux
kernel 4.3. Please see detailed output from various host Ubuntu
subsystems at http://pastebin.com/Kukct9Xn . Also, I have dual GPU:
Intel(R) HD Graphics 4600 and NVIDIA GeForce GT 750M.

I have followed all of the instructions, but sill get OpenGL 2.1. What
else can I try?

By the way, on the page http://www.mesa3d.org/vmware-guest.html the step:

sudo cp 00-vmwgfx.rules /etc/udev/rules.d

can't be completed, because the file 00-vmwgfx.rules is not in the
vmwgfx folder. I got this file from
http://sourceforge.net/p/thinstation/thinstation-5/ci/c9c66d2e93fed90fa0c985df93adf3e66522bda5/tree/ts/5.2/packages/systemd/build/extra/etc/udev/rules.d/00-vmwgfx.rules
. Is this acceptable?


I need to update the docs.  The 00-vmwgfx.rules file is no longer needed.




Also, the command "sudo depmod -ae" complains about improper command
line options.


depmod -a should be enough.




Any input on my problem will be very welcome!


After running depmod, you probably need to update the initramfs with: 
'sudo update-initramfs -u'


-Brian

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