vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic.
Merge request reports
Activity
added 4 commits
- 2660a1fb - tests/shader_runner: Use resource->width instead of resource->size for buffer width.
- 0003a991 - tests/shader_runner: Factor out a resource_desc structure.
- c2da5a2e - tests: Handle multisampling in the Vulkan runner.
- 0748b9db - vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic.
Toggle commit list606 607 interface_info.combined_samplers = runner->combined_samplers; 607 608 interface_info.combined_sampler_count = runner->combined_sampler_count; 608 609 610 parameters[0].name = VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT; 611 parameters[0].type = VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT; 612 parameters[0].data_type = VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32; 613 parameters[0].u.immediate_constant.u.u32 = runner->r.sample_count; 614 615 spirv_info.parameter_count = ARRAY_SIZE(parameters); 616 spirv_info.parameters = parameters; 103 110 uint8_t *data; 104 111 size_t data_size, data_capacity; 105 112 }; 106 113 107 114 struct resource 108 115 { 109 unsigned int slot; 110 enum resource_type type; 111 enum resource_dimension dimension; 112 113 DXGI_FORMAT format; 114 unsigned int texel_size; 115 unsigned int width, height; 116 unsigned int sample_count; 116 struct resource_desc desc; 117 117 }; - Comment on lines -87 to 117
I can live with this I guess, but the way these structures are laid out doesn't feel completely natural to me.
- It's odd that the only field of
struct resource
is the resource description. In general it's a bit odd when structures have just one field, and in particular here you seem to be identifying a resource (which is an entity: two resources with the same descriptions are not the same resource) with its description (which is a collection of values: two identical descriptions are supposed to be completely interchangeable). - Conversely, field
slot
instruct resource_desc
doesn't seem to belong to a description, at least according to the meaning that I give to this word (which seems to be similar to what Microsoft does). - For those two reasons, it seems natural to me that
slot
is moved fromstruct resource_desc
tostruct resource
andstruct resource_params
. I can see why you might want to collapse the two things, but conceptually they're different for me.
Anyway, that's just theoretical ramblings, and I don't want to block anything here. Feel free to ignore.
- It's odd that the only field of
- It's odd that the only field of
struct resource
is the resource description. In general it's a bit odd when structures have just one field, and in particular here you seem to be identifying a resource (which is an entity: two resources with the same descriptions are not the same resource) with its description (which is a collection of values: two identical descriptions are supposed to be completely interchangeable).
It's awkward, but it felt more awkward to use the same struct for both, naming-wise.
We really are passing a "resource" around as evidenced by e.g. struct vulkan_resource, it's just that the only common fields are the desc, and inheriting struct vulkan_resource from struct resource_desc looks wrong.
On the other hand, constructing a resource from a "struct resource" (or putting that in struct resource_params) also looks wrong.
- Conversely, field
slot
instruct resource_desc
doesn't seem to belong to a description, at least according to the meaning that I give to this word (which seems to be similar to what Microsoft does). - For those two reasons, it seems natural to me that
slot
is moved fromstruct resource_desc
tostruct resource
andstruct resource_params
. I can see why you might want to collapse the two things, but conceptually they're different for me.
It doesn't match the way most APIs are designed, but our "API" is a little simpler—creating a resource in the first place implies choosing a "slot" for it. I don't see a conceptual problem with keeping it in the desc. On the other hand I don't have a problem with keeping it duplicated either.
- It's odd that the only field of
added 4 commits
Toggle commit listadded 1 commit
- adf4282f - vkd3d-shader/hlsl: Implement output SV_Coverage.
added 6 commits
- 19e7117c - tests/shader_runner: Use resource->width instead of resource->size for buffer width.
- dcc1a963 - tests/shader_runner: Factor out a resource_desc structure.
- 6b409dff - tests: Implement multisampling in the Vulkan renderer.
- 301e327d - tests: Implement multisampling in the GL renderer.
- 0d709f9d - vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic.
- 01947dca - vkd3d-shader/hlsl: Implement output SV_Coverage.
Toggle commit listadded 69 commits
-
01947dca...76ae871f - 63 commits from branch
wine:master
- fa570ee1 - tests/shader_runner: Use resource->width instead of resource->size for buffer width.
- fe21318b - tests/shader_runner: Factor out a resource_desc structure.
- 73796760 - tests: Implement multisampling in the Vulkan renderer.
- a5a75d45 - tests: Implement multisampling in the GL renderer.
- 71a3d55e - vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic.
- 59f77021 - vkd3d-shader/hlsl: Implement output SV_Coverage.
Toggle commit list-
01947dca...76ae871f - 63 commits from branch