On Fri, 10 Nov 2023 23:39:21 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> Moves the filter setting of the samplers from the device parameters 
>> configuration to the use-site, allowing for dynamic changes in the sampler. 
>> This PR does internal plumbing work only to bring it close to the ES2 
>> pipeline. A followup PR will create the public API.
>> 
>> Summary of the changes:
>> * Created a new (internal for now) `TextureData` object that is intended to 
>> contain all the data of texture (map) of `PhongMaterial`, such as filters, 
>> addressing, wrapping mode, mipmaps etc. **This PR deals only with filters** 
>> as a starting point, more settings can be added later.
>> * Creates an update mechanism from the Java side material to the native D3D 
>> layer. The public API `PhoneMaterial` is *not* changed yet. The peer 
>> `NGPhongMaterial` is configured to receive update from the public 
>> `PhongMaterial` when the public API is created via new 
>> `ObjectProperty<TextureData>` properties.
>> * Small refactoring in the D3D layer with a new map types enum to control 
>> the texture settings more easily.
>> 
>> The JBS issue lists some regressions in a comment, but I couldn't reproduce 
>> them. It looks like the sampler settings needed to be added anywhere, and 
>> that was the easiest to do at the time. Now they were just moved.
>
> Nir Lisker has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Addressed review comments

The sampler option structures for 
[OpenGL](https://www.khronos.org/opengl/wiki/Sampler_Object#Sampling_parameters),
 
[D3D9](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dsamplerstatetype),
 
[D3D12](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_sampler_desc)
 and 
[Metal](https://developer.apple.com/documentation/metal/mtlsamplerdescriptor) 
seem fairly congruent, albeit mangled. I agree that writing a comprehensive 
abstraction for even these few backends remains challenging. It's also not 
clear whether the [D3D12 filter 
type](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_filter)
 is some kind of bitmask and how precisely it relates to the [D3D9 filter 
type](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dtexturefiltertype),
 especially where mips are concerned. I'm also not sure whether information 
about sampler objects in OpenGL 3.3 is applicable to OpenGL ES 2.0.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1281#issuecomment-3092506961

Reply via email to