anv: Fill out image_param structs at view creation time
This commit is contained in:
parent
e9d126f23b
commit
7363024cbd
|
@ -812,8 +812,7 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct brw_image_param *image_param =
|
||||
&cmd_buffer->state.push_constants[stage]->images[image++];
|
||||
|
||||
anv_image_view_fill_image_param(cmd_buffer->device, desc->image_view,
|
||||
image_param);
|
||||
*image_param = desc->image_view->storage_image_param;
|
||||
image_param->surface_idx = bias + s;
|
||||
break;
|
||||
}
|
||||
|
@ -838,8 +837,7 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct brw_image_param *image_param =
|
||||
&cmd_buffer->state.push_constants[stage]->images[image++];
|
||||
|
||||
anv_buffer_view_fill_image_param(cmd_buffer->device, desc->buffer_view,
|
||||
image_param);
|
||||
*image_param = desc->buffer_view->storage_image_param;
|
||||
image_param->surface_idx = bias + s;
|
||||
break;
|
||||
|
||||
|
|
|
@ -630,6 +630,9 @@ anv_image_view_init(struct anv_image_view *iview,
|
|||
iview->bo->size - iview->offset, 1);
|
||||
}
|
||||
|
||||
anv_image_view_fill_image_param(device, iview,
|
||||
&iview->storage_image_param);
|
||||
|
||||
if (!device->info.has_llc)
|
||||
anv_state_clflush(iview->storage_surface_state);
|
||||
} else {
|
||||
|
@ -734,6 +737,8 @@ anv_CreateBufferView(VkDevice _device,
|
|||
(storage_format == ISL_FORMAT_RAW ? 1 :
|
||||
format->isl_layout->bs));
|
||||
|
||||
anv_buffer_view_fill_image_param(device, view,
|
||||
&view->storage_image_param);
|
||||
} else {
|
||||
view->storage_surface_state = (struct anv_state){ 0 };
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#endif
|
||||
|
||||
#include "brw_device_info.h"
|
||||
#include "brw_compiler.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/list.h"
|
||||
|
||||
|
@ -1659,6 +1660,8 @@ struct anv_image_view {
|
|||
|
||||
/** RENDER_SURFACE_STATE when using image as a storage image. */
|
||||
struct anv_state storage_surface_state;
|
||||
|
||||
struct brw_image_param storage_image_param;
|
||||
};
|
||||
|
||||
struct anv_image_create_info {
|
||||
|
@ -1717,6 +1720,8 @@ struct anv_buffer_view {
|
|||
|
||||
struct anv_state surface_state;
|
||||
struct anv_state storage_surface_state;
|
||||
|
||||
struct brw_image_param storage_image_param;
|
||||
};
|
||||
|
||||
const struct anv_format *
|
||||
|
|
Loading…
Reference in New Issue