Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,878
    • Issues 2,878
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 903
    • Merge requests 903
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #5722

Closed
Open
Created Dec 06, 2021 by Ian Romanick@idrOwner

nir_to_tgsi_lower_tex puts some NIR texture instructions in an invalid state

This lowering pass removes the named parameters from the texture instructions (e.g., the nir_tex_src_bias parameter in a nir_texop_txb) and appends it to the nir_tex_src_coord parameter. The problem is that other optimization passes may very reasonably expect those parameters be there.

This led to failures in https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/458626. The original version of !14025 (merged) would assert that bias_idx >= 0. Nearly every other place that looks up nir_tex_src_bias for a nir_texop_txb has a similar assertion, so this seemed reasonable.

This may be fine... but it seems fishy to me. 🤷

I'd really like to add something like this to validate_tex_instr in nir_validate_shader:

   if (instr->op == nir_texop_txb) {
      validate_assert(state,
                      nir_tex_instr_src_index(instr, nir_tex_src_bias) >= 0);
   }
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking