[Mesa-dev] [PATCH 12/43] intel/genxml: Sampler state is a pointer on gen4-5

Pohjolainen, Topi topi.pohjolainen at gmail.com
Wed May 17 09:08:04 UTC 2017


On Tue, May 16, 2017 at 03:45:06PM -0700, Jason Ekstrand wrote:
> ---
>  src/intel/genxml/gen4.xml                     | 6 +++---
>  src/intel/genxml/gen45.xml                    | 6 +++---
>  src/intel/genxml/gen5.xml                     | 6 +++---
>  src/mesa/drivers/dri/i965/genX_state_upload.c | 2 +-
>  4 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/intel/genxml/gen4.xml b/src/intel/genxml/gen4.xml
> index 27dd8ff..0d68125 100644
> --- a/src/intel/genxml/gen4.xml
> +++ b/src/intel/genxml/gen4.xml
> @@ -477,7 +477,7 @@
>      <field name="Maximum Number of Threads" start="153" end="158" type="uint"/>
>      <field name="URB Entry Allocation Size" start="147" end="151" type="uint"/>
>      <field name="Number of URB Entries" start="139" end="146" type="uint"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>

That is the correct name although the spec says it represents offset.

In "5.2.1.1 GS_STATE":

   "It is specified as a 32-byte-granular offset from the General State
    Pointer."

We try to follow the exact names in PRMs, right?

>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Reorder Enable" start="222" end="222" type="bool"/>
>      <field name="Discard Adjacency" start="221" end="221" type="bool"/>
> @@ -750,7 +750,7 @@
>      <field name="URB Entry Allocation Size" start="147" end="151" type="uint"/>
>      <field name="Number of URB Entries" start="139" end="146" type="uint"/>
>      <field name="Statistics Enable" start="138" end="138" type="bool"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>
>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Vertex Cache Disable" start="193" end="193" type="bool"/>
>      <field name="Enable" start="192" end="192" type="bool"/>
> @@ -779,7 +779,7 @@
>      <field name="Setup URB Entry Read Length" start="107" end="112" type="uint"/>
>      <field name="Setup URB Entry Read Offset" start="100" end="105" type="uint"/>
>      <field name="Dispatch GRF Start Register For URB Data" start="96" end="99" type="uint"/>
> -    <field name="Sampler State Offset" start="133" end="159" type="address"/>
> +    <field name="Sampler State Pointer" start="133" end="159" type="address"/>
>      <field name="Sampler Count" start="130" end="132" type="uint"/>
>      <field name="Statistics Enable" start="128" end="128" type="bool"/>
>      <field name="Maximum Number of Threads" start="185" end="191" type="uint"/>
> diff --git a/src/intel/genxml/gen45.xml b/src/intel/genxml/gen45.xml
> index e63f3bd..de6552c 100644
> --- a/src/intel/genxml/gen45.xml
> +++ b/src/intel/genxml/gen45.xml
> @@ -480,7 +480,7 @@
>      <field name="Number of URB Entries" start="139" end="146" type="uint"/>
>      <field name="GS Statistics Enable" start="138" end="138" type="bool"/>
>      <field name="Rendering Enable" start="136" end="136" type="bool"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>
>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Reorder Enable" start="222" end="222" type="bool"/>
>      <field name="Discard Adjacency" start="221" end="221" type="bool"/>
> @@ -701,7 +701,7 @@
>      <field name="URB Entry Allocation Size" start="147" end="151" type="uint"/>
>      <field name="Number of URB Entries" start="139" end="146" type="uint"/>
>      <field name="Statistics Enable" start="138" end="138" type="bool"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>
>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Vertex Cache Disable" start="193" end="193" type="bool"/>
>      <field name="Enable" start="192" end="192" type="bool"/>
> @@ -731,7 +731,7 @@
>      <field name="Setup URB Entry Read Length" start="107" end="112" type="uint"/>
>      <field name="Setup URB Entry Read Offset" start="100" end="105" type="uint"/>
>      <field name="Dispatch GRF Start Register For URB Data" start="96" end="99" type="uint"/>
> -    <field name="Sampler State Offset" start="133" end="159" type="address"/>
> +    <field name="Sampler State Pointer" start="133" end="159" type="address"/>
>      <field name="Sampler Count" start="130" end="132" type="uint"/>
>      <field name="Statistics Enable" start="128" end="128" type="bool"/>
>      <field name="Maximum Number of Threads" start="185" end="191" type="uint"/>
> diff --git a/src/intel/genxml/gen5.xml b/src/intel/genxml/gen5.xml
> index a521737..f6e912b 100644
> --- a/src/intel/genxml/gen5.xml
> +++ b/src/intel/genxml/gen5.xml
> @@ -479,7 +479,7 @@
>      <field name="GS Statistics Enable" start="138" end="138" type="bool"/>
>      <field name="SO Statistics Enable" start="137" end="137" type="bool"/>
>      <field name="Rendering Enable" start="136" end="136" type="bool"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>
>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Reorder Enable" start="222" end="222" type="bool"/>
>      <field name="Maximum VPIndex" start="192" end="195" type="uint"/>
> @@ -857,7 +857,7 @@
>      <field name="URB Entry Allocation Size" start="147" end="151" type="uint"/>
>      <field name="Number of URB Entries" start="139" end="146" type="uint"/>
>      <field name="Statistics Enable" start="138" end="138" type="bool"/>
> -    <field name="Sampler State Offset" start="165" end="191" type="address"/>
> +    <field name="Sampler State Pointer" start="165" end="191" type="address"/>
>      <field name="Sampler Count" start="160" end="162" type="uint"/>
>      <field name="Vertex Cache Disable" start="193" end="193" type="bool"/>
>      <field name="Enable" start="192" end="192" type="bool"/>
> @@ -886,7 +886,7 @@
>      <field name="Setup URB Entry Read Length" start="107" end="112" type="uint"/>
>      <field name="Setup URB Entry Read Offset" start="100" end="105" type="uint"/>
>      <field name="Dispatch GRF Start Register For URB Data" start="96" end="99" type="uint"/>
> -    <field name="Sampler State Offset" start="133" end="159" type="address"/>
> +    <field name="Sampler State Pointer" start="133" end="159" type="address"/>
>      <field name="Sampler Count" start="130" end="132" type="uint"/>
>      <field name="Statistics Enable" start="128" end="128" type="bool"/>
>      <field name="Maximum Number of Threads" start="185" end="191" type="uint"/>
> diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
> index 3921a6f..ce11d16 100644
> --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
> @@ -1827,7 +1827,7 @@ genX(upload_vs_state)(struct brw_context *brw)
>           CLAMP(brw->urb.nr_vs_entries / 2, 1, devinfo->max_vs_threads) - 1;
>  
>        vs.StatisticsEnable = false;
> -      vs.SamplerStateOffset =
> +      vs.SamplerStatePointer =
>           instruction_ro_bo(brw->batch.bo, stage_state->sampler_offset);
>  #endif
>  
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list