On Mon, Feb 13, 2017 at 9:48 AM, Alex Smith <[email protected]> wrote:
> Hi Jason, > > On 13 February 2017 at 16:38, Jason Ekstrand <[email protected]> wrote: > >> This makes our driver robust to changes in spirv_to_nir which would set >> this flag on the variable. Right now, our driver relies on spirv_to_nir >> *not* setting var->data.image.write_only for correctness. Any patch >> which implements the shaderStorageImageWriteWithoutFormat will need to >> effectively revert this commit. >> > > I guess this is to ensure there aren't any regressions with just the first > of my patches? > > I'll update my patch to revert this. Do you want me to include this one in > the series when I send a new version of the other patches, or can you > handle applying this one before mine? > Either way works for me. I think it's a tiny bit easier, if you include it in the re-send. > Thanks, > Alex > > >> >> Cc: Alex Smith <[email protected]> >> --- >> src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c >> b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c >> index 8846c2e..d6b8561 100644 >> --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c >> +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c >> @@ -398,6 +398,18 @@ anv_nir_apply_pipeline_layout(struct anv_pipeline >> *pipeline, >> unsigned binding = var->data.binding; >> unsigned image_index = state.set[set].image_offsets[b >> inding]; >> >> + /* We have a very tight coupling between back-end compiler >> and >> + * state setup which requires us to fill the image surface >> state >> + * out differently if and only if the image is declared >> write-only. >> + * Right now, our state setup code sets up all images as if >> they >> + * are read-write. This means that the compiler needs to see >> + * read-only as well. >> + * >> + * Whenever we implement shaderStorageImageWriteWithoutFormat, >> we >> + * need to delete this. >> + */ >> + var->data.image.write_only = false; >> + >> var->data.driver_location = shader->num_uniforms + >> image_index * >> BRW_IMAGE_PARAM_SIZE * 4; >> } >> -- >> 2.5.0.400.gff86faf >> >> >
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
