When are shaders copied to gpu card?

Me Self <[email protected]> Sun, 29 Dec 2024 16:21:18 +0100
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CAA6RqQxDeZkH-oA-VW99vZy=0sPLY5Zu6L3v7Ap3PSN743RxoA@mail.gmail.com>
--00000000000003f62b062a6a40c9
Content-Type: text/plain; charset="UTF-8"

Hi All

I'm assuming shaders are compiled on the CPU and linked shaders are sent to
the GPU memory and executed from there, is that correct? I can't find any
explicit documentation from kronos when it is sent to the GPU mem
specifically (in which function call), so I tried downloading the mesa
sourcecode, but while I can find the opengl header signatured of functions
such as glLinkProgram, I can't find the actual implementation (havent
touched C code in 30 years and mesa appears to be using some redirection
table on at runtime). Could someone give me some pointers, where to look?
The functions invoked by my application are roughly these:

glCreateShader
glShaderSource
glCompileShader
glAttachShader
glLinkProgram
glUseProgram
glBindVertexArray
glDrawElements

--00000000000003f62b062a6a40c9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>Hi All</div><div><br></div><div>I&#3=
9;m assuming shaders are compiled on the CPU and linked shaders are sent to=
 the GPU memory and executed from there, is that correct? I can&#39;t find =
any explicit documentation from kronos when it is sent to the GPU mem speci=
fically (in which function call), so I tried downloading the mesa sourcecod=
e, but while I can find the opengl header signatured of functions such as g=
lLinkProgram, I can&#39;t find the actual implementation (havent touched C =
code in 30 years and mesa appears to be using some redirection table on at =
runtime). Could someone give me some pointers, where to look? The functions=
 invoked by my application are roughly these:</div><div><br></div><div>glCr=
eateShader</div><div>glShaderSource</div><div>glCompileShader</div><div>glA=
ttachShader</div><div>glLinkProgram</div><div>glUseProgram</div><div>glBind=
VertexArray</div><div>glDrawElements</div><div><br></div></div>
</div>

--00000000000003f62b062a6a40c9--