Hello, I have an interest in putting together a simple application to write pixel values from the keyboard input to a flat array of pixels on the screen. I have read through some of the open GPU documentation and found some useful instructions. I wrote some basics out in an attached document. Below, and annotated are some questions.
- How does the GPU application become separated from the rest of the application and then become initiated? Must certain values be written with OUT?
- Must CALL_FS and Initiate Texture/Vertex clause be used?
- How is Vertex AOS fetched?
- Is VTX DWORD0 0 0 (vertex fetch) the way to fetch SOA?
- What is the format for XYZ and RGB tables?
- If Vertex fetches include color values, are Texture fetches necessary?
- I'm figuring out the format/syntax, could anyone provide a little guidance, criticism to the format?
I realize if X,Y,Z etc values are being written to a DEST GPR, looping would be needed to continue to the next value.
This is just a start, if anyone has any samples of something basic/similar or any feedback would be appreciated. I don't need to learn too quick, but just small chunks in the right direction are what I'm looking for, to learn in small phases.
Ok, have a good evening, happy coding folks, I do realize OpenGL GL_DrawPixels in C would be much quicker, but this interests me, will do and learn it a little differently,
;how to initiate and separate GPU application from rest of general application CF_INST_CALL_FS mov CF_DWORD1.23, 1 ;initiate texture fetch clause textureaddressinmemory=texbaseaddress+texincreaseaddress mov US_TEX_ADDR_0, textureaddressinmemory mov US_TEX_ADDR_16, arbitraryplaceinmemfortexstorage mov US_TEX_INST_22, 1 mov TEX_DWORD0.0, 3 ;texel fetch ; ; mov CF_DWORD1.23, 1; initiate vertex fetch clause mov VAP_VTX_AOS_ADDR.2, textureaddressinmemory ; what command executes this to be read? is it VTX_DWORD0.0? mov VTX_DWORD1_GPR.9, 0 ; use x element mov VTX_INST_FETCH.SRC_GPR, AX mov VTX_INST_FETCH.DEST_GPR, BX mov VTX_DWORD1_GPR.12, 1 ; use y element mov VTX_INST_FETCH.SRC_GPR, AX mov VTX_INST_FETCH.DEST_GPR, BX mov VTX_DWORD1_GPR.15, 2 ; use z element mov VTX_INST_FETCH.SRC_GPR, AX mov VTX_INST_FETCH.DEST_GPR, BX mov VTX_DWORD0.0, 0 ;vertex fetch CF_INST_RETURN mov CF_INST_RETURN.21, 1 ;EOP ;how to fetch SOA? ;what is format for xyz table, how to specify color, rgb table?