Quote:
Given the information I assumed that Intel has given enough information for one to program the integrated graphics by directly writing the binary instruction (or to write an assembler).
I assume that would be possible, although I have never attempted to write a graphics driver myself.
Quote:
My second theory is a user would be able to use the given instruction by utilizing Intel's mesa library (I'm assuming its precompiled and the #define statement points to the address in memory were the function resides).
Mesa/Mesa3D is a graphics library providing an implementation of OpenGL, Vulkan, and other graphics apis, and provides an interface between the graphics apis and vendor specific drivers. The Mesa library provides an abstraction for interfacing with the GPU, so whatever Mesa can do, you can most likely do.
Now, on to specifics. 3DSTATE_WM_HZ_OP is a GPU command, and has a specific opcode. Mesa defines the opcode value inside _3DSTATE_WM_HZ_OP, and the value (0x7852) is just upper half of the 1st dword of the command. Here it is broken up:
Code:
Binary Parts: 011 11 000 01010010
Hex Parts: 7| 8| 52
Referencing the command reference, you can see those same values inside of the command table under "Programming Notes".
Code:
Command Type: 011 (03h)
Command SubType: 11 (3h)
3D Command Opcode: 000 (0h)
3D Command Sub Opcode: 01010010 (52h)
The code where this define is used is inside of the
brw_upload_initial_gpu_state function which sets up an initial state for the GPU. I don't know the specifics of what this function actually does, but that is what I gathered from a quick glance.
I suggest that you also look at the subsystems of the GPU in volume 3 of the PRM (
here) to gain an understanding of each and better understand what each command is doing. However, you may do as you wish.