mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
dzn: Pass the maximum stream size to d3d12_pipeline_state_stream_new_desc()
This way we can use d3d12_pipeline_state_stream_new_desc() directly
without doing
if (type == GRAPHICS)
d3d12_gfx_pipeline_state_stream_new_desc()
else
d3d12_compute_pipeline_state_stream_new_desc()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17140>
This commit is contained in:
parent
e4e531732b
commit
31357f3cf4
1 changed files with 4 additions and 4 deletions
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "util/u_debug.h"
|
||||
|
||||
#define d3d12_pipeline_state_stream_new_desc(__stream, __pipetype, __id, __type, __desc) \
|
||||
#define d3d12_pipeline_state_stream_new_desc(__stream, __maxstreamsz, __id, __type, __desc) \
|
||||
__type *__desc; \
|
||||
do { \
|
||||
struct { \
|
||||
|
|
@ -48,17 +48,17 @@
|
|||
(__stream)->SizeInBytes = ALIGN_POT((__stream)->SizeInBytes, alignof(void *)); \
|
||||
__wrapper = (void *)((uint8_t *)(__stream)->pPipelineStateSubobjectStream + (__stream)->SizeInBytes); \
|
||||
(__stream)->SizeInBytes += sizeof(*__wrapper); \
|
||||
assert((__stream)->SizeInBytes <= MAX_ ## __pipetype ## _PIPELINE_STATE_STREAM_SIZE); \
|
||||
assert((__stream)->SizeInBytes <= __maxstreamsz); \
|
||||
__wrapper->type = D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ ## __id; \
|
||||
__desc = &__wrapper->desc; \
|
||||
memset(__desc, 0, sizeof(*__desc)); \
|
||||
} while (0)
|
||||
|
||||
#define d3d12_gfx_pipeline_state_stream_new_desc(__stream, __id, __type, __desc) \
|
||||
d3d12_pipeline_state_stream_new_desc(__stream, GFX, __id, __type, __desc)
|
||||
d3d12_pipeline_state_stream_new_desc(__stream, MAX_GFX_PIPELINE_STATE_STREAM_SIZE, __id, __type, __desc)
|
||||
|
||||
#define d3d12_compute_pipeline_state_stream_new_desc(__stream, __id, __type, __desc) \
|
||||
d3d12_pipeline_state_stream_new_desc(__stream, COMPUTE, __id, __type, __desc)
|
||||
d3d12_pipeline_state_stream_new_desc(__stream, MAX_COMPUTE_PIPELINE_STATE_STREAM_SIZE, __id, __type, __desc)
|
||||
|
||||
static bool
|
||||
gfx_pipeline_variant_key_equal(const void *a, const void *b)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue