i965: Update STATE_BASE_ADDRESS length for gen11+.

Submitted by Rafael Antognolli on Oct. 10, 2018, 8:30 p.m.

Details

Message ID 20181010203052.429-1-rafael.antognolli@intel.com
State New
Headers show
Series "i965: Update STATE_BASE_ADDRESS length for gen11+." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli Oct. 10, 2018, 8:30 p.m.
Starting in gen11, we have 3 more dwords used for Bindless Sampler State
pointer and size.

Cc: Anuj Phogat <anuj.phogat@gmail.com>

---
 src/mesa/drivers/dri/i965/brw_misc_state.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 0895e1f2b7f..965fbb10c4d 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -688,7 +688,8 @@  brw_upload_state_base_address(struct brw_context *brw)
        * to the bottom 4GB.
        */
       uint32_t mocs_wb = devinfo->gen >= 9 ? SKL_MOCS_WB : BDW_MOCS_WB;
-      int pkt_len = devinfo->gen >= 9 ? 19 : 16;
+      const int pkt_len =
+         devinfo->gen >= 9 ? (devinfo->gen >= 11 ? 22 : 19) : 16;
 
       BEGIN_BATCH(pkt_len);
       OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (pkt_len - 2));
@@ -717,6 +718,12 @@  brw_upload_state_base_address(struct brw_context *brw)
          OUT_BATCH(1);
          OUT_BATCH(0);
          OUT_BATCH(0);
+         if (devinfo->gen >= 11) {
+            /* Bindless Sampler State */
+            OUT_BATCH(0);
+            OUT_BATCH(0);
+            OUT_BATCH(0);
+         }
       }
       ADVANCE_BATCH();
    } else if (devinfo->gen >= 6) {

Comments

Please ignore this patch, Jordan's version is the correct one.

On Wed, Oct 10, 2018 at 01:30:52PM -0700, Rafael Antognolli wrote:
> Starting in gen11, we have 3 more dwords used for Bindless Sampler State
> pointer and size.
> 
> Cc: Anuj Phogat <anuj.phogat@gmail.com>
> 
> ---
>  src/mesa/drivers/dri/i965/brw_misc_state.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
> index 0895e1f2b7f..965fbb10c4d 100644
> --- a/src/mesa/drivers/dri/i965/brw_misc_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
> @@ -688,7 +688,8 @@ brw_upload_state_base_address(struct brw_context *brw)
>         * to the bottom 4GB.
>         */
>        uint32_t mocs_wb = devinfo->gen >= 9 ? SKL_MOCS_WB : BDW_MOCS_WB;
> -      int pkt_len = devinfo->gen >= 9 ? 19 : 16;
> +      const int pkt_len =
> +         devinfo->gen >= 9 ? (devinfo->gen >= 11 ? 22 : 19) : 16;
>  
>        BEGIN_BATCH(pkt_len);
>        OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (pkt_len - 2));
> @@ -717,6 +718,12 @@ brw_upload_state_base_address(struct brw_context *brw)
>           OUT_BATCH(1);
>           OUT_BATCH(0);
>           OUT_BATCH(0);
> +         if (devinfo->gen >= 11) {
> +            /* Bindless Sampler State */
> +            OUT_BATCH(0);
> +            OUT_BATCH(0);
> +            OUT_BATCH(0);
> +         }
>        }
>        ADVANCE_BATCH();
>     } else if (devinfo->gen >= 6) {
> -- 
> 2.17.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev