Jump to content

What are Vulkan, openGL,directX, GPU driver.

Devin92

So I know openGL, Vulkan and driectX are apples to apples, and then there is GPU driver. But what is the functions for each of them? Can someone walk me through how, for example, a 3D object is drawn onto the screen and how openGL/directX/Vulkan and GPU driver's helped in the process?

 

Much Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Devin92 said:

So I know openGL, Vulkan and driectX are apples to apples, and then there is GPU driver. But what is the functions for each of them? Can someone walk me through how, for example, a 3D object is drawn onto the screen and how openGL/directX/Vulkan and GPU driver's helped in the process?

 

Much Thanks!

OpenGL directX and Vulkan are different graphics APIs

Hi

 

Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler

hi

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

The drivers is what tell the GPU how to interact with such thing 

An API is an interface made to make these said objects and the driver tells the GPU how to interact with it 

 

 

This is simplified but hopefully will help ;)

PC: Motherboard: ASUS B550M TUF-Plus, CPU: Ryzen 3 3100, CPU Cooler: Arctic Freezer 34, GPU: GIGABYTE WindForce GTX1650S, RAM: HyperX Fury RGB 2x8GB 3200 CL16, Case, CoolerMaster MB311L ARGB, Boot Drive: 250GB MX500, Game Drive: WD Blue 1TB 7200RPM HDD.

 

Peripherals: GK61 (Optical Gateron Red) with Mistel White/Orange keycaps, Logitech G102 (Purple), BitWit Ensemble Grey Deskpad. 

 

Audio: Logitech G432, Moondrop Starfield, Mic: Razer Siren Mini (White).

 

Phone: Pixel 3a (Purple-ish).

 

Build Log: 

Link to comment
Share on other sites

Link to post
Share on other sites

opengl , vulkan, direct x are APIs ... they're like languages or programming languages... they are languages through which you can give instructions to the video card ... want to set the resolution to this size, want to draw a rectangle here, want to make a texture this big, want to apply this texture over the object and so on...

It makes it easy for game developers to speak the same language and not have developers have to speak directly to the video card and be concerned about different quirks about video cards.

 

The gpu driver takes commands from APIs like OpenGL, DirectX , Vulkan and talks directly to the hardware in a more raw language. 

For example,

* the game may tell DirectX : "I have a texture that's 256 pixels wide, 1024 pixels tall" and I'm gonna use it on this object titled Building"  ... and

* DirectX tells the gpu driver "here's a texture that's 256 pixels wide, 1024 pixels tall" (the gpu driver doesn't care that it's gonna be on an object named building but DirectX may need to know that), put it in the video card memory 

* the gpu driver takes the texture, it looks up to see if the video card processor can actually work with such texture (the video card processor may only support square textures, or may support only at least 512 pixel wide textures), then copies that texture into a portion of ram, then tells the gpu chip "copy this chunk of data from ram into the ram on the video card"

 

The Gpu driver deals with stuff closer to hardware, like swapping data from video card ram to computer ram, if the game needs more than 4 GB of VRAM and video card has only 4 GB.

The video card driver hides away complex stuff like different number of shaders, cores, computation units ... for example a RX 460 or a RX 580 from AMD both can show up as video card with 4 GB of memory, but they have different levels of performance.

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Drama Lama said:

OpenGL directX and Vulkan are different graphics APIs

Ya so I say they are apples to apples.

3 minutes ago, TofuHaroto said:

The drivers is what tell the GPU how to interact with such thing 

An API is an interface made to make these said objects and the driver tells the GPU how to interact with it 

so we have 3 layers, GPU, API and driver. Driver interact with software (3d object), then API interact with driver and GPU?

When I want to GPU to do something, I have to first tells the driver, then driver tells GPU using API?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Devin92 said:

When I want to GPU to do something, I have to first tells the driver, then driver tells GPU using API?

The api gives certain instructions the GPU knows how to deal with them with the drivers 

They don't give instructions they show the GPU how to do it 

PC: Motherboard: ASUS B550M TUF-Plus, CPU: Ryzen 3 3100, CPU Cooler: Arctic Freezer 34, GPU: GIGABYTE WindForce GTX1650S, RAM: HyperX Fury RGB 2x8GB 3200 CL16, Case, CoolerMaster MB311L ARGB, Boot Drive: 250GB MX500, Game Drive: WD Blue 1TB 7200RPM HDD.

 

Peripherals: GK61 (Optical Gateron Red) with Mistel White/Orange keycaps, Logitech G102 (Purple), BitWit Ensemble Grey Deskpad. 

 

Audio: Logitech G432, Moondrop Starfield, Mic: Razer Siren Mini (White).

 

Phone: Pixel 3a (Purple-ish).

 

Build Log: 

Link to comment
Share on other sites

Link to post
Share on other sites

@mariushm Thank you for the informative reply.

So driver control the resources of the GPU (ram, shader, cu etc.) and get instruction from software what need to be shown. Driver come up with how to actually accomplish said requests by arranging the resources  it has. Then translate the instructions into hardware languages using one of the APIs, for GPU to actually do the work.

Am I getting it right?

Link to comment
Share on other sites

Link to post
Share on other sites

Let me insert myself into this thread. Let's start at the hardware level. GPU is a processor, so it has an instruction set (AMD GCN ISA manual). The instruction set defines all of the tasks that any processor is able to do. But GPU is a whole subsystem that communicates through a bus with the system, so it has some kind of protocol that encapsulates the instructions.

 

Then we have the GPU driver - this is the link between the operating system and the GPU. Operating system needs drivers for all devices in order to know how to speak to them. It defines the protocol.

 

For now, let's skip to the last part of the chain - the application (it doesn't need to be a game). The app needs to use the GPU, so if there was nothing in between, it would talk to the driver. Every GPU generation has a different architecture which may warrant changes to its instruction set. That would be very ineffective and that is why majority of developers don't do that. If the apps wanted to support every GPU architecture, then they would need to keep up with all the changes that come with every new GPU - that sounds like a lot of work, doesn't it? Insert APIs. API stands for application programming interface. It's a fixed set of conventions (an interface - function names, data formats...) that developers can use to connect software with other software. It's a bridge between the GPU driver and the application so that the application is easy enough to develop and maintain.

 

It's hard to give you an example what exactly goes on at any stage because the programming APIs are already on a lower level. If you were programming an app, you would be using a rendering library like SDL. If we are talking 3D graphics, that is even more complicated and way over my head. I hope that I cleared it up for you :)

My heart belongs to AMD but that doesn't mean I furiously hate Intel or NVIDIA :)

 

MAIN RIG AMD Ryzen 7 1700 | ASRock Fatal1ty X370 Gaming-ITX/ac | MSI HD7950 OC 3GB | G.Skill Ripjaws V 2x8GB @ 2666MHz (Samsung D-Die) | ADATA SX8200 480GB NVMe SSD & Seagate Barracuda 120 1TB SSD & WD Black 500GB | Sharkoon QB One

 

LAPTOP Lenovo Yoga Slim 7 (14ARE05) - AMD Ryzen 5 4500U | AMD Vega 8 (Renoir) | 16GB RAM | SKHynix PC601 512GB (OEM) | 1080p 300nit non-touch display

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×